From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id B10C71A04D3 for ; Fri, 2 Oct 2015 22:55:36 +1000 (AEST) Subject: Re: [PATCH v5 04/34] cxlflash: Fix potential oops following LUN removal To: "Matthew R. Ochs" , linux-scsi@vger.kernel.org, James Bottomley , "Nicholas A. Bellinger" , Brian King , Ian Munsie , Daniel Axtens , Andrew Donnellan , David Laight References: <1443714773-9176-1-git-send-email-mrochs@linux.vnet.ibm.com> <1443714903-11876-1-git-send-email-mrochs@linux.vnet.ibm.com> Cc: Michael Neuling , linuxppc-dev@lists.ozlabs.org, "Manoj N. Kumar" From: Tomas Henzl Message-ID: <560E7EC3.8060903@redhat.com> Date: Fri, 2 Oct 2015 14:55:31 +0200 MIME-Version: 1.0 In-Reply-To: <1443714903-11876-1-git-send-email-mrochs@linux.vnet.ibm.com> Content-Type: text/plain; charset=windows-1252 List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On 1.10.2015 17:55, Matthew R. Ochs wrote: > When a LUN is removed, the sdev that is associated with the LUN > remains intact until its reference count drops to 0. In order > to prevent an sdev from being removed while a context is still > associated with it, obtain an additional reference per-context > for each LUN attached to the context. > > This resolves a potential Oops in the release handler when a > dealing with a LUN that has already been removed. > > Signed-off-by: Matthew R. Ochs > Signed-off-by: Manoj N. Kumar > Reviewed-by: Brian King Reviewed-by: Tomas Henzl Tomas