From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A4488C71122 for ; Sun, 14 Oct 2018 23:13:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5CC8820835 for ; Sun, 14 Oct 2018 23:13:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5CC8820835 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=telegraphics.com.au Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726422AbeJOG4R (ORCPT ); Mon, 15 Oct 2018 02:56:17 -0400 Received: from kvm5.telegraphics.com.au ([98.124.60.144]:59568 "EHLO kvm5.telegraphics.com.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726186AbeJOG4R (ORCPT ); Mon, 15 Oct 2018 02:56:17 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by kvm5.telegraphics.com.au (Postfix) with ESMTP id 8BD0422C30; Sun, 14 Oct 2018 19:13:38 -0400 (EDT) Date: Mon, 15 Oct 2018 10:13:37 +1100 (AEDT) From: Finn Thain To: Christoph Hellwig cc: "James E.J. Bottomley" , "Martin K. Petersen" , Michael Schmitz , Hannes Reinecke , linux-scsi@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 3/6] esp_scsi: Grant disconnect privilege for untagged commands In-Reply-To: <20181014154753.GA19252@infradead.org> Message-ID: References: <91b9ff9fc19ba40e3a2562171c8cd78a2ce7dc79.1539497520.git.fthain@telegraphics.com.au> <20181014154753.GA19252@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 14 Oct 2018, Christoph Hellwig wrote: > > + *p++ = IDENTIFY(lp && (tp->flags & ESP_TGT_DISCONNECT), lun); > > I think lp should always be non-NULL here. > It's not clear from Documentation/scsi/scsi_mid_low_api.txt, but I guess that's true for scanning of targets. Is it true in general that queuecommand for a device will not occur before its slave_alloc and not after its slave_destroy invocation? (I'm thinking of queuecommand via the other command submission paths, like ioctl.) --