From patchwork Thu Jul 11 09:05:52 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 2826100 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id ACE0B9F756 for ; Thu, 11 Jul 2013 09:10:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 947252010E for ; Thu, 11 Jul 2013 09:10:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 736D020107 for ; Thu, 11 Jul 2013 09:10:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932395Ab3GKJKd (ORCPT ); Thu, 11 Jul 2013 05:10:33 -0400 Received: from mail-pd0-f182.google.com ([209.85.192.182]:64930 "EHLO mail-pd0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932278Ab3GKJK3 (ORCPT ); Thu, 11 Jul 2013 05:10:29 -0400 Received: by mail-pd0-f182.google.com with SMTP id r10so7288069pdi.13 for ; Thu, 11 Jul 2013 02:10:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=dmkQRBr5599Ez/npwUTrR1UYBpC7kec2+pkQkfDr6aU=; b=ODUlmflvggJO7aE6pGdh/34weRq1imnwEsy9qVCt7sw1je5ZvuFPfVASWF1oSkIm8R +Bh7MU3VkrmETuhXpYSpjyDpKip/0xfdMrxqZrovYXTprX1IWaqJfbIrxa8C9GIySftR lkef6Uc6HMStxFRsMwyhYZq+Soezlt0YulOCrKPLyn4Q5vq4iXWCx9usWTVAXpJ6tXhQ 1D5+w4hZQVRn8AV3z3W7vtC+SuX+8luBsyeUIdxmsxijpQllglogawvQV88PPG/xTyxo wvwzNNmNZF/Obg0qmaEemw845Tr91NyiWX46hXpHu7iKKz+fhXiLwen9dK9XftXdYCd1 Fm4Q== X-Received: by 10.68.101.34 with SMTP id fd2mr36122808pbb.137.1373533829212; Thu, 11 Jul 2013 02:10:29 -0700 (PDT) Received: from localhost ([183.37.203.123]) by mx.google.com with ESMTPSA id eq5sm38660249pbc.15.2013.07.11.02.10.24 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 11 Jul 2013 02:10:28 -0700 (PDT) From: Ming Lei To: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org, Oliver Neukum , Alan Stern , linux-input@vger.kernel.org, linux-bluetooth@vger.kernel.org, netdev@vger.kernel.org, linux-wireless@vger.kernel.org, linux-media@vger.kernel.org, alsa-devel@alsa-project.org, Ming Lei Subject: [PATCH 29/50] USBNET: rtl8150: spin_lock in complete() cleanup Date: Thu, 11 Jul 2013 17:05:52 +0800 Message-Id: <1373533573-12272-30-git-send-email-ming.lei@canonical.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1373533573-12272-1-git-send-email-ming.lei@canonical.com> References: <1373533573-12272-1-git-send-email-ming.lei@canonical.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Complete() will be run with interrupt enabled, so change to spin_lock_irqsave(). Cc: netdev@vger.kernel.org Signed-off-by: Ming Lei --- 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;