]> git.baikalelectronics.ru Git - kernel.git/commit
audit: Fix sleep in atomic
authorJan Kara <jack@suse.cz>
Wed, 14 Dec 2016 13:40:05 +0000 (14:40 +0100)
committerPaul Moore <paul@paul-moore.com>
Tue, 3 Jan 2017 20:56:38 +0000 (15:56 -0500)
commitfaeed963e5158819e4a1ebc71c9cae4801e7bbd4
tree129d3e33fe04b96e2af0b8adf633019a316f10e8
parent817f91290fead06219b0e57200597f1f78f8a2f3
audit: Fix sleep in atomic

Audit tree code was happily adding new notification marks while holding
spinlocks. Since fsnotify_add_mark() acquires group->mark_mutex this can
lead to sleeping while holding a spinlock, deadlocks due to lock
inversion, and probably other fun. Fix the problem by acquiring
group->mark_mutex earlier.

CC: Paul Moore <paul@paul-moore.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Paul Moore <paul@paul-moore.com>
kernel/audit_tree.c