diff options
author | Miklos Szeredi <mszeredi@redhat.com> | 2017-10-30 21:14:56 +0100 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2017-10-31 17:54:56 +0100 |
commit | 9a31d7ad997f55768c687974ce36b759065b49e5 (patch) | |
tree | 370270d9166e6c4080e0afebb893b7feb02f222f /drivers/ptp | |
parent | fsnotify: pin both inode and vfsmount mark (diff) | |
download | linux-9a31d7ad997f55768c687974ce36b759065b49e5.tar.xz linux-9a31d7ad997f55768c687974ce36b759065b49e5.zip |
fsnotify: fix pinning group in fsnotify_prepare_user_wait()
Blind increment of group's user_waits is not enough, we could be far enough
in the group's destruction that it isn't taken into account (i.e. grabbing
the mark ref afterwards doesn't guarantee that it was the ref coming from
the _group_ that was grabbed).
Instead we need to check (under lock) that the mark is still attached to
the group after having obtained a ref to the mark. If not, skip it.
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Fixes: 9385a84d7e1f ("fsnotify: Pass fsnotify_iter_info into handle_event handler")
Cc: <stable@vger.kernel.org> # v4.12
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'drivers/ptp')
0 files changed, 0 insertions, 0 deletions