From: Greg Kroah-Hartman Date: Tue, 20 Jul 2021 13:56:40 +0000 (+0200) Subject: fix up 4.9 commit X-Git-Tag: v5.13.4~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bc5884deec36707c96e3ec53316aff906c784997;p=thirdparty%2Fkernel%2Fstable-queue.git fix up 4.9 commit --- diff --git a/queue-4.9/seq_file-disallow-extremely-large-seq-buffer-allocations.patch b/queue-4.9/seq_file-disallow-extremely-large-seq-buffer-allocations.patch index ef8b5389331..70a8202aaf7 100644 --- a/queue-4.9/seq_file-disallow-extremely-large-seq-buffer-allocations.patch +++ b/queue-4.9/seq_file-disallow-extremely-large-seq-buffer-allocations.patch @@ -18,23 +18,18 @@ Cc: stable@kernel.org Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- - fs/seq_file.c | 3 +++ + fs/seq_file.c | 3 +++ 1 file changed, 3 insertions(+) -diff --git a/fs/seq_file.c b/fs/seq_file.c -index b117b212ef28..4a2cda04d3e2 100644 --- a/fs/seq_file.c +++ b/fs/seq_file.c -@@ -32,6 +32,9 @@ static void seq_set_overflow(struct seq_file *m) +@@ -28,6 +28,9 @@ static void *seq_buf_alloc(unsigned long + void *buf; + gfp_t gfp = GFP_KERNEL; - static void *seq_buf_alloc(unsigned long size) - { + if (unlikely(size > MAX_RW_COUNT)) + return NULL; + - return kvmalloc(size, GFP_KERNEL_ACCOUNT); - } - --- -2.32.0 - + /* + * For high order allocations, use __GFP_NORETRY to avoid oom-killing - + * it's better to fall back to vmalloc() than to kill things. For small