[PATCH] 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)
committerWilly Tarreau <w@1wt.eu>
Wed, 17 Oct 2007 19:30:21 +0000 (21:30 +0200)
commite54a4b21a342c6a80c2e1bed14f1d31c24fadf45
treec659976fa86089d93b90004c8b518668ba882c53
parent51abbf21739d5aa4eae4723dcd79af08ab82a664
[PATCH] 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