From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751951AbdF2X60 (ORCPT ); Thu, 29 Jun 2017 19:58:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:49634 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751650AbdF2X6Z (ORCPT ); Thu, 29 Jun 2017 19:58:25 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A2BDF22B60 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=goodmis.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=rostedt@goodmis.org Date: Thu, 29 Jun 2017 19:58:17 -0400 From: Steven Rostedt To: Richard Guy Briggs Cc: Paul Moore , linux-kernel@vger.kernel.org, linux-audit@redhat.com, Greg Kroah-Hartman , Ingo Molnar , Al Viro Subject: Re: [PATCH ALT4 V2 1/2] audit: show fstype:pathname for entries with anonymous parents Message-ID: <20170629195817.4ea4906e@gandalf.local.home> In-Reply-To: <20170629212122.GG27193@madcap2.tricolour.ca> References: <20170627211138.GE27193@madcap2.tricolour.ca> <20170629212122.GG27193@madcap2.tricolour.ca> X-Mailer: Claws Mail 3.14.0 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 29 Jun 2017 17:21:22 -0400 Richard Guy Briggs wrote: > > Looking at this again today, why would we want to clear name->dentry > > in audit_copy_inode() if it is already set? Does that ever happen? > > I'm not sure it does ... > > It has been nearly 3 months since I coded that, so I'll have to dive in > and re-analyse what I was thinking at that time. I think that rationale > was that if audit_copy_inode() is called again on that audit_name struct > that it could be called by audit_log_link_denied() or __audit_inode() > not needing the dentry reference or even by __audit_inode_child() and > have it replaced, needing a reference count correction. > Just a note. If after 3 months you need to re-analyze, you either need to design things simpler, or have better comments in the code. -- Steve