Oliver Neukum
14a0d635d1
usbnet: include wait queue head in device structure
...
This fixes a race which happens by freeing an object on the stack.
Quoting Julius:
> The issue is
> that it calls usbnet_terminate_urbs() before that, which temporarily
> installs a waitqueue in dev->wait in order to be able to wait on the
> tasklet to run and finish up some queues. The waiting itself looks
> okay, but the access to 'dev->wait' is totally unprotected and can
> race arbitrarily. I think in this case usbnet_bh() managed to succeed
> it's dev->wait check just before usbnet_terminate_urbs() sets it back
> to NULL. The latter then finishes and the waitqueue_t structure on its
> stack gets overwritten by other functions halfway through the
> wake_up() call in usbnet_bh().
The fix is to just not allocate the data structure on the stack.
As dev->wait is abused as a flag it also takes a runtime PM change
to fix this bug.
Signed-off-by: Oliver Neukum <oneukum@suse.de >
Reported-by: Grant Grundler <grundler@google.com >
Tested-by: Grant Grundler <grundler@google.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2014-03-27 14:59:10 -04:00
..
2014-01-30 17:20:32 -08:00
2014-01-30 16:25:49 -08:00
2014-02-17 12:37:09 -08:00
2014-02-19 12:07:55 -07:00
2014-02-06 10:22:56 +01:00
2014-01-24 17:17:30 -08:00
2014-01-25 10:49:30 -08:00
2014-02-19 13:30:30 +00:00
2014-01-25 11:17:34 -08:00
2014-02-13 20:48:02 -08:00
2014-01-26 11:00:41 -08:00
2014-02-05 05:48:43 +00:00
2014-01-31 09:31:14 -08:00
2014-01-31 08:59:46 -08:00
2014-02-11 12:08:27 +00:00
2014-01-24 22:39:54 +01:00
2014-01-30 10:18:43 -08:00
2014-03-27 14:59:10 -04:00
2014-02-28 19:44:55 -08:00
2014-02-05 12:54:53 -08:00
2014-02-11 08:40:45 -07:00
2014-02-21 08:58:49 -08:00
2014-02-14 10:45:18 -08:00
2014-01-30 16:56:54 -08:00
2014-01-23 16:36:56 -08:00
2014-02-11 10:38:30 -05:00
2014-01-30 17:07:18 -08:00
2014-01-21 20:18:26 -08:00
2014-01-21 16:19:48 -08:00
2014-02-01 10:43:45 -08:00
2014-02-13 12:34:05 +01:00
2014-01-23 18:11:00 -08:00
2014-01-23 18:11:00 -08:00
2014-02-13 10:08:52 +05:30
2014-01-21 16:19:41 -08:00
2014-01-29 20:27:23 -08:00
2014-01-25 03:14:36 -05:00
2014-03-10 11:44:42 -04:00
2014-01-21 18:57:43 -08:00
2014-03-07 10:19:57 -05:00
2014-01-21 23:17:20 -08:00
2014-03-10 11:44:42 -04:00
2014-02-25 11:18:06 +01:00
2014-03-20 13:21:05 -04:00
2014-01-23 16:36:52 -08:00
2014-03-10 17:26:19 -07:00
2014-03-04 07:55:47 -08:00
2014-01-23 16:36:50 -08:00
2014-01-23 16:36:50 -08:00
2014-02-07 08:27:34 -08:00
2014-01-29 20:40:08 +01:00
2014-01-26 22:48:35 +01:00
2014-01-23 18:08:10 -08:00
2014-02-09 15:27:21 +01:00
2014-02-25 15:25:45 -08:00
2014-01-27 21:02:39 -08:00
2014-01-25 11:17:34 -08:00
2014-02-25 07:37:52 -08:00
2014-01-23 16:37:03 -08:00
2014-01-25 08:55:09 +01:00
2014-01-21 16:19:45 -08:00
2014-01-27 21:45:29 +01:00
2014-01-23 16:36:51 -08:00
2014-01-23 16:36:51 -08:00
2014-01-21 16:19:44 -08:00
2014-01-21 16:19:49 -08:00
2014-03-04 07:55:50 -08:00
2014-01-21 16:19:44 -08:00
2014-01-23 16:36:50 -08:00
2014-03-10 17:26:19 -07:00
2014-01-27 21:02:39 -08:00
2014-02-17 00:36:34 -05:00
2014-01-31 15:39:07 -08:00
2014-03-01 13:51:53 -06:00
2014-01-25 03:14:05 -05:00
2014-01-27 19:27:53 -05:00
2014-02-05 10:04:37 -06:00
2014-02-05 09:51:54 -06:00
2014-02-06 13:48:51 -08:00
2014-01-23 16:36:50 -08:00
2014-01-23 16:36:55 -08:00
2014-02-13 10:48:02 -07:00
2014-01-23 20:17:18 +00:00
2014-01-23 16:36:50 -08:00
2014-01-22 19:36:57 +01:00
2014-01-25 23:58:17 -05:00
2014-01-28 08:38:04 -08:00
2014-01-23 14:48:35 +01:00
2014-01-25 11:17:34 -08:00
2014-01-23 16:36:58 -08:00
2014-01-21 23:17:20 -08:00
2014-01-28 08:38:04 -08:00
2014-01-21 23:17:20 -08:00
2014-03-20 22:09:09 -07:00
2014-01-28 13:20:09 -08:00
2014-02-05 12:54:53 -08:00
2014-03-10 08:30:02 +01:00
2014-01-23 13:02:36 +01:00
2014-01-27 21:02:39 -08:00
2014-02-19 13:12:53 -05:00
2014-01-25 11:17:34 -08:00
2014-03-10 17:26:19 -07:00
2014-02-10 16:01:42 -08:00
2014-01-22 21:57:05 -08:00
2014-01-27 21:02:40 -08:00
2014-01-21 08:28:07 +00:00
2014-01-21 17:05:27 -08:00
2014-02-21 21:27:10 +01:00
2014-03-03 21:11:05 -05:00
2014-01-20 16:13:02 -08:00
2014-02-07 14:30:03 -08:00
2014-01-25 09:10:41 +01:00
2014-02-07 11:27:30 -08:00
2014-01-23 16:37:04 -08:00
2014-01-22 10:25:39 +01:00
2014-02-14 09:05:39 -05:00
2014-02-22 02:02:28 +01:00
2014-01-30 16:56:55 -08:00