audit: keep inode pinned
authorMiklos Szeredi <mszeredi@suse.cz>
Tue, 4 Nov 2014 10:27:12 +0000 (11:27 +0100)
committerZefan Li <lizefan@huawei.com>
Mon, 2 Feb 2015 09:05:19 +0000 (17:05 +0800)
commitbf5dbba17a6816e0b7f33abc034f5ca089884e10
tree2bf58f35a1901e24afa52a01a01e38197e8639cc
parent3b5d98d44729594d72d3c36881234b7caa040d87
audit: keep inode pinned

commit 799b601451b21ebe7af0e6e8f6e2ccd4683c5064 upstream.

Audit rules disappear when an inode they watch is evicted from the cache.
This is likely not what we want.

The guilty commit is "fsnotify: allow marks to not pin inodes in core",
which didn't take into account that audit_tree adds watches with a zero
mask.

Adding any mask should fix this.

Fixes: 90b1e7a57880 ("fsnotify: allow marks to not pin inodes in core")
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Paul Moore <pmoore@redhat.com>
Signed-off-by: Zefan Li <lizefan@huawei.com>
kernel/audit_tree.c