Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
- 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