Re: [linux-usb-devel] [PATCH]race in ati_remote and small cleanup

2004-03-18 Thread Oliver Neukum
Am Thursday 18 March 2004 17:27 schrieb Stephen Hemminger: > On Thu, 18 Mar 2004 16:44:39 +0100 > Oliver Neukum <[EMAIL PROTECTED]> wrote: > > > Hi, > > > > you must use set_current_state() only after usb_submit_urb() with GFP_KERNEL > > as second argument, because it may sleep to allocate memory

Re: [linux-usb-devel] [PATCH]race in ati_remote and small cleanup

2004-03-18 Thread Stephen Hemminger
On Thu, 18 Mar 2004 16:44:39 +0100 Oliver Neukum <[EMAIL PROTECTED]> wrote: > Hi, > > you must use set_current_state() only after usb_submit_urb() with GFP_KERNEL > as second argument, because it may sleep to allocate memory and is woken up > resetting the state to TASK_RUNNING. In that case you

[linux-usb-devel] [PATCH]race in ati_remote and small cleanup

2004-03-18 Thread Oliver Neukum
Hi, you must use set_current_state() only after usb_submit_urb() with GFP_KERNEL as second argument, because it may sleep to allocate memory and is woken up resetting the state to TASK_RUNNING. In that case you had a busy polling loop. Furthermore, always use wake_up unconditionally. It checkes an