aboutsummaryrefslogtreecommitdiffstats
path: root/rust/helpers/helpers.c
diff options
context:
space:
mode:
authorLorenzo Stoakes <[email protected]>2025-05-14 08:40:24 +0000
committerAndrew Morton <[email protected]>2025-05-22 21:55:37 +0000
commit6669d1aaa0c45a50a4cc5f1756ab03578eaebd18 (patch)
treebd2bc87c158fbfc4d057b44bc2dfe594d5791235 /rust/helpers/helpers.c
parentMAINTAINERS: add kernel/fork.c to relevant sections (diff)
downloadkernel-6669d1aaa0c45a50a4cc5f1756ab03578eaebd18.tar.gz
kernel-6669d1aaa0c45a50a4cc5f1756ab03578eaebd18.zip
mm: remove WARN_ON_ONCE() in file_has_valid_mmap_hooks()
Having encountered a trinity report in linux-next (Linked in the 'Closes' tag) it appears that there are legitimate situations where a file-backed mapping can be acquired but no file->f_op->mmap or file->f_op->mmap_prepare is set, at which point do_mmap() should simply error out with -ENODEV. Since previously we did not warn in this scenario and it appears we rely upon this, restore this situation, while retaining a WARN_ON_ONCE() for the case where both are set, which is absolutely incorrect and must be addressed and thus always requires a warning. If further work is required to chase down precisely what is causing this, then we can later restore this, but it makes no sense to hold up this series to do so, as this is existing and apparently expected behaviour. Link: https://lkml.kernel.org/r/[email protected] Fixes: c84bf6dd2b83 ("mm: introduce new .mmap_prepare() file callback") Signed-off-by: Lorenzo Stoakes <[email protected]> Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-lkp/[email protected] Reviewed-by: Vlastimil Babka <[email protected]> Reviewed-by: Pedro Falcato <[email protected]> Acked-by: David Hildenbrand <[email protected]> Cc: Al Viro <[email protected]> Cc: Christian Brauner <[email protected]> Cc: Jan Kara <[email protected]> Cc: Jann Horn <[email protected]> Cc: Liam Howlett <[email protected]> Cc: Matthew Wilcox (Oracle) <[email protected]> Cc: Michal Hocko <[email protected]> Cc: Mike Rapoport <[email protected]> Cc: Suren Baghdasaryan <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'rust/helpers/helpers.c')
0 files changed, 0 insertions, 0 deletions