From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.suse.de ([195.135.220.15]:37471 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751396AbdDJPb3 (ORCPT ); Mon, 10 Apr 2017 11:31:29 -0400 Date: Mon, 10 Apr 2017 17:31:26 +0200 From: Jan Kara To: Paul Moore Cc: Jan Kara , linux-fsdevel@vger.kernel.org, Miklos Szeredi , Amir Goldstein Subject: Re: [PATCH 05/35] audit_tree: Use mark flags to check whether mark is alive Message-ID: <20170410153126.GI3224@quack2.suse.cz> References: <20170403153424.24945-1-jack@suse.cz> <20170403153424.24945-6-jack@suse.cz> <20170405073848.GB8899@quack2.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Thu 06-04-17 07:51:48, Paul Moore wrote: > On Wed, Apr 5, 2017 at 3:38 AM, Jan Kara wrote: > > On Tue 04-04-17 16:47:11, Paul Moore wrote: > >> On Mon, Apr 3, 2017 at 11:33 AM, Jan Kara wrote: > >> > Currently audit code uses checking of mark->inode to verify whether mark > >> > is still alive. Switch that to checking mark flags as that is more > >> > logical and current way will become unreliable in future. > >> > > >> > Reviewed-by: Miklos Szeredi > >> > Signed-off-by: Jan Kara > >> > --- > >> > kernel/audit_tree.c | 4 ++-- > >> > 1 file changed, 2 insertions(+), 2 deletions(-) > >> > >> Should audit_tree.c:insert_hash() also be updated in a similar manner? > > > > Do you mean the part which has become chunk_to_key()? ... > > No, I was talking about the if conditional near the top of the > function that checks to see if the fsnotify_mark's inode is non-NULL; > it seems like you would also want to convert that to a > FSNOTIFY_MARK_FLAG_ATTACHED, yes? Ah, that one. Yes, that can certainly become a FSNOTIFY_MARK_FLAG_ATTACHED check although I cannot currently come up with a situation where it would matter. But it looks safer that way so I'll change that check as you suggest. Honza -- Jan Kara SUSE Labs, CR