]> www.infradead.org Git - users/jedix/linux-maple.git/commit
USB: kaweth.c: use GFP_ATOMIC under spin_lock
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 27 Jul 2012 01:46:51 +0000 (01:46 +0000)
committerJerry Snitselaar <jerry.snitselaar@oracle.com>
Sun, 7 Oct 2012 06:29:11 +0000 (23:29 -0700)
commit996412ab4dbcf5563aacac1d5d37ee73bf225baf
tree0bec3ad40e3d09fe02f2999f740f0dd93a68456f
parent5bd16127bca5b6d19a94013100dc671ad8b5e18c
USB: kaweth.c: use GFP_ATOMIC under spin_lock

[ Upstream commit e4c7f259c5be99dcfc3d98f913590663b0305bf8 ]

The problem is that we call this with a spin lock held.  The call tree
is:
kaweth_start_xmit() holds kaweth->device_lock.
-> kaweth_async_set_rx_mode()
   -> kaweth_control()
      -> kaweth_internal_control_msg()

The kaweth_internal_control_msg() function is only called from
kaweth_control() which used GFP_ATOMIC for its allocations.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 242e0e14c3995231230b2836bcd1f5dc6c08ff90)

Signed-off-by: Jerry Snitselaar <jerry.snitselaar@oracle.com>
drivers/net/usb/kaweth.c