Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mm/memory.c: check return value of ioremap_prot

ioremap_prot() can return NULL which could lead to an oops.

Link: http://lkml.kernel.org/r/1533195441-58594-1-git-send-email-chenjie6@huawei.com
Signed-off-by: chen jie <chenjie6@huawei.com>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Li Zefan <lizefan@huawei.com>
Cc: chenjie <chenjie6@huawei.com>
Cc: Yang Shi <shy828301@gmail.com>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

jie@chenjie6@huwei.com and committed by
Linus Torvalds
24eee1e4 3ca17b1f

+3
+3
mm/memory.c
··· 4395 4395 return -EINVAL; 4396 4396 4397 4397 maddr = ioremap_prot(phys_addr, PAGE_ALIGN(len + offset), prot); 4398 + if (!maddr) 4399 + return -ENOMEM; 4400 + 4398 4401 if (write) 4399 4402 memcpy_toio(maddr + offset, buf, len); 4400 4403 else