From patchwork Thu Jul 11 09:05:37 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 2826196 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 7BBD09F756 for ; Thu, 11 Jul 2013 09:17:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A8A4B200D0 for ; Thu, 11 Jul 2013 09:17:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6A4D920134 for ; Thu, 11 Jul 2013 09:17:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932196Ab3GKJIg (ORCPT ); Thu, 11 Jul 2013 05:08:36 -0400 Received: from mail-pd0-f173.google.com ([209.85.192.173]:62826 "EHLO mail-pd0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932187Ab3GKJIa (ORCPT ); Thu, 11 Jul 2013 05:08:30 -0400 Received: by mail-pd0-f173.google.com with SMTP id v14so7289065pde.32 for ; Thu, 11 Jul 2013 02:08: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=yIoIah2lKtomusEGojdOn1FrA9OgB2ypa6EQxInBfPs=; b=T30WfPaDg75k6KoWGBDDCOqZE/uL8tNWkSrGJVh22rF0roc5koHu5TSl/Ct0BNTxPk oUzH6V1/ag+A9ph3N/kdLDEq2HC6zotaKuL+Kwt9NSJo5hF/S2fVpssJoNSeDA+DASwd TgwDAz0ypwaSzlZmtOPpPJIaKePyNaE20sDmuD8v5I5YPQV5+/Hjzok39u0h4u9R7klb tPFpFBilqTfWYS9vjrNtLGYbYouXAyO4se4J7s3Nh/7gBeuHUYcv6bPWQI4QgYL9nV28 N2sOLjlMO8yo016udbxK/2MB5g8PdelGRpL3ky2Nuq9ILqnH7tfldHTRmLMQn1qtBUVO QzUQ== X-Received: by 10.68.203.105 with SMTP id kp9mr16855040pbc.78.1373533709651; Thu, 11 Jul 2013 02:08:29 -0700 (PDT) Received: from localhost ([183.37.203.123]) by mx.google.com with ESMTPSA id ot4sm41048856pac.17.2013.07.11.02.08.25 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 11 Jul 2013 02:08: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 , Johan Hovold Subject: [PATCH 14/50] USB: serial: mos7720: spin_lock in complete() cleanup Date: Thu, 11 Jul 2013 17:05:37 +0800 Message-Id: <1373533573-12272-15-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: Johan Hovold Signed-off-by: Ming Lei --- drivers/usb/serial/mos7720.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/usb/serial/mos7720.c b/drivers/usb/serial/mos7720.c index 51da424..9b8c866 100644 --- a/drivers/usb/serial/mos7720.c +++ b/drivers/usb/serial/mos7720.c @@ -338,14 +338,15 @@ static void async_complete(struct urb *urb) { struct urbtracker *urbtrack = urb->context; int status = urb->status; + unsigned long flags; if (unlikely(status)) dev_dbg(&urb->dev->dev, "%s - nonzero urb status received: %d\n", __func__, status); /* remove the urbtracker from the active_urbs list */ - spin_lock(&urbtrack->mos_parport->listlock); + spin_lock_irqsave(&urbtrack->mos_parport->listlock, flags); list_del(&urbtrack->urblist_entry); - spin_unlock(&urbtrack->mos_parport->listlock); + spin_unlock_irqrestore(&urbtrack->mos_parport->listlock, flags); kref_put(&urbtrack->ref_count, destroy_urbtracker); }