linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@redhat.com>
To: eparis@redhat.com, viro@zeniv.linux.org.uk
Cc: linux-audit@redhat.com, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org, bfields@fieldses.org
Subject: [PATCH v6 02/10] audit: pass in dentry to audit_copy_inode wherever possible
Date: Fri,  7 Sep 2012 07:23:39 -0400	[thread overview]
Message-ID: <1347017027-17167-3-git-send-email-jlayton@redhat.com> (raw)
In-Reply-To: <1347017027-17167-1-git-send-email-jlayton@redhat.com>

In some cases, we were passing in NULL even when we have a dentry.

Reported-by: Eric Paris <eparis@redhat.com>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
---
 kernel/auditsc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/auditsc.c b/kernel/auditsc.c
index 4b96415..5c45b9b 100644
--- a/kernel/auditsc.c
+++ b/kernel/auditsc.c
@@ -2226,7 +2226,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;
@@ -2258,7 +2258,7 @@ add_names:
 		}
 
 		if (inode)
-			audit_copy_inode(n, NULL, inode);
+			audit_copy_inode(n, dentry, inode);
 	}
 }
 EXPORT_SYMBOL_GPL(__audit_inode_child);
-- 
1.7.11.4


  parent reply	other threads:[~2012-09-07 11:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-07 11:23 [PATCH v6 00/10] audit: overhaul audit_names handling to allow for retrying on path-based syscalls Jeff Layton
2012-09-07 11:23 ` [PATCH v6 01/10] audit: remove unnecessary NULL ptr checks from do_path_lookup Jeff Layton
2012-09-07 11:23 ` Jeff Layton [this message]
2012-09-07 11:23 ` [PATCH v6 03/10] audit: no need to walk list in audit_inode if name is NULL Jeff Layton
2012-09-07 11:23 ` [PATCH v6 04/10] audit: reverse arguments to audit_inode_child Jeff Layton
2012-09-07 11:23 ` [PATCH v6 05/10] audit: add a new "type" field to audit_names struct Jeff Layton
2012-09-07 11:23 ` [PATCH v6 06/10] audit: set the name_len in audit_inode for parent lookups Jeff Layton
2012-09-07 11:23 ` [PATCH v6 07/10] audit: remove dirlen argument to audit_compare_dname_path Jeff Layton
2012-09-07 11:23 ` [PATCH v6 08/10] audit: make audit_compare_dname_path use parent_len helper Jeff Layton
2012-09-07 11:23 ` [PATCH v6 09/10] audit: optimize audit_compare_dname_path Jeff Layton
2012-09-07 11:23 ` [PATCH v6 10/10] audit: overhaul __audit_inode_child to accomodate retrying Jeff Layton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1347017027-17167-3-git-send-email-jlayton@redhat.com \
    --to=jlayton@redhat.com \
    --cc=bfields@fieldses.org \
    --cc=eparis@redhat.com \
    --cc=linux-audit@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).