[lkml]   [2015]   [Jul]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] target: fix crash in cmd tracing when cmd didn't match a LUN
On Thu, Jul 23, 2015 at 03:19:32PM -0700, Spencer Baugh wrote:
> From: Alexei Potashnik <>
> 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.

 \ /
  Last update: 2015-07-24 13:21    [W:0.077 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site