Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754766AbbETQwH (ORCPT ); Wed, 20 May 2015 12:52:07 -0400 Received: from mga14.intel.com ([192.55.52.115]:59892 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754536AbbETQwC convert rfc822-to-8bit (ORCPT ); Wed, 20 May 2015 12:52:02 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,465,1427785200"; d="scan'208";a="713188904" From: "Dilger, Andreas" To: Dan Carpenter , Adrian Remonda CC: "open list:STAGING SUBSYSTEM" , "moderated list:STAGING - LUSTRE..." , Greg Donald , open list , "Drokin, Oleg" , Julia Lawall , "Greg Kroah-Hartman" , Joe Perches Subject: Re: [PATCH 4/4] Staging: lustre: sparse lock warning fix Thread-Topic: [PATCH 4/4] Staging: lustre: sparse lock warning fix Thread-Index: AQHQkZlsfLU5eGQ7J0ymQ7HrCNgz4J2Cs0qAgAJ02gA= Date: Wed, 20 May 2015 16:51:59 +0000 Message-ID: References: <1431974091-26363-1-git-send-email-adrianremonda@gmail.com> <1431974091-26363-2-git-send-email-adrianremonda@gmail.com> <1431974091-26363-3-git-send-email-adrianremonda@gmail.com> <1431974091-26363-4-git-send-email-adrianremonda@gmail.com> <1431974091-26363-5-git-send-email-adrianremonda@gmail.com> <20150518212115.GN14154@mwanda> In-Reply-To: <20150518212115.GN14154@mwanda> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.254.25.204] Content-Type: text/plain; charset="us-ascii" Content-ID: <5FE4644560171F44947E0C4B04F37AE9@intel.com> Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1238 Lines: 34 On 2015/05/18, 3:21 PM, "Dan Carpenter" wrote: >On Mon, May 18, 2015 at 08:34:51PM +0200, Adrian Remonda wrote: >> Fixed sparse warning: context imbalance in 'nrs_resource_put_safe' - >> 'different lock contexts for basic block' by releasing the lock on each >> iteration of the for loop. >> > >That changelog doesn't sound correct at all. That's not a correct >motivation or explanation. > >I reviewed the patch and it's likely going to cause dead locks. The code >is trying to take the spinlock for the first pointer in the array and >release it at the end. Now it takes the first pointer's spinlock a >bunch of times (dead lock) and releases it once (will not happen because >we are already dead). It isn't clear to me what the checkpatch complaint actually means? Is it that the spin_lock() and spin_unlock() calls have different amounts of indentation? Cheers, Andreas -- Andreas Dilger Lustre Software Architect Intel High Performance Data Division -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/