Add "memory" clobbers to the x86 inline asm of strncmp and friends
authorLinus Torvalds <torvalds@ppc970.osdl.org>
Fri, 24 Jun 2005 17:39:17 +0000 (10:39 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Fri, 24 Jun 2005 17:39:17 +0000 (10:39 -0700)
commit793ae77469121227cd910c4b99f24be1de34bcca
treeca8b6bbafab35c5c1099c54696c36dc0b8c17cf7
parent59a49e38711a146dc0bef4837c825b5422335460
Add "memory" clobbers to the x86 inline asm of strncmp and friends

They don't actually clobber memory, but gcc doesn't even know they
_read_ memory, so can apparently re-order memory accesses around them.

Which obviously does the wrong thing if the memory access happens to
change the memory that the compare function is accessing..

Verified to fix a strange boot problem by Jens Axboe.
include/asm-i386/string.h