]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - arch/um/kernel/trap.c
Merge branch 'for-linus-4.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git...
[karo-tx-linux.git] / arch / um / kernel / trap.c
index 47ff9b7f3e5d39d8a05e088b1308568836d4e332..557232f758b61efe00462df9766f5a16e08ebbd3 100644 (file)
@@ -220,6 +220,11 @@ unsigned long segv(struct faultinfo fi, unsigned long ip, int is_user,
                show_regs(container_of(regs, struct pt_regs, regs));
                panic("Segfault with no mm");
        }
+       else if (!is_user && address < TASK_SIZE) {
+               show_regs(container_of(regs, struct pt_regs, regs));
+               panic("Kernel tried to access user memory at addr 0x%lx, ip 0x%lx",
+                      address, ip);
+       }
 
        if (SEGV_IS_FIXABLE(&fi))
                err = handle_page_fault(address, ip, is_write, is_user,