Message ID | 20200728065108.26332-1-amir73il@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | fanotify: compare fsid when merging name event | expand |
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@vger.kernel.org> # v5.7+ > Signed-off-by: Amir Goldstein <amir73il@gmail.com> 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 >
On Tue, Jul 28, 2020 at 10:42 AM Jan Kara <jack@suse.cz> wrote: > > 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@vger.kernel.org> # v5.7+ > > Signed-off-by: Amir Goldstein <amir73il@gmail.com> > > 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? Doh! you are right. So you can just work it into the series and remove the explicit stable tag. If we leave the Fixes tag, stable bots will probably pick this up, but OTOH, there is no harm in applying the patch to stable kernel, so whatever. Thanks, Amir.
On Tue 28-07-20 11:06:25, Amir Goldstein wrote: > On Tue, Jul 28, 2020 at 10:42 AM Jan Kara <jack@suse.cz> wrote: > > > > 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@vger.kernel.org> # v5.7+ > > > Signed-off-by: Amir Goldstein <amir73il@gmail.com> > > > > 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? > > Doh! you are right. > So you can just work it into the series and remove the explicit stable tag. > If we leave the Fixes tag, stable bots will probably pick this up, but OTOH, > there is no harm in applying the patch to stable kernel, so whatever. Attached is what I have pushed to my tree. Honza
On Tue, Jul 28, 2020 at 12:04 PM Jan Kara <jack@suse.cz> wrote: > > On Tue 28-07-20 11:06:25, Amir Goldstein wrote: > > On Tue, Jul 28, 2020 at 10:42 AM Jan Kara <jack@suse.cz> wrote: > > > > > > 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@vger.kernel.org> # v5.7+ > > > > Signed-off-by: Amir Goldstein <amir73il@gmail.com> > > > > > > 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? > > > > Doh! you are right. > > So you can just work it into the series and remove the explicit stable tag. > > If we leave the Fixes tag, stable bots will probably pick this up, but OTOH, > > there is no harm in applying the patch to stable kernel, so whatever. > > Attached is what I have pushed to my tree. > Excellent. Thanks, Amir.
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;
This was missed when splitting name event from fid event Fixes: cacfb956d46e ("fanotify: record name info for FAN_DIR_MODIFY event") Cc: <stable@vger.kernel.org> # v5.7+ Signed-off-by: Amir Goldstein <amir73il@gmail.com> --- 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(+)