]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
AVR32: Fix atomic_add_unless() and atomic_sub_unless()
authorHaavard Skinnemoen <hskinnemoen@atmel.com>
Wed, 15 Aug 2007 13:31:01 +0000 (15:31 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 22 Aug 2007 23:23:25 +0000 (16:23 -0700)
commit3b9f2ae11b90e49388fad24ef3fd2a0045f952fd
tree867d69d7d6ba0b4d493acc619fb3bef7d9ff2833
parent70a188b7c37540f00469d266bac53e6670807dd9
AVR32: Fix atomic_add_unless() and atomic_sub_unless()

These functions depend on "result" being initalized to 0, but "result"
is not included as an input constraint to the inline assembly block
following its initialization, only as an output constraint. Thus gcc
thinks it doesn't need to initialize it, so result ends up undefined
if the "unless" condition is true.

This fixes an oops in sunrpc where the faulty atomics caused
rpciod_up() to not start the workqueue as it should.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
include/asm-avr32/atomic.h