]> git.baikalelectronics.ru Git - kernel.git/commit
fanotify: update connector fsid cache on add mark
authorAmir Goldstein <amir73il@gmail.com>
Wed, 19 Jun 2019 10:34:44 +0000 (13:34 +0300)
committerJan Kara <jack@suse.cz>
Wed, 19 Jun 2019 13:53:58 +0000 (15:53 +0200)
commit97b9ccf4db01e026902a4c90ff3f5ba94b88f864
treed6959488584787c33c90c971805e48920831289f
parent147d2dd62a8abde737d76a9460dc53498879bdba
fanotify: update connector fsid cache on add mark

When implementing connector fsid cache, we only initialized the cache
when the first mark added to object was added by FAN_REPORT_FID group.
We forgot to update conn->fsid when the second mark is added by
FAN_REPORT_FID group to an already attached connector without fsid
cache.

Reported-and-tested-by: syzbot+c277e8e2f46414645508@syzkaller.appspotmail.com
Fixes: 6dfe1a91fae2 ("fanotify: cache fsid in fsnotify_mark_connector")
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
fs/notify/fanotify/fanotify.c
fs/notify/mark.c
include/linux/fsnotify_backend.h