Thread (1 message) 1 message, 1 author, 2012-10-10

Re: [PATCH 12/12] usbnet: make device out of suspend before calling usbnet_read/write_cmd

From: Oliver Neukum <hidden>
Date: 2012-10-10 05:34:48

On Wednesday 10 October 2012 10:33:17 Ming Lei wrote:
On Tue, Oct 9, 2012 at 4:50 PM, Oliver Neukum [off-list ref] wrote:
quoted
This is awkward to use in suspend()/resume()
Could you make both versions available?
Good catch, thanks for your review.

As far as I can think of, the mutex_is_locked() trick can solve the problem.
No, you cannot do this. It introduces a race. The check for mutex_is_locked()
can be positive because the device is being suspended and the IO would
be done when it is too late.
Please don't try to be fancy here, just export two versions of each call.

	Regards
		Oliver

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help