Complete() will be run with interrupt enabled, so change to
spin_lock_irqsave().

Cc: net...@vger.kernel.org
Signed-off-by: Ming Lei <ming....@canonical.com>
---
 drivers/net/usb/rtl8150.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/usb/rtl8150.c b/drivers/net/usb/rtl8150.c
index 6cbdac6..199e0fb 100644
--- a/drivers/net/usb/rtl8150.c
+++ b/drivers/net/usb/rtl8150.c
@@ -372,6 +372,7 @@ static void read_bulk_callback(struct urb *urb)
        u16 rx_stat;
        int status = urb->status;
        int result;
+       unsigned long flags;
 
        dev = urb->context;
        if (!dev)
@@ -413,9 +414,9 @@ static void read_bulk_callback(struct urb *urb)
        netdev->stats.rx_packets++;
        netdev->stats.rx_bytes += pkt_len;
 
-       spin_lock(&dev->rx_pool_lock);
+       spin_lock_irqsave(&dev->rx_pool_lock, flags);
        skb = pull_skb(dev);
-       spin_unlock(&dev->rx_pool_lock);
+       spin_unlock_irqrestore(&dev->rx_pool_lock, flags);
        if (!skb)
                goto resched;
 
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to