Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 222BBC432C0 for ; Wed, 20 Nov 2019 19:49:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E938E20714 for ; Wed, 20 Nov 2019 19:49:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574279344; bh=4Yylve0XKqwFQhuvCSg6udFvsnwxRrhTvVcTVcXMVhM=; h=Subject:To:From:Date:List-ID:From; b=vwAuw4+vrO0hE+We1G5DnBYIC5YK+OIq0Asb9Qp63fuIVQLsxK6ZUECty2+B1G+9W fjdsXzaaVO3GC0vaihg9O7yQ2gpKoXhESYbOmhSqgxSTE2g7mnEIo7LNm2JUKxuwI+ ZW40q6SRXNonY4M2BzOurigbepesA4hMqhhAPgNc= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727179AbfKTTtD (ORCPT ); Wed, 20 Nov 2019 14:49:03 -0500 Received: from mail.kernel.org ([198.145.29.99]:36990 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726623AbfKTTtD (ORCPT ); Wed, 20 Nov 2019 14:49:03 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4341C20679; Wed, 20 Nov 2019 19:49:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574279342; bh=4Yylve0XKqwFQhuvCSg6udFvsnwxRrhTvVcTVcXMVhM=; h=Subject:To:From:Date:From; b=lWfMSqU7iTNHovNREiemZiaYvgBvcTLHUZ9AEqDJd3L3fRV93goR+CbrD2rgwIrez 0fmWVzLxDJ9zLDov9U/Vue1PJ8/bzh5uOq+8SpYObO7/y2WyEPDLhSZTCh5pXdbvh6 qx8ML5kvSaEN9xhqqRqdC+VGih34iPsNsN/3TJcU= Subject: patch "usb: gadget: configfs: Fix missing spin_lock_init()" added to usb-testing To: weiyongjun1@huawei.com, gregkh@linuxfoundation.org, peter.chen@nxp.com, stable@vger.kernel.org From: Date: Wed, 20 Nov 2019 20:49:00 +0100 Message-ID: <157427934022834@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org This is a note to let you know that I've just added the patch titled usb: gadget: configfs: Fix missing spin_lock_init() to my usb git tree which can be found at git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git in the usb-testing branch. The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.) The patch will be merged to the usb-next branch sometime soon, after it passes testing, and the merge window is open. If you have any questions about this process, please let me know. From 093edc2baad2c258b1f55d1ab9c63c2b5ae67e42 Mon Sep 17 00:00:00 2001 From: Wei Yongjun Date: Wed, 30 Oct 2019 03:40:46 +0000 Subject: usb: gadget: configfs: Fix missing spin_lock_init() The driver allocates the spinlock but not initialize it. Use spin_lock_init() on it to initialize it correctly. This is detected by Coccinelle semantic patch. Fixes: 1a1c851bbd70 ("usb: gadget: configfs: fix concurrent issue between composite APIs") Signed-off-by: Wei Yongjun Cc: stable Reviewed-by: Peter Chen Link: https://lore.kernel.org/r/20191030034046.188808-1-weiyongjun1@huawei.com Signed-off-by: Greg Kroah-Hartman --- drivers/usb/gadget/configfs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/gadget/configfs.c b/drivers/usb/gadget/configfs.c index 33852c2b29d1..ab9ac48a751a 100644 --- a/drivers/usb/gadget/configfs.c +++ b/drivers/usb/gadget/configfs.c @@ -1544,6 +1544,7 @@ static struct config_group *gadgets_make( gi->composite.resume = NULL; gi->composite.max_speed = USB_SPEED_SUPER; + spin_lock_init(&gi->spinlock); mutex_init(&gi->lock); INIT_LIST_HEAD(&gi->string_list); INIT_LIST_HEAD(&gi->available_func); -- 2.24.0