Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp3277935imm; Sun, 14 Oct 2018 16:14:29 -0700 (PDT) X-Google-Smtp-Source: ACcGV61hMPqtVqpyj/py/a9oL6xD4MOkq4hElscnblqgfvN8Ejn+iS2k6l/fipEFy6WeOj/nFAvj X-Received: by 2002:a63:ef0b:: with SMTP id u11-v6mr13806527pgh.283.1539558869273; Sun, 14 Oct 2018 16:14:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539558869; cv=none; d=google.com; s=arc-20160816; b=yYoDLu1K5sooGQot2TGs28jXdYk7xvswqe6WGUmeeTY7wzxekem0EwlG+Ph4K6tAJ0 yUDOxYGU3XmsTG3QkCFZYBdBGRerfJ0LYP5vy7RL6J62I9ZXGA6GKZQw0ACsm+Os7sM/ yYOyavQw0aeNSOB9ic4Yem5so+qWHa2MLvukuO9nb3Dx1ihJqdMDhSd4MfGIl261ta15 eHkmBB7mvUnldKDhdOhtIclqhvig9auwRXwE43n9mC9upIv5v4KnUCoWF4DDMjjXJhYz N0cy5A6KZEhWB6bxqgpoJ5FtZ9HNuRWycPElX24LDMuHvxbIoAoJuupt4/tDl/hYSbMz PclA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:message-id :in-reply-to:subject:cc:to:from:date; bh=TRJLvDwQbrmWVfoabKRCjxohzjzbXhL/E3FEy4VLWUQ=; b=Xi4InvdvZIXX5IsTD/tJKY/y1xwd0/K2l+EFPm7KGEFOwVrlIZYoOGec2p2sFf+LIX d13GdEbf6XvxDZvhC4nSBI3LIl4Fl9jYDpBPDMJNBorLSIxbhNY1gyB7Avl267++hSiM 2/e7jwrsEbLK4759dt1ZtpGkhwQkEtCIJ9au65e4/iTdvfKnWj68cXeZg4ENH/TsZVG6 JJ6TZnfqdD5wyHJmmhKXQSDwLo3yqhWmjjTg/54xncVidnLPLV33xVCJR/0LOzx4HgWN 78lRvNat0x5MaCQrCtDVzffgGAQX95B7u2ewbxhMYxt+bQwmJ192LW0Rfs2i7D5I6orG pvgw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w7-v6si8811638pgh.131.2018.10.14.16.14.12; Sun, 14 Oct 2018 16:14:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726400AbeJOG4R (ORCPT + 99 others); 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.) --