Re: [PATCH] fix missing wakeup in ipc/sem
From: Michael Kerrisk
Date: Fri Dec 10 2004 - 07:43:16 EST
Manfred,
> My patch that removed the spin_lock calls from the tail of
> sys_semtimedop introduced a bug:
> Before my patch was merged, every operation that altered an array called
> update_queue. That call woke up threads that were waiting until a
> semaphore value becomes 0. I've accidentially removed that call.
>
> The attached patch fixes that by modifying update_queue: the function
> now loops internally and wakes up all threads. The patch also removes
> update_queue calls from the error path of sys_semtimedop: failed
> operations do not modify the array, no need to rescan the list of
> waiting threads.
Thanks -- tested on 2.6.10-rc3 and it works for me.
Cheers,
Michael
--
GMX ProMail mit bestem Virenschutz http://www.gmx.net/de/go/mail
+++ Empfehlung der Redaktion +++ Internet Professionell 10/04 +++
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/