Received: by 2002:a05:6358:701b:b0:131:369:b2a3 with SMTP id 27csp484223rwo; Fri, 21 Jul 2023 15:30:30 -0700 (PDT) X-Google-Smtp-Source: APBJJlG9TO7Mam2SGDhlBkjUwX2IbKYL9N/efwolfTCNwu++DKWHRoiwOpeO4KrFHnklS9xwHCzu X-Received: by 2002:a05:6512:6c5:b0:4fb:744e:17db with SMTP id u5-20020a05651206c500b004fb744e17dbmr2174474lff.1.1689978630026; Fri, 21 Jul 2023 15:30:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689978629; cv=none; d=google.com; s=arc-20160816; b=sm441ffcQP1VcV/ZrMLZ6alSTVDrTE0y8hMappyBTr7b+Cq2IJyqPQjSsWys4O8IFF sZjz4A87YOGkWSnh4dKv8bapd08qiY704szleSEaWOHjFG433JthgxTxWoNrPXUFDEZi /QWyQK/EXPv30TzhHEjUTpT5xeCA/s82K2LJES93UMAxZyvUWv03GMUJoOHk7yr9E+6Y vyszw6uNr/xqjtx5vF6kPzwK4JzY5BW5AKAArlxoqXKvAq6DscGV+aQGGO2UQ4lq8mkl s89hg2bILyd81VVQM+AXDdicu2uS9JwIyg6M5foEdDzKdGhRBa0F+wMhLrWe4tOOWjjK tjVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=tpzQujKrNeMySgOd4AKaD3vn7YiaGuDPYWj8a0dl+rs=; fh=7sGJy37o7PPi76Dzob7YnN7Q8zwyySsgIs1xrWxgoTs=; b=Eyj+npGY0SNRnokdl/iDXlB2cAsNQWqwPcqA/SCiNHsn3pDgW/S49oAnV2UVW0gUox RmLpovi5exehmmMJKjHi16SSdQJrkVlpdpK2inKiY4TQsDGxtFX+h7Y23Rz63GnIxhXJ HeptsSdvC1JUsOy1P/KnvZkhiQzMd+gwXvdCKU5+ykhkhJU0M/CDlH5msLRNKSlgiS5Q f7ZbVS6OX6ZgfUHwEpV2R1CUt6X8CAByqtMZP/nqzk6K1AU5PXBCVOQXZyEDLOyT7JP3 9CaUTz/zHsb1kHdOMepf76R032808dlP6GVKxZKuvsZ29sWNgESs27FbQhRdZthz4qM4 YF6Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v17-20020aa7d651000000b005218c27b18csi2834827edr.498.2023.07.21.15.30.06; Fri, 21 Jul 2023 15:30:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230191AbjGUWXE (ORCPT + 99 others); Fri, 21 Jul 2023 18:23:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35050 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230171AbjGUWXD (ORCPT ); Fri, 21 Jul 2023 18:23:03 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1FEC030C0 for ; Fri, 21 Jul 2023 15:23:03 -0700 (PDT) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qMyWZ-00085I-FI; Sat, 22 Jul 2023 00:22:59 +0200 Received: from [2a0a:edc0:0:1101:1d::ac] (helo=dude04.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1qMyWX-001ABj-Qq; Sat, 22 Jul 2023 00:22:57 +0200 Received: from mgr by dude04.red.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1qMyWX-007JbU-1s; Sat, 22 Jul 2023 00:22:57 +0200 From: Michael Grzeschik To: linux-usb@vger.kernel.org Cc: gregkh@linuxfoundation.org, stern@rowland.harvard.edu, linux-kernel@vger.kernel.org, kernel@pengutronix.de Subject: [PATCH] usb: gadget: core: remove unbalanced mutex_unlock in usb_gadget_activate Date: Sat, 22 Jul 2023 00:22:56 +0200 Message-Id: <20230721222256.1743645-1-m.grzeschik@pengutronix.de> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: mgr@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit 286d9975a838 ("usb: gadget: udc: core: Prevent soft_connect_store() race") introduced one extra mutex_unlock of connect_lock in the usb_gadget_active function. Fixes: 286d9975a838 ("usb: gadget: udc: core: Prevent soft_connect_store() race") Signed-off-by: Michael Grzeschik --- drivers/usb/gadget/udc/core.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/gadget/udc/core.c b/drivers/usb/gadget/udc/core.c index 59188ea065e0c9..cd58f2a4e7f34d 100644 --- a/drivers/usb/gadget/udc/core.c +++ b/drivers/usb/gadget/udc/core.c @@ -878,7 +878,6 @@ int usb_gadget_activate(struct usb_gadget *gadget) */ if (gadget->connected) ret = usb_gadget_connect_locked(gadget); - mutex_unlock(&gadget->udc->connect_lock); unlock: mutex_unlock(&gadget->udc->connect_lock); -- 2.39.2