]> git.ipfire.org Git - people/ms/linux.git/commit - kernel/audit_tree.c
audit: Guarantee forward progress of chunk untagging
authorJan Kara <jack@suse.cz>
Mon, 12 Nov 2018 14:54:49 +0000 (09:54 -0500)
committerPaul Moore <paul@paul-moore.com>
Mon, 12 Nov 2018 14:54:49 +0000 (09:54 -0500)
commit49a4ee7d98dbe34cfed90b930664c8a9fa73b24c
tree0d298d253febe959287104358f7ac582e543482c
parent5f5161300d7bd530e062428ac694824832960cf5
audit: Guarantee forward progress of chunk untagging

When removing chunk from a tree, we do shrink the chunk. This can fail
for various reasons (due to races, ENOMEM, etc.) and in some cases we
just bail from untag_chunk() relying on someone else to cleanup.
Although this currently works, later we will need to add new failure
situation which would break. Also this simplifies the code and will
allow us to make locking around untag_chunk() less awkward.

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