From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753200AbbDGI0A (ORCPT ); Tue, 7 Apr 2015 04:26:00 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:32094 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752871AbbDGIZ4 (ORCPT ); Tue, 7 Apr 2015 04:25:56 -0400 Date: Tue, 7 Apr 2015 11:25:33 +0300 From: Dan Carpenter To: Giedrius Statkevicius Cc: lidza.louina@gmail.com, markh@compro.net, devel@driverdev.osuosl.org, gregkh@linuxfoundation.org, driverdev-devel@linuxdriverproject.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 3/3] staging: dgnc: improve the coding style in unlocking part of dgnc_tty_write() Message-ID: <20150407082533.GX16501@mwanda> References: <1428268555-8963-1-git-send-email-giedrius.statkevicius@gmail.com> <1428268555-8963-3-git-send-email-giedrius.statkevicius@gmail.com> <20150407081748.GC10964@mwanda> <20150407081953.GW16501@mwanda> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150407081953.GW16501@mwanda> User-Agent: Mutt/1.5.21 (2010-09-15) X-Source-IP: userv0022.oracle.com [156.151.31.74] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 07, 2015 at 11:19:53AM +0300, Dan Carpenter wrote: > On Tue, Apr 07, 2015 at 11:17:48AM +0300, Dan Carpenter wrote: > > This patch changes the lock ordering (behavior change) and it's not > > described in the changelog. Please figure out which way is the correct > > ordering and resend. > > Actually the original ordering was obviously correct. You can't take > a mutex if you are holding a spinlock. So it always has to be: > > mutex_lock(); > spin_lock(); > > spin_unlock(); > mutext_unlock(); > Oh, hm... You could take a mutex with trylock I suppose. That would be safe. Anyway, I just saw that you sent a v2 patch. When you send a v2 patch, then you *must* send a reply to the original thread. Greg has thousands and thousands of messages in his inbox and he applies patches in chronological order. So he will apply this one because it has not responses then get to the v2 patch and try to apply that one as well which will fail. regards, dan carpenter