The patch titled Subject: mm/fremap.c: fix oops on error path has been removed from the -mm tree. Its filename was mm-fremapc-fix-oops-on-error-path.patch This patch was dropped because it was merged into mainline or a subsystem tree ------------------------------------------------------ From: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> Subject: mm/fremap.c: fix oops on error path If find_vma() fails, sys_remap_file_pages() will dereference `vma', which contains NULL. Fix it by checking the pointer. (We could alternatively check for err==0, but this seems more direct) (The vm_flags change is to squish a bogus used-uninitialised warning without adding extra code). Reported-by: Tommi Rantala <tt.rantala@xxxxxxxxx> Cc: Michel Lespinasse <walken@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/fremap.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff -puN mm/fremap.c~mm-fremapc-fix-oops-on-error-path mm/fremap.c --- a/mm/fremap.c~mm-fremapc-fix-oops-on-error-path +++ a/mm/fremap.c @@ -163,7 +163,8 @@ SYSCALL_DEFINE5(remap_file_pages, unsign * and that the remapped range is valid and fully within * the single existing vma. */ - if (!vma || !(vma->vm_flags & VM_SHARED)) + vm_flags = vma->vm_flags; + if (!vma || !(vm_flags & VM_SHARED)) goto out; if (!vma->vm_ops || !vma->vm_ops->remap_pages) @@ -254,7 +255,8 @@ get_write_lock: */ out: - vm_flags = vma->vm_flags; + if (vma) + vm_flags = vma->vm_flags; if (likely(!has_write_lock)) up_read(&mm->mmap_sem); else _ Patches currently in -mm which might be from akpm@xxxxxxxxxxxxxxxxxxxx are origin.patch linux-next.patch arch-alpha-kernel-systblss-remove-debug-check.patch i-need-old-gcc.patch timer_list-convert-timer-list-to-be-a-proper-seq_file.patch timer_list-convert-timer-list-to-be-a-proper-seq_file-v3-fix.patch mm.patch mm-shmemc-remove-an-ifdef.patch xen-tmem-enable-xen-tmem-shim-to-be-built-loaded-as-a-module-fix.patch memcg-relax-memcg-iter-caching-checkpatch-fixes.patch include-linux-mmzoneh-cleanups.patch include-linux-mmzoneh-cleanups-fix.patch drop_caches-add-some-documentation-and-info-messsge.patch memcg-debugging-facility-to-access-dangling-memcgs-fix.patch kernel-smpc-cleanups.patch get_maintainer-use-filename-only-regex-match-for-tegra-fix.patch epoll-trim-epitem-by-one-cache-line-on-x86_64-fix.patch binfmt_elfc-use-get_random_int-to-fix-entropy-depleting.patch rtc-ds1307-long-block-operations-bugfix.patch hfsplus-fix-warnings-in-fs-hfsplus-bfindc-in-function-hfs_find_1st_rec_by_cnid-fix.patch usermodehelper-export-_exec-and-_setup-functions-fix.patch kexec-use-min_t-to-simplify-logic-fix.patch kernel-pidc-improve-flow-of-a-loop-inside-alloc_pidmap-fix.patch pid_namespacec-h-simplify-defines-fix.patch drivers-net-rename-random32-to-prandom_u32-fix.patch aio-kiocb_cancel-fix.patch wait-add-wait_event_hrtimeout-fix.patch aio-use-cancellation-list-lazily-fix-fix.patch aio-give-shared-kioctx-fields-their-own-cachelines-fix.patch generic-dynamic-per-cpu-refcounting-fix.patch generic-dynamic-per-cpu-refcounting-sparse-fixes-fix.patch generic-dynamic-per-cpu-refcounting-doc-fix.patch aio-dont-include-aioh-in-schedh-fix.patch aio-dont-include-aioh-in-schedh-fix-fix.patch aio-dont-include-aioh-in-schedh-fix-3.patch aio-dont-include-aioh-in-schedh-fix-3-fix.patch aio-dont-include-aioh-in-schedh-fix-3-fix-fix.patch aio-kill-ki_retry-fix.patch block-aio-batch-completion-for-bios-kiocbs-fix.patch block-aio-batch-completion-for-bios-kiocbs-fix-fix.patch block-aio-batch-completion-for-bios-kiocbs-fix-fix-fix.patch block-aio-batch-completion-for-bios-kiocbs-fix-fix-fix-fix-fix-fix.patch debugging-keep-track-of-page-owners-fix-2-fix.patch debugging-keep-track-of-page-owners-fix-2-fix-fix-fix.patch journal_add_journal_head-debug.patch kernel-forkc-export-kernel_thread-to-modules.patch mutex-subsystem-synchro-test-module.patch slab-leaks3-default-y.patch put_bh-debug.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html