The patch titled Subject: ipc, sem: prevent possible deadlock has been added to the -mm tree. Its filename is ipcsem-fine-grained-locking-for-semtimedop-fix-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: Davidlohr Bueso <davidlohr.bueso@xxxxxx> Subject: ipc, sem: prevent possible deadlock In semctl_main(), when cmd == GETALL, we're locking sma->sem_perm.lock (through sem_lock_and_putref), yet after the conditional, we lock it again. Unlock sma right after exiting the conditional. Signed-off-by: Davidlohr Bueso <davidlohr.bueso@xxxxxx> Reviewed-by: Rik van Riel <riel@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- ipc/sem.c | 1 + 1 file changed, 1 insertion(+) diff -puN ipc/sem.c~ipcsem-fine-grained-locking-for-semtimedop-fix-fix ipc/sem.c --- a/ipc/sem.c~ipcsem-fine-grained-locking-for-semtimedop-fix-fix +++ a/ipc/sem.c @@ -1115,6 +1115,7 @@ static int semctl_main(struct ipc_namesp err = -EIDRM; goto out_free; } + sem_unlock(sma, -1); } sem_lock(sma, NULL, -1); _ Patches currently in -mm which might be from davidlohr.bueso@xxxxxx are lib-int_sqrtc-optimize-square-root-algorithm.patch ipc-remove-bogus-lock-comment-for-ipc_checkid.patch ipc-introduce-obtaining-a-lockless-ipc-object.patch ipc-introduce-obtaining-a-lockless-ipc-object-fix.patch ipc-introduce-lockless-pre_down-ipcctl.patch ipcsem-do-not-hold-ipc-lock-more-than-necessary.patch ipcsem-open-code-and-rename-sem_lock.patch ipcsem-open-code-and-rename-sem_lock-fix.patch ipcsem-have-only-one-list-in-struct-sem_queue.patch ipcsem-fine-grained-locking-for-semtimedop.patch ipcsem-fine-grained-locking-for-semtimedop-fix-fix.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