From: Jeff Layton Date: Wed, 10 Oct 2012 19:25:20 +0000 (-0400) Subject: audit: pass in dentry to audit_copy_inode wherever possible X-Git-Tag: v3.7-rc1~32^2~18 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1c2e51e8c162417d2831007ec256ede06c3a0201;p=profile%2Fivi%2Fkernel-x86-ivi.git audit: pass in dentry to audit_copy_inode wherever possible In some cases, we were passing in NULL even when we have a dentry. Reported-by: Eric Paris Signed-off-by: Jeff Layton Signed-off-by: Al Viro --- diff --git a/kernel/auditsc.c b/kernel/auditsc.c index f4a7756..4d1bd62b 100644 --- a/kernel/auditsc.c +++ b/kernel/auditsc.c @@ -2212,7 +2212,7 @@ void __audit_inode_child(const struct dentry *dentry, if (!strcmp(dname, n->name) || !audit_compare_dname_path(dname, n->name, &dirlen)) { if (inode) - audit_copy_inode(n, NULL, inode); + audit_copy_inode(n, dentry, inode); else n->ino = (unsigned long)-1; found_child = n->name; @@ -2244,7 +2244,7 @@ add_names: } if (inode) - audit_copy_inode(n, NULL, inode); + audit_copy_inode(n, dentry, inode); } } EXPORT_SYMBOL_GPL(__audit_inode_child);