[Bionic][SRU][PATCH 0/1] fsnotify: fix ignore mask logic in fsnotify()

Po-Hsu Lin po-hsu.lin at canonical.com
Thu Nov 22 11:31:32 UTC 2018

BugLink: https://bugs.launchpad.net/bugs/1802454

== Justification ==
Commit 92183a42898d ("fsnotify: fix ignore mask logic in
send_to_group()") acknowledges the use case of ignoring an event on
an inode mark, because of an ignore mask on a mount mark of the same
group (i.e. I want to get all events on this file, except for the events
that came from that mount).

This change depends on correctly merging the inode marks and mount marks
group lists, so that the mount mark ignore mask would be tested in
send_to_group(). Alas, the merging of the lists did not take into
account the case where event in question is not in the mask of any of
the mount marks.

To fix this, completely remove the tests for inode and mount event masks
from the lists merging code.

== Fix ==
9bdda4e9 (fsnotify: fix ignore mask logic in fsnotify())

Test kernels for Bionic can be found here:

It seems that T/X poses with the same issue and we might be able to backport
it with the same logic, but I think we should target Bionic as it's a fix for
for 92183a42898d which was only applied to Bionic.

== Regression Potential ==

The backport work is required as it's missing commit 47d9c7cc457 in Bionic,
which generalizes the iteration of marks for inode_mark and vfsmount_mark, from:

But the patch can still be backported with the same logic without this commit.

The test with the syscalls test in LTP test suite shows no sign of regression.

== Test Case ==
Run the fanotify10 test in ubuntu_ltp_syscalls test suite. And it will pass
with the patched kernel.

Full LTP syscalls test with 4.15.0-42 in -proposed:

Full LTP syscalls test with patched 4.15.0-42:

Amir Goldstein (1):
  fsnotify: fix ignore mask logic in fsnotify()

 fs/notify/fsnotify.c | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)


More information about the kernel-team mailing list