]> www.infradead.org Git - users/jedix/linux-maple.git/commit
efivarfs: Defer PM notifier registration until .fill_super
authorArd Biesheuvel <ardb@kernel.org>
Sun, 23 Feb 2025 15:48:54 +0000 (16:48 +0100)
committerArd Biesheuvel <ardb@kernel.org>
Sun, 23 Feb 2025 16:30:05 +0000 (17:30 +0100)
commitcb6ae457bc6af58c84a7854df5e7e32ba1c6a715
tree4348c0f72a99ba5f455edb6a89fa733517c9b568
parentd6a2d02aa060531607f4a8411ec384470faa2761
efivarfs: Defer PM notifier registration until .fill_super

syzbot reports an issue that turns out to be caused by the fact that the
efivarfs PM notifier may be invoked before the efivarfs_fs_info::sb
field is populated, resulting in a NULL deference.

So defer the registration until efivarfs_fill_super() is invoked.

Reported-by: syzbot+00d13e505ef530a45100@syzkaller.appspotmail.com
Tested-by: syzbot+00d13e505ef530a45100@syzkaller.appspotmail.com
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
fs/efivarfs/super.c