The patch titled Subject: ipcshm-move-bug_on-check-into-shm_lock-fix has been added to the -mm tree. Its filename is ipcshm-move-bug_on-check-into-shm_lock-fix.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/ipcshm-move-bug_on-check-into-shm_lock-fix.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/ipcshm-move-bug_on-check-into-shm_lock-fix.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> Subject: ipcshm-move-bug_on-check-into-shm_lock-fix simplify code Cc: Davidlohr Bueso <dave@xxxxxxxxxxxx> Cc: Davidlohr Bueso <dbueso@xxxxxxx> Cc: Manfred Spraul <manfred@xxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- ipc/shm.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff -puN ipc/shm.c~ipcshm-move-bug_on-check-into-shm_lock-fix ipc/shm.c --- a/ipc/shm.c~ipcshm-move-bug_on-check-into-shm_lock-fix +++ a/ipc/shm.c @@ -155,14 +155,11 @@ static inline struct shmid_kernel *shm_l { struct kern_ipc_perm *ipcp = ipc_lock(&shm_ids(ns), id); - if (IS_ERR(ipcp)) { - /* - * We raced in the idr lookup or with shm_destroy(), - * either way, the ID is busted. - */ - BUG(); - return (struct shmid_kernel *)ipcp; - } + /* + * We raced in the idr lookup or with shm_destroy(). Either way, the + * ID is busted. + */ + BUG_ON(IS_ERR(ipcp)); return container_of(ipcp, struct shmid_kernel, shm_perm); } _ Patches currently in -mm which might be from akpm@xxxxxxxxxxxxxxxxxxxx are arch-alpha-kernel-systblss-remove-debug-check.patch ocfs2-reduce-object-size-of-mlog-uses-fix.patch ocfs2-remove-__mlog_cpu_guess.patch ocfs2-remove-__mlog_cpu_guess-fix.patch ocfs2-fix-null-pointer-dereference-in-function-ocfs2_abort_trigger-fix.patch mm.patch mm-slab_common-support-the-slub_debug-boot-option-on-specific-object-size-fix.patch slub-bulk-allocation-from-per-cpu-partial-pages-fix.patch mm-fix-mprotect-behaviour-on-vm_locked-vmas-fix.patch mm-new-mm-hook-framework.patch mm-meminit-inline-some-helper-functions-fix.patch mm-meminit-finish-initialisation-of-struct-pages-before-basic-setup-fix.patch mm-memory-failure-introduce-get_hwpoison_page-for-consistent-refcount-handling-fix.patch rmap-fix-theoretical-race-between-do_wp_page-and-shrink_active_list-fix.patch rmap-fix-theoretical-race-between-do_wp_page-and-shrink_active_list-fix-fix.patch userfaultfd-change-the-read-api-to-return-a-uffd_msg-fix-2.patch userfaultfd-change-the-read-api-to-return-a-uffd_msg-fix-2-fix.patch userfaultfd-avoid-mmap_sem-read-recursion-in-mcopy_atomic-fix.patch fs-userfaultfdc-work-around-i386-build-error.patch hugetlb-do-not-account-hugetlb-pages-as-nr_file_pages-fix.patch mm-do-not-ignore-mapping_gfp_mask-in-page-cache-allocation-paths-checkpatch-fixes.patch oom-split-out-forced-oom-killer-checkpatch-fixes.patch include-linux-page-flagsh-rename-macros-to-avoid-collisions.patch mm-vmscan-fix-the-page-state-calculation-in-too_many_isolated.patch x86-add-pmd_-for-thp-fix.patch sparc-add-pmd_-for-thp-fix.patch mm-support-madvisemadv_free-fix-2.patch mm-dont-split-thp-page-when-syscall-is-called-fix-3.patch mm-move-lazy-free-pages-to-inactive-list-fix-fix.patch mm-move-lazy-free-pages-to-inactive-list-fix-fix-fix.patch zswap-runtime-enable-disable-fix.patch prctl-more-prctlpr_set_mm_-checks-fix.patch proc-fix-page_size-limit-of-proc-pid-cmdline-fix.patch bitmap-remove-explicit-newline-handling-using-scnprintf-format-string-fix.patch radix-tree-replace-preallocated-node-array-with-linked-list-fix.patch init-do_mounts-add-create_dev-failure-log-fix.patch rtc-omap-add-external-32k-clock-feature-fix.patch devpts-if-initialization-failed-dont-crash-when-opening-dev-ptmx-fix.patch ipcshm-move-bug_on-check-into-shm_lock-fix.patch scsi-resolve-sg-buffer-const-ness-issue-fix.patch revert-x86-mm-enable-deferred-struct-page-initialisation-on-x86-64.patch linux-next.patch reapply-x86-mm-enable-deferred-struct-page-initialisation-on-x86-64.patch linux-next-rejects.patch drivers-block-nvme-corec-fix-build-with-gcc-444.patch drivers-gpu-drm-i915-intel_spritec-fix-build.patch drivers-gpu-drm-i915-intel_tvc-fix-build.patch do_shared_fault-check-that-mmap_sem-is-held.patch journal_add_journal_head-debug.patch journal_add_journal_head-debug-fix.patch kernel-forkc-export-kernel_thread-to-modules.patch mutex-subsystem-synchro-test-module.patch slab-leaks3-default-y.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