summaryrefslogtreecommitdiffstats
path: root/fs/seq_file.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2021-09-06 12:34:11 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2021-09-06 12:34:48 +0200
commite99314a340d27efafab3b7ea226beb239162cd46 (patch)
treee16aebf4ddd982518c89eda4ccebdaff1c430723 /fs/seq_file.c
parentMerge tag 'kvm-s390-next-5.15-1' of git://git.kernel.org/pub/scm/linux/kernel... (diff)
parentMerge branch kvm-arm64/misc-5.15 into kvmarm-master/next (diff)
downloadlinux-e99314a340d27efafab3b7ea226beb239162cd46.tar.xz
linux-e99314a340d27efafab3b7ea226beb239162cd46.zip
Merge tag 'kvmarm-5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD
KVM/arm64 updates for 5.15 - Page ownership tracking between host EL1 and EL2 - Rely on userspace page tables to create large stage-2 mappings - Fix incompatibility between pKVM and kmemleak - Fix the PMU reset state, and improve the performance of the virtual PMU - Move over to the generic KVM entry code - Address PSCI reset issues w.r.t. save/restore - Preliminary rework for the upcoming pKVM fixed feature - A bunch of MM cleanups - a vGIC fix for timer spurious interrupts - Various cleanups
Diffstat (limited to 'fs/seq_file.c')
-rw-r--r--fs/seq_file.c3
1 files changed, 3 insertions, 0 deletions
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)
static void *seq_buf_alloc(unsigned long size)
{
+ if (unlikely(size > MAX_RW_COUNT))
+ return NULL;
+
return kvmalloc(size, GFP_KERNEL_ACCOUNT);
}