]> git.baikalelectronics.ru Git - kernel.git/commit
target/pscsi: Fix bug with REPORT_LUNs handling for SCSI passthrough
authorNicholas Bellinger <nab@linux-iscsi.org>
Wed, 8 Aug 2012 00:14:13 +0000 (00:14 +0000)
committerNicholas Bellinger <nab@linux-iscsi.org>
Fri, 17 Aug 2012 06:36:55 +0000 (23:36 -0700)
commit1e54dd5877fbe99d1ed9e7310d460d2bfce740e5
treea5529f0b252c9f7d828c03ffa6920a94466ab57f
parent63faaef5dfcd734f15e353ba0e7e2a5d6307c3af
target/pscsi: Fix bug with REPORT_LUNs handling for SCSI passthrough

This patch fixes a regression bug in pscsi_transport_complete() callback
code where *pt was being NULL dereferenced during REPORT_LUNS handling,
that was introduced with the spc/sbc refactoring in:

commit 6c880c674206314f65b7f1bdd624bc2a8e4ea7de
Author: Christoph Hellwig <hch@infradead.org>
Date:   Sun May 20 11:59:15 2012 -0400

    target: move code for CDB emulation

As this is a special case for pscsi_parse_cdb() to call spc_parse_cdb() to
allow TCM to handle REPORT_LUN emulation, pscsi_plugin_task will have not
been allocated..

So now in pscsi_transport_complete() just check for existence of *pt and
return for this special case.

Reported-by: Alex Elsayed <eternaleye+usenet@gmail.com>
Cc: Alex Elsayed <eternaleye+usenet@gmail.com>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/target_core_pscsi.c