Skip to content

Commit 6c8fcc0

Browse files
danvettorvalds
authored andcommitted
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]>
1 parent 6373dca commit 6c8fcc0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mm/util.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ void *memdup_user(const void __user *src, size_t len)
150150
{
151151
void *p;
152152

153-
p = kmalloc_track_caller(len, GFP_USER);
153+
p = kmalloc_track_caller(len, GFP_USER | __GFP_NOWARN);
154154
if (!p)
155155
return ERR_PTR(-ENOMEM);
156156

0 commit comments

Comments
 (0)