Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1191714

Re: [PATCH] target: fix crash in cmd tracing when cmd didn't match a LUN

From Christoph Hellwig <hch@lst.de>
Newsgroups linux.kernel
Subject Re: [PATCH] target: fix crash in cmd tracing when cmd didn't match a LUN
Date 2015-07-24 13:00 +0200
Message-ID <pPIRP-3xl-9@gated-at.bofh.it> (permalink)
References <pPx0m-3bN-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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,
and removing the crazy layering violation in iSCSI that opencode
target_submit_cmd is the proper long term fix.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] target: fix crash in cmd tracing when cmd didn't match a LUN Spencer Baugh <sbaugh@catern.com> - 2015-07-24 00:20 +0200
  Re: [PATCH] target: fix crash in cmd tracing when cmd didn't match  a LUN Christoph Hellwig <hch@lst.de> - 2015-07-24 13:00 +0200

csiph-web