target/pscsi: Fix NULL pointer dereference in get_device_type
authorNicholas Bellinger <nab@linux-iscsi.org>
Fri, 27 Feb 2015 11:54:13 +0000 (03:54 -0800)
committerNicholas Bellinger <nab@linux-iscsi.org>
Fri, 20 Mar 2015 06:26:42 +0000 (23:26 -0700)
commit215a8fe4198f607f34ecdbc9969dae783d8b5a61
treed9c16091abc862f6ce9bfd435fe049bd0251d2f0
parentd556546e7ecd9fca199df4698943024d40044f8e
target/pscsi: Fix NULL pointer dereference in get_device_type

This patch fixes a NULL pointer dereference OOPs with pSCSI backends
within target_core_stat.c code.  The bug is caused by a configfs attr
read if no pscsi_dev_virt->pdv_sd has been configured.

Reported-by: Olaf Hering <olaf@aepfle.de>
Cc: <stable@vger.kernel.org>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/target_core_pscsi.c