]> git.baikalelectronics.ru Git - kernel.git/commit
audit: Make hash table insertion safe against concurrent lookups
authorJan Kara <jack@suse.cz>
Mon, 12 Nov 2018 14:54:48 +0000 (09:54 -0500)
committerPaul Moore <paul@paul-moore.com>
Mon, 12 Nov 2018 14:54:48 +0000 (09:54 -0500)
commitbce825e0b1ccdc4f51ef21548a33f217f212e9d9
tree216c24efdcd39602c92b7419d522c519bc3486e8
parenta588c8e46ad40f079852ebf2f3fabc829534be74
audit: Make hash table insertion safe against concurrent lookups

Currently, the audit tree code does not make sure that when a chunk is
inserted into the hash table, it is fully initialized. So in theory a
user of RCU lookup could see uninitialized structure in the hash table
and crash. Add appropriate barriers between initialization of the
structure and its insertion into hash table.

Reviewed-by: Richard Guy Briggs <rgb@redhat.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Paul Moore <paul@paul-moore.com>
kernel/audit_tree.c