• Jan Kiszka's avatar
    CAPI: Rework application locking · 88c896ef
    Jan Kiszka authored
    Drop the application rw-lock in favour of RCU. This synchronizes
    capi20_release against capi_ctr_handle_message which may dereference an
    application from (soft-)IRQ context. Any other access to the application
    list is now protected by the capi_controller_lock as well. This also
    allows to safely inspect applications for /proc dumping by holding
    capi_controller_lock.
    
    At this chance, drop some useless release_in_progress checks where we
    obtained the application pointer from the list (which becomes NULL on
    release_in_progress).
    Signed-off-by: default avatarJan Kiszka <jan.kiszka@web.de>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    88c896ef
kcapi.c 29.2 KB