]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
UBUNTU: SAUCE: apparmor: Fix: deadlock in aa_put_label() call chain
authorJohn Johansen <john.johansen@canonical.com>
Wed, 7 Oct 2015 14:47:45 +0000 (07:47 -0700)
committerTim Gardner <tim.gardner@canonical.com>
Wed, 6 Apr 2016 09:21:33 +0000 (10:21 +0100)
commit7a1cf8a9c31154d84c989cd708aa4b84c331c262
tree716c78512f21663b397c2c0e9f14c5fe725b9f04
parent62a5fac9b09fc0d5c89b40d78c5335c2fb4f56cf
UBUNTU: SAUCE: apparmor: Fix: deadlock in aa_put_label() call chain

BugLink: http://bugs.launchpad.net/bugs/1448912
When aa_put_label() is called from a fn that is holding the labelset
lock, it can result in a deadlock if the put count reaches 0 triggering
the kref callback, which tries to take the label set lock.

Rework so the label_kref callback deferrs removing the label from
the labelset until the rcu callback, ensuring the lock is not held
by the calling code.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
security/apparmor/label.c