1
Index: b/security/apparmor/lsm.c
2
===================================================================
3
--- a/security/apparmor/lsm.c
4
+++ b/security/apparmor/lsm.c
5
@@ -260,7 +260,8 @@ static int aa_permission(struct inode *i
7
profile = aa_get_profile(current);
9
- if (inode && S_ISDIR(inode->i_mode))
10
+ struct inode *d_inode = dentry->d_inode;
11
+ if (d_inode && S_ISDIR(d_inode->i_mode))
12
check |= AA_CHECK_DIR;
13
error = aa_perm(profile, dentry, mnt, mask, check);