public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: "Nicholas A. Bellinger" <nab@linux-iscsi.org>
To: Christoph Hellwig <hch@lst.de>
Cc: Spencer Baugh <sbaugh@catern.com>,
	Sagi Grimberg <sagig@mellanox.com>,
	Bart Van Assche <bart.vanassche@sandisk.com>,
	Alexei Potashnik <alexei@purestorage.com>,
	Andy Grover <agrover@redhat.com>,
	Christophe Vu-Brugier <cvubrugier@fastmail.fm>,
	Roland Dreier <roland@purestorage.com>,
	"open list:TARGET SUBSYSTEM" <linux-scsi@vger.kernel.org>,
	"open list:TARGET SUBSYSTEM" <target-devel@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>,
	Joern Engel <joern@purestorage.com>,
	Spencer Baugh <Spencer.baugh@purestorage.com>
Subject: Re: [PATCH] target: fix crash in cmd tracing when cmd didn't match a LUN
Date: Fri, 24 Jul 2015 13:32:14 -0700	[thread overview]
Message-ID: <1437769934.26220.8.camel@haakon3.risingtidesystems.com> (raw)
In-Reply-To: <20150724105206.GA25162@lst.de>

On Fri, 2015-07-24 at 12:52 +0200, Christoph Hellwig wrote:
> On Thu, Jul 23, 2015 at 03:19:32PM -0700, Spencer Baugh wrote:
> > From: Alexei Potashnik <alexei@purestorage.com>
> > 
> > If command didn't match a LUN and we're sending check condition, the
> > target_cmd_complete ftrace point will crash because it assumes that
> > cmd->t_task_cdb has been set.
> > 
> > The fix will temporarily set t_task_cdb to the se_cmd buffer
> > and copy first 6 bytes of cdb in there as soon as possible.
> > At a later point t_task_cdb is reset to the correct buffer,
> > but until then traces and printks don't cause a crash.
> 
> This is too ugly to live.  Just dropping the t_task_cdb dereference
> from the trace point sounds like the simples quick fix for now,

Yes, that is what I'd prefer as well.

> and removing the crazy layering violation in iSCSI that opencode
> target_submit_cmd is the proper long term fix.

We've already been through this discussion a couple of years back when
target_submit_cmd() first came into existence.

The reason iscsi/iser-target continues to be a special case is due to
immediate data vs. non immediate data and their respective command
sequence number ordering requirements.

--nab

  reply	other threads:[~2015-07-24 20:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-23 22:19 [PATCH] target: fix crash in cmd tracing when cmd didn't match a LUN Spencer Baugh
2015-07-24 10:52 ` Christoph Hellwig
2015-07-24 20:32   ` Nicholas A. Bellinger [this message]
2015-07-25  6:48     ` Christoph Hellwig
2015-07-25  9:28       ` Nicholas A. Bellinger
  -- strict thread matches above, loose matches on Subject: below --
2015-07-21 22:07 Spencer Baugh
2015-07-21 22:13 ` Spencer Baugh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1437769934.26220.8.camel@haakon3.risingtidesystems.com \
    --to=nab@linux-iscsi.org \
    --cc=Spencer.baugh@purestorage.com \
    --cc=agrover@redhat.com \
    --cc=alexei@purestorage.com \
    --cc=bart.vanassche@sandisk.com \
    --cc=cvubrugier@fastmail.fm \
    --cc=hch@lst.de \
    --cc=joern@purestorage.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=roland@purestorage.com \
    --cc=sagig@mellanox.com \
    --cc=sbaugh@catern.com \
    --cc=target-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox