The patch titled ipc/sem.c: bugfix for incorrect setting of sem_otime has been added to the -mm tree. Its filename is ipc-semc-move-wake_up_process-out-of-the-spinlock-section-bugfix-for-incorrect-setting-of-sem_otime.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 *** See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: ipc/sem.c: bugfix for incorrect setting of sem_otime From: Manfred Spraul <manfred@xxxxxxxxxxxxxxxx> The attached patch corrects a bug that I've introduced with the previous patch series: sem_otime is the time of the last successful semop() call. Signed-off-by: Manfred Spraul <manfred@xxxxxxxxxxxxxxxx> Cc: Chris Mason <chris.mason@xxxxxxxxxx> Cc: Jens Axboe <jens.axboe@xxxxxxxxxx> Cc: Manfred Spraul <manfred@xxxxxxxxxxxxxxxx> Cc: Nick Piggin <npiggin@xxxxxxx> Cc: Zach Brown <zach.brown@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- ipc/sem.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff -puN ipc/sem.c~ipc-semc-move-wake_up_process-out-of-the-spinlock-section-bugfix-for-incorrect-setting-of-sem_otime ipc/sem.c --- a/ipc/sem.c~ipc-semc-move-wake_up_process-out-of-the-spinlock-section-bugfix-for-incorrect-setting-of-sem_otime +++ a/ipc/sem.c @@ -534,7 +534,7 @@ static int check_restart(struct sem_arra * must be set to -1. * The tasks that must be woken up are added to @pt. The return code * is stored in q->pid. - * The function return 1 if at least one array variable was modified. + * The function return 1 if at least one semop was completed successfully. */ static int update_queue(struct sem_array *sma, int semnum, struct list_head *pt) { @@ -542,7 +542,7 @@ static int update_queue(struct sem_array struct list_head *walk; struct list_head *pending_list; int offset; - int retval = 0; + int semop_completed = 0; /* if there are complex operations around, then knowing the semaphore * that was modified doesn't help us. Assume that multiple semaphores @@ -586,19 +586,19 @@ again: continue; unlink_queue(sma, q); - if (q->alter) - retval = 1; - if (error) + if (error) { restart = 0; - else + } else { + semop_completed = 1; restart = check_restart(sma, q); + } wake_up_sem_queue_prepare(pt, q, error); if (restart) goto again; } - return retval; + return semop_completed; } /** _ Patches currently in -mm which might be from manfred@xxxxxxxxxxxxxxxx are ipc-semc-optimize-update_queue-for-bulk-wakeup-calls.patch ipc-semc-optimize-update_queue-for-bulk-wakeup-calls-fix.patch ipc-semc-move-wake_up_process-out-of-the-spinlock-section.patch ipc-semc-move-wake_up_process-out-of-the-spinlock-section-fix.patch ipc-semc-move-wake_up_process-out-of-the-spinlock-section-fix-2.patch ipc-semc-move-wake_up_process-out-of-the-spinlock-section-bugfix-for-incorrect-setting-of-sem_otime.patch ipc-semc-cacheline-align-the-ipc-spinlock-for-semaphores.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