Files
twx-linux/fs
Amir Goldstein bb43c568f7 kernfs: annotate different lockdep class for of->mutex of writable files
commit 16b52bbee4 upstream.

The writable file /sys/power/resume may call vfs lookup helpers for
arbitrary paths and readonly files can be read by overlayfs from vfs
helpers when sysfs is a lower layer of overalyfs.

To avoid a lockdep warning of circular dependency between overlayfs
inode lock and kernfs of->mutex, use a different lockdep class for
writable and readonly kernfs files.

Reported-by: syzbot+9a5b0ced8b1bfb238b56@syzkaller.appspotmail.com
Fixes: 0fedefd4c4 ("kernfs: sysfs: support custom llseek method for sysfs entries")
Suggested-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-04-17 11:23:40 +02:00
..
2024-04-03 15:32:20 +02:00
2024-04-03 15:32:12 +02:00
2024-02-16 10:20:35 +09:00
2024-03-06 10:52:12 +01:00
2024-02-09 23:31:16 -05:00
2024-03-26 18:16:26 -04:00