]> git.karo-electronics.de Git - karo-tx-linux.git/commit
fanotify: Release SRCU lock when waiting for userspace response
authorJan Kara <jack@suse.cz>
Thu, 10 Nov 2016 16:45:16 +0000 (17:45 +0100)
committerJan Kara <jack@suse.cz>
Mon, 10 Apr 2017 15:37:36 +0000 (17:37 +0200)
commit05f0e38724e8449184acd8fbf0473ee5a07adc6c
treeec38fb315ab41f887ef1af9c6adfd2735ed377a9
parent9385a84d7e1f658bb2d96ab798393e4b16268aaa
fanotify: Release SRCU lock when waiting for userspace response

When userspace task processing fanotify permission events screws up and
does not respond, fsnotify_mark_srcu SRCU is held indefinitely which
causes further hangs in the whole notification subsystem. Although we
cannot easily solve the problem of operations blocked waiting for
response from userspace, we can at least somewhat localize the damage by
dropping SRCU lock before waiting for userspace response and reacquiring
it when userspace responds.

Reviewed-by: Miklos Szeredi <mszeredi@redhat.com>
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
fs/notify/fanotify/fanotify.c