]> git.karo-electronics.de Git - linux-beck.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)
commitbe29d20f3f5db1f0b4e49a4f6eeedf840e2bf9b1
tree129d3e33fe04b96e2af0b8adf633019a316f10e8
parente3ba730702af370563f66cb610b71aa0ca67955e
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