summaryrefslogtreecommitdiff
path: root/fs/pstore/ram.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2024-01-10 10:53:02 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2024-01-10 10:53:02 -0800
commit72116efd6307077546c93e0432a197876cedff70 (patch)
treedd699d695134e140bfef0072b1e6bcb657b2db5d /fs/pstore/ram.c
parent4d925f60578ab3b13e2cfeb5e6e38cb83d51e032 (diff)
parent24a0b5e196cf70ccff97bc0add6fa7178ad50cc4 (diff)
downloadlwn-72116efd6307077546c93e0432a197876cedff70.tar.gz
lwn-72116efd6307077546c93e0432a197876cedff70.zip
Merge tag 'pstore-v6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux
Pull pstore updates from Kees Cook: - Do not allow misconfigured ECC sizes (Sergey Shtylyov) - Allow for odd number of CPUs (Weichen Chen) - Refactor error handling to use cleanup.h * tag 'pstore-v6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: pstore: inode: Use cleanup.h for struct pstore_private pstore: inode: Use __free(pstore_iput) for inode allocations pstore: inode: Convert mutex usage to guard(mutex) pstore: inode: Convert kfree() usage to __free(kfree) pstore: ram_core: fix possible overflow in persistent_ram_init_ecc() pstore/ram: Fix crash when setting number of cpus to an odd number
Diffstat (limited to 'fs/pstore/ram.c')
-rw-r--r--fs/pstore/ram.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c
index d36702c7ab3c..88b34fdbf759 100644
--- a/fs/pstore/ram.c
+++ b/fs/pstore/ram.c
@@ -529,6 +529,7 @@ static int ramoops_init_przs(const char *name,
}
zone_sz = mem_sz / *cnt;
+ zone_sz = ALIGN_DOWN(zone_sz, 2);
if (!zone_sz) {
dev_err(dev, "%s zone size == 0\n", name);
goto fail;