Subject: + ipc-sem-separate-wait-for-zero-and-alter-tasks-into-seperate-queues-fix.patch added to -mm tree To: manfred@xxxxxxxxxxxxxxxx,davidlohr.bueso@xxxxxx,riel@xxxxxxxxxx From: akpm@xxxxxxxxxxxxxxxxxxxx Date: Tue, 18 Jun 2013 14:05:26 -0700 The patch titled Subject: ipc/sem.c: scan complex wait-for-zero after undefined updates has been added to the -mm tree. Its filename is ipc-sem-separate-wait-for-zero-and-alter-tasks-into-seperate-queues-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: Manfred Spraul <manfred@xxxxxxxxxxxxxxxx> Subject: ipc/sem.c: scan complex wait-for-zero after undefined updates After an update of a semaphore array that does not use struct sembuf, complex wait-for-zero operations were not checked if they are able to proceed. Signed-off-by: Manfred Spraul <manfred@xxxxxxxxxxxxxxxx> Cc: Rik van Riel <riel@xxxxxxxxxx> Cc: Davidlohr Bueso <davidlohr.bueso@xxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- ipc/sem.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff -puN ipc/sem.c~ipc-sem-separate-wait-for-zero-and-alter-tasks-into-seperate-queues-fix ipc/sem.c --- a/ipc/sem.c~ipc-sem-separate-wait-for-zero-and-alter-tasks-into-seperate-queues-fix +++ a/ipc/sem.c @@ -726,8 +726,10 @@ static int do_smart_wakeup_zero(struct s * Assume all were changed. */ for (i = 0; i < sma->sem_nsems; i++) { - if (sma->sem_base[i].semval == 0) + if (sma->sem_base[i].semval == 0) { + got_zero = 1; semop_completed |= wake_const_ops(sma, i, pt); + } } } /* _ Patches currently in -mm which might be from manfred@xxxxxxxxxxxxxxxx are ipc-utilc-ipc_rcu_alloc-cacheline-align-allocation.patch ipc-utilc-ipc_rcu_alloc-cacheline-align-allocation-checkpatch-fixes.patch ipc-semc-cacheline-align-the-semaphore-structures.patch ipc-sem-separate-wait-for-zero-and-alter-tasks-into-seperate-queues.patch ipc-sem-separate-wait-for-zero-and-alter-tasks-into-seperate-queues-fix.patch ipc-semc-always-use-only-one-queue-for-alter-operations.patch ipc-semc-replace-shared-sem_otime-with-per-semaphore-value.patch ipc-semc-rename-try_atomic_semop-to-perform_atomic_semop-docu-update.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