diff options
author | Jan Kara <[email protected]> | 2023-04-24 18:32:19 +0200 |
---|---|---|
committer | Jan Kara <[email protected]> | 2023-04-25 12:36:55 +0200 |
commit | c915d8f5918bea7c3962b09b8884ca128bfd9b0c (patch) | |
tree | 366e7c899862058ba8ed7190f20457149b7eefbd /drivers/fpga/fpga-bridge.c | |
parent | 173ea743bf7a9eef04460e03b00ba267cc52aee2 (diff) |
inotify: Avoid reporting event with invalid wd
When inotify_freeing_mark() races with inotify_handle_inode_event() it
can happen that inotify_handle_inode_event() sees that i_mark->wd got
already reset to -1 and reports this value to userspace which can
confuse the inotify listener. Avoid the problem by validating that wd is
sensible (and pretend the mark got removed before the event got
generated otherwise).
CC: [email protected]
Fixes: 7e790dd5fc93 ("inotify: fix error paths in inotify_update_watch")
Message-Id: <[email protected]>
Reported-by: [email protected]
Reviewed-by: Amir Goldstein <[email protected]>
Signed-off-by: Jan Kara <[email protected]>
Diffstat (limited to 'drivers/fpga/fpga-bridge.c')
0 files changed, 0 insertions, 0 deletions