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)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Mon, 10 Feb 2014 21:11:23 +0000 (16:11 -0500)
commit208aeaad26586d1ca242139764b70d43fe112324
treed21838d55fc731c90f0f1bd6ecfc399350a27734
parent7387a31d0ed4fe2e6bf1f22a3dac5d0c8a9ff3dd
USB: kaweth.c: use GFP_ATOMIC under spin_lock

commit e4c7f259c5be99dcfc3d98f913590663b0305bf8 upstream.

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: Paul Gortmaker <paul.gortmaker@windriver.com>
drivers/net/usb/kaweth.c