From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753169AbbDGIU3 (ORCPT ); Tue, 7 Apr 2015 04:20:29 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:21728 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753093AbbDGIUK (ORCPT ); Tue, 7 Apr 2015 04:20:10 -0400 Date: Tue, 7 Apr 2015 11:19:53 +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: <20150407081953.GW16501@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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150407081748.GC10964@mwanda> User-Agent: Mutt/1.5.21 (2010-09-15) X-Source-IP: aserv0021.oracle.com [141.146.126.233] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(); regards, dan carpenter