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=-2.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, USER_AGENT_MUTT 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 C4758C43381 for ; Mon, 1 Apr 2019 11:33:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 83A022086C for ; Mon, 1 Apr 2019 11:33:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1554118435; bh=64Snw/0XJM432wQKFy+gEDq8RPNsBJ1OYok+zLwvUvk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=WCAI8nhNU5ZCc0cxuYIC6malo0kecEx9xYHeHkG/5l9vpVgpMlUaoFXEYqvynkJmD SEloKCCYTqxBtas7snya4Eid0whkzt1hK3LGxCTfhCpbycs0bu2QgeA2X97QE5lpLk 9z6tlASnhWQV200ZTHInuXT5BgJWbSBrk5dlr+iQ= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726411AbfDALdz (ORCPT ); Mon, 1 Apr 2019 07:33:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:35382 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725882AbfDALdz (ORCPT ); Mon, 1 Apr 2019 07:33:55 -0400 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 E24852084B; Mon, 1 Apr 2019 11:33:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1554118434; bh=64Snw/0XJM432wQKFy+gEDq8RPNsBJ1OYok+zLwvUvk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=p+UMQwdAPZH8Zpjh+Ag/btwiX65Nc6JiZhsos6JZfKPfeuiyY19ANLt9JGiAIrGeX E/Tf/9ZvbieWVCnpgKrTAqKa7EkiG9DFL97VduARB+mU2YWpWKUUy3/0Jjv7kvChJn NPpD4oeSjnY+ZIWAV0GAHS5w456lVH6Xu8Cb6snc= Date: Mon, 1 Apr 2019 13:33:51 +0200 From: "gregkh@linuxfoundation.org" To: Radoslav Gerganov Cc: "james.bottomley@hansenpartnership.com" , "felipe.balbi@linux.intel.com" , "stable@vger.kernel.org" Subject: Re: [PATCH] USB: gadget: f_hid: fix deadlock in f_hidg_write() Message-ID: <20190401113351.GA8156@kroah.com> References: <1554115994-6957-1-git-send-email-rgerganov@vmware.com> <96690845-0a1f-ed63-cab8-c3b683d6fd38@vmware.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <96690845-0a1f-ed63-cab8-c3b683d6fd38@vmware.com> User-Agent: Mutt/1.11.4 (2019-03-13) Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Mon, Apr 01, 2019 at 10:58:57AM +0000, Radoslav Gerganov wrote: > On 1.04.2019 13:54, Radoslav Gerganov wrote: > > commit 072684e8c58d17e853f8e8b9f6d9ce2e58d2b036 upstream. > > > > In f_hidg_write() the write_spinlock is acquired before calling > > usb_ep_queue() which causes a deadlock when dummy_hcd is being used. > > This is because dummy_queue() callbacks into f_hidg_req_complete() which > > tries to acquire the same spinlock. This is (part of) the backtrace when > > the deadlock occurs: > > > > This is the backport of commit 072684e8c to the stable 4.9 branch. > I missed to point that in the subject line, sorry. Not a problem at all, thanks for the backport, now queued up. greg k-h