Skip to content

Commit 4e7ffde

Browse files
committed
Merge tag 'powerpc-6.5-6' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
Pull powerpc fix from Michael Ellerman: - Fix hardened usercopy BUG when using /proc based firmware update interface Thanks to Nathan Lynch and Kees Cook. * tag 'powerpc-6.5-6' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/rtas_flash: allow user copy to flash block cache objects
2 parents d4ddefe + 4f31759 commit 4e7ffde

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

arch/powerpc/kernel/rtas_flash.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -709,9 +709,9 @@ static int __init rtas_flash_init(void)
709709
if (!rtas_validate_flash_data.buf)
710710
return -ENOMEM;
711711

712-
flash_block_cache = kmem_cache_create("rtas_flash_cache",
713-
RTAS_BLK_SIZE, RTAS_BLK_SIZE, 0,
714-
NULL);
712+
flash_block_cache = kmem_cache_create_usercopy("rtas_flash_cache",
713+
RTAS_BLK_SIZE, RTAS_BLK_SIZE,
714+
0, 0, RTAS_BLK_SIZE, NULL);
715715
if (!flash_block_cache) {
716716
printk(KERN_ERR "%s: failed to create block cache\n",
717717
__func__);

0 commit comments

Comments
 (0)