diff options
author | Daniel Vetter <[email protected]> | 2019-02-20 22:20:42 -0800 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2019-02-21 09:01:01 -0800 |
commit | 6c8fcc096be9d02f478c508052a41a4430506ab3 (patch) | |
tree | 5de75352c94c318dc80a70a6598e09a986f9f962 | |
parent | 6373dca16c911b2828ef8d836d7f6f1800e1bbbc (diff) |
mm: don't let userspace spam allocations warnings
memdump_user usually gets fed unchecked userspace input. Blasting a
full backtrace into dmesg every time is a bit excessive - I'm not sure
on the kernel rule in general, but at least in drm we're trying not to
let unpriviledge userspace spam the logs freely. Definitely not entire
warning backtraces.
It also means more filtering for our CI, because our testsuite exercises
these corner cases and so hits these a lot.
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Daniel Vetter <[email protected]>
Reviewed-by: Andrew Morton <[email protected]>
Acked-by: Michal Hocko <[email protected]>
Reviewed-by: Kees Cook <[email protected]>
Cc: Mike Rapoport <[email protected]>
Cc: Roman Gushchin <[email protected]>
Cc: Vlastimil Babka <[email protected]>
Cc: Jan Stancek <[email protected]>
Cc: Andrey Ryabinin <[email protected]>
Cc: "Michael S. Tsirkin" <[email protected]>
Cc: Huang Ying <[email protected]>
Cc: Bartosz Golaszewski <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r-- | mm/util.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/util.c b/mm/util.c index 1ea055138043..379319b1bcfd 100644 --- a/mm/util.c +++ b/mm/util.c @@ -150,7 +150,7 @@ void *memdup_user(const void __user *src, size_t len) { void *p; - p = kmalloc_track_caller(len, GFP_USER); + p = kmalloc_track_caller(len, GFP_USER | __GFP_NOWARN); if (!p) return ERR_PTR(-ENOMEM); |