From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753850AbbESSom (ORCPT ); Tue, 19 May 2015 14:44:42 -0400 Received: from mail.linux-iscsi.org ([67.23.28.174]:54059 "EHLO linux-iscsi.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751026AbbESSol (ORCPT ); Tue, 19 May 2015 14:44:41 -0400 Message-ID: <1432061072.19713.2.camel@haakon3.risingtidesystems.com> Subject: Re: [patch -next] target: double locking typo in core_clear_lun_from_tpg() From: "Nicholas A. Bellinger" To: Dan Carpenter Cc: linux-scsi@vger.kernel.org, target-devel@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Date: Tue, 19 May 2015 11:44:32 -0700 In-Reply-To: <20150519120419.GA12107@mwanda> References: <20150519120419.GA12107@mwanda> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.4.4-1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2015-05-19 at 15:04 +0300, Dan Carpenter wrote: > We accidentally deadlock instead of unlocking. > > Fixes: 08d20ff62cde ('target: Acquire lun_entry_mutex during core_disable_device_list_for_node') > Signed-off-by: Dan Carpenter > > diff --git a/drivers/target/target_core_device.c b/drivers/target/target_core_device.c > index 2f4c8fa..20618df 100644 > --- a/drivers/target/target_core_device.c > +++ b/drivers/target/target_core_device.c > @@ -433,7 +433,7 @@ void core_clear_lun_from_tpg(struct se_lun *lun, struct se_portal_group *tpg) > > core_disable_device_list_for_node(lun, deve, nacl, tpg); > } > - mutex_lock(&nacl->lun_entry_mutex); > + mutex_unlock(&nacl->lun_entry_mutex); > } > mutex_unlock(&tpg->acl_node_mutex); > } Applied to for-next, and will squash into the original soon. Thanks Dan! --nab