Skip to content
Commit 9c95a278 authored by Patrick Steinhardt's avatar Patrick Steinhardt Committed by John Johansen
Browse files

apparmor: fix bind mounts aborting with -ENOMEM



With commit df323337 ("apparmor: Use a memory pool instead per-CPU
caches, 2019-05-03"), AppArmor code was converted to use memory pools. In
that conversion, a bug snuck into the code that polices bind mounts that
causes all bind mounts to fail with -ENOMEM, as we erroneously error out
if `aa_get_buffer` returns a pointer instead of erroring out when it
does _not_ return a valid pointer.

Fix the issue by correctly checking for valid pointers returned by
`aa_get_buffer` to fix bind mounts with AppArmor.

Fixes: df323337 ("apparmor: Use a memory pool instead per-CPU caches")
Signed-off-by: default avatarPatrick Steinhardt <ps@pks.im>
Signed-off-by: default avatarJohn Johansen <john.johansen@canonical.com>
parent fd698849
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment