From mboxrd@z Thu Jan 1 00:00:00 1970 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,URIBL_BLOCKED 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 13A55C432C0 for ; Thu, 21 Nov 2019 07:19:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DDB182089D for ; Thu, 21 Nov 2019 07:19:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574320785; bh=EtOqhbUd+cBjPJLUPZqGLf3eKGblDJ13tYq8uP2Ve0s=; h=Subject:To:From:Date:List-ID:From; b=SYWthSW7hqeLLYPH59xMbQHtBWGoyYCBYn84TKUqDy86YQZqPNT8xfwGIJTEZ8oBp LUDZawVJ/JApLA9MqkdrFuQFETgJpfoVVVx+XFSiy1WJJFZS+F7eOl6jHNT8KFBjNp S0ONYXw+05UYw0LQD0N+mBtcGXiAChzjWOLStqYg= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726265AbfKUHTp (ORCPT ); Thu, 21 Nov 2019 02:19:45 -0500 Received: from mail.kernel.org ([198.145.29.99]:34362 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726014AbfKUHTp (ORCPT ); Thu, 21 Nov 2019 02:19:45 -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 0B53020872; Thu, 21 Nov 2019 07:19:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574320784; bh=EtOqhbUd+cBjPJLUPZqGLf3eKGblDJ13tYq8uP2Ve0s=; h=Subject:To:From:Date:From; b=zcBxVaZGYN9cdWj4ZXUecfQWYwKf1dS2xaHRpiRqId9rC5+C81VkLCUMwATL/Tutz P5TBvrKsHtSDzwVV85mlu32UjG8k2ybIdL/8ERqpBxqvqERPtpHhU2HAy9/4V6yvUd 6j/AVjJ0Agn1xAwl1W6k0+d9WP89P0Ygvys+z4Ew= Subject: patch "usb: gadget: configfs: Fix missing spin_lock_init()" added to usb-next To: weiyongjun1@huawei.com, gregkh@linuxfoundation.org, peter.chen@nxp.com, stable@vger.kernel.org From: Date: Thu, 21 Nov 2019 08:19:34 +0100 Message-ID: <1574320774163229@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-next 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 also be merged in the next major kernel release during the merge window. 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