diff options
author | James Bottomley <James.Bottomley@HansenPartnership.com> | 2025-03-18 06:06:01 +0300 |
---|---|---|
committer | Ard Biesheuvel <ardb@kernel.org> | 2025-03-18 10:46:08 +0300 |
commit | 11092db5b57377ac99e6339cfd16ca35ef011f3c (patch) | |
tree | 826afcbcff13ec4d4b10b3535db7932dbdac01c8 /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | dec1277875a5974413068bfb67df7e87e51a189b (diff) | |
download | linux-11092db5b57377ac99e6339cfd16ca35ef011f3c.tar.xz |
efivarfs: fix NULL dereference on resume
LSMs often inspect the path.mnt of files in the security hooks, and this
causes a NULL deref in efivarfs_pm_notify() because the path is
constructed with a NULL path.mnt.
Fix by obtaining from vfs_kern_mount() instead, and being very careful
to ensure that deactivate_super() (potentially triggered by a racing
userspace umount) is not called directly from the notifier, because it
would deadlock when efivarfs_kill_sb() tried to unregister the notifier
chain.
[ Al notes:
Umm... That's probably safe, but not as a long-term solution -
it's too intimately dependent upon fs/super.c internals. The
reasons why you can't run into ->s_umount deadlock here are
non-trivial... ]
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Link: https://lore.kernel.org/r/e54e6a2f-1178-4980-b771-4d9bafc2aa47@tnxip.de
Link: https://lore.kernel.org/r/3e998bf87638a442cbc6864cdcd3d8d9e08ce3e3.camel@HansenPartnership.com
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions