lkml.org 
[lkml]   [2012]   [Aug]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[ 36/49] USB: kaweth.c: use GFP_ATOMIC under spin_lock
    Date
    From: Greg KH <gregkh@linuxfoundation.org>

    3.0-stable review patch. If anyone has any objections, please let me know.

    ------------------


    From: Dan Carpenter <dan.carpenter@oracle.com>

    [ 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>
    ---
    drivers/net/usb/kaweth.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    --- a/drivers/net/usb/kaweth.c
    +++ b/drivers/net/usb/kaweth.c
    @@ -1308,7 +1308,7 @@ static int kaweth_internal_control_msg(s
    int retv;
    int length = 0; /* shut up GCC */

    - urb = usb_alloc_urb(0, GFP_NOIO);
    + urb = usb_alloc_urb(0, GFP_ATOMIC);
    if (!urb)
    return -ENOMEM;




    \
     
     \ /
      Last update: 2012-08-08 01:42    [W:4.703 / U:0.544 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site