Commit c9bd7cbb authored by Johannes Erdfelt's avatar Johannes Erdfelt Committed by Greg Kroah-Hartman

[PATCH] Re: removing sleep_on in hub.c

On Mon, Apr 08, 2002, Oliver Neukum <oliver@neukum.org> wrote:
> using sleep_on is a race. The attached patch replaces it with the
> new wait_event macro from sched.h. The patch is against the 2.5
> from Greg.

Greg, I've tested this against 2.4.19-pre6 as well and the attached
patch is relative to that.

Please apply.

Thank Oliver!
parent 4daab117
...@@ -964,7 +964,7 @@ static int usb_hub_thread(void *__hub) ...@@ -964,7 +964,7 @@ static int usb_hub_thread(void *__hub)
/* Send me a signal to get me die (for debugging) */ /* Send me a signal to get me die (for debugging) */
do { do {
usb_hub_events(); usb_hub_events();
interruptible_sleep_on(&khubd_wait); wait_event_interruptible(khubd_wait, !list_empty(&hub_event_list));
} while (!signal_pending(current)); } while (!signal_pending(current));
dbg("usb_hub_thread exiting"); dbg("usb_hub_thread exiting");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment