From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753111AbbLKULU (ORCPT ); Fri, 11 Dec 2015 15:11:20 -0500 Received: from zeniv.linux.org.uk ([195.92.253.2]:41453 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752133AbbLKULT (ORCPT ); Fri, 11 Dec 2015 15:11:19 -0500 Date: Fri, 11 Dec 2015 20:11:15 +0000 From: Al Viro To: David Eccher Cc: Felipe Balbi , Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/1] USB: inode.c: fix unbalanced spin_lock in ep0_write Message-ID: <20151211201115.GK20997@ZenIV.linux.org.uk> References: <1449863786-7697-1-git-send-email-d.eccher@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1449863786-7697-1-git-send-email-d.eccher@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 11, 2015 at 08:56:26PM +0100, David Eccher wrote: > Fix bad unlock balance: ep0_write enter with the locks locked from inode.c:1769, > hence it must exit with spinlock held to avoid double unlock in dev_config. *Ugh* Just take that spinlock before the if (retval < 0) and don't drop it after clear_req(), then...