Merge tag 'apparmor-pr-2019-03-12' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 13 Mar 2019 18:07:36 +0000 (11:07 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 13 Mar 2019 18:07:36 +0000 (11:07 -0700)
Pull apparmor fixes from John Johansen:

 - fix double when failing to unpack secmark rules in policy

 - fix leak of dentry when profile is removed

* tag 'apparmor-pr-2019-03-12' of git://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor:
  apparmor: fix double free when unpack of secmark rules fails
  apparmor: delete the dentry in aafs_remove() to avoid a leak
  apparmor: Fix warning about unused function apparmor_ipv6_postroute

1  2 
security/apparmor/apparmorfs.c

index 3f80a684c232addd0b498241b603ba828dd7c0eb,3b0d31fdf81b9154bbd129cc9cbd97065fd7bc6c..fefee040bf79132e03864320d6c5e19b83907094
@@@ -15,7 -15,7 +15,7 @@@
  #include <linux/ctype.h>
  #include <linux/security.h>
  #include <linux/vmalloc.h>
 -#include <linux/module.h>
 +#include <linux/init.h>
  #include <linux/seq_file.h>
  #include <linux/uaccess.h>
  #include <linux/mount.h>
@@@ -356,6 -356,7 +356,7 @@@ static void aafs_remove(struct dentry *
                        simple_rmdir(dir, dentry);
                else
                        simple_unlink(dir, dentry);
+               d_delete(dentry);
                dput(dentry);
        }
        inode_unlock(dir);