Re: [PATCH] fanotify: compare fsid when merging name event

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue 28-07-20 09:51:08, Amir Goldstein wrote:
> This was missed when splitting name event from fid event
> 
> Fixes: cacfb956d46e ("fanotify: record name info for FAN_DIR_MODIFY event")
> Cc: <stable@xxxxxxxxxxxxxxx> # v5.7+
> Signed-off-by: Amir Goldstein <amir73il@xxxxxxxxx>

OK, but given we never enabled FAN_DIR_MODIFY in 5.7, this is just a dead
code there, isn't it? So it should be enough to fix this for the series
that's currently queued?

								Honza

> ---
> 
> Jan,
> 
> We missed a spot in v5.7.
> 
> IMO, the issue is not that critical that we must fast track the fix to
> v5.8, but I am posting this patch based on v5.8-rc7, so you may decide
> whether you want to fast track it or to apply it at the beginning of the
> series for next.
> 
> Either way, this is going to be easier for cherry-picking to stable rather
> that backporting the fix from the top of the series for next.
> I pushed my "forward porting" to branch fsnotify-fixes.
> 
> Thanks,
> Amir.
> 
>  fs/notify/fanotify/fanotify.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/fs/notify/fanotify/fanotify.c b/fs/notify/fanotify/fanotify.c
> index 85eda539b35f..04f9a7012f46 100644
> --- a/fs/notify/fanotify/fanotify.c
> +++ b/fs/notify/fanotify/fanotify.c
> @@ -64,6 +64,7 @@ static bool fanotify_name_event_equal(struct fanotify_name_event *fne1,
>  		return false;
>  
>  	if (fne1->name_len != fne2->name_len ||
> +	    !fanotify_fsid_equal(&fne1->fsid, &fne2->fsid) ||
>  	    !fanotify_fh_equal(&fne1->dir_fh, &fne2->dir_fh))
>  		return false;
>  
> -- 
> 2.17.1
> 
-- 
Jan Kara <jack@xxxxxxxx>
SUSE Labs, CR



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux