• Haavard Skinnemoen's avatar
    [AVR32] Fix atomic_add_unless() and atomic_sub_unless() · 3da86ee4
    Haavard Skinnemoen authored
    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: default avatarHaavard Skinnemoen <hskinnemoen@atmel.com>
    3da86ee4
atomic.h 5.03 KB