target: fix null pointer regression in core_tmr_drain_tmr_list
authortangwenji <tang.wenji@zte.com.cn>
Wed, 16 Aug 2017 08:39:00 +0000 (16:39 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 Nov 2017 08:40:51 +0000 (08:40 +0000)
commit31c913191db3c680e1b71547e8d46713103ee805
tree954058efca0c7b8456e33fb419a8e6ef6a80c6a7
parent8009209a65167c899729e9a9d40fd3b809474c9d
target: fix null pointer regression in core_tmr_drain_tmr_list

commit 88fb2fa7db7510bf1078226ab48d162d9854f3d4 upstream.

The target system kernel crash when the initiator executes
the sg_persist -A command,because of the second argument to
be set to NULL when core_tmr_lun_reset is called in
core_scsi3_pro_preempt function.

This fixes a regression originally introduced by:

  commit 51ec502a32665fed66c7f03799ede4023b212536
  Author: Bart Van Assche <bart.vanassche@sandisk.com>
  Date:   Tue Feb 14 16:25:54 2017 -0800

      target: Delete tmr from list before processing

Signed-off-by: tangwenji <tang.wenji@zte.com.cn>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/target/target_core_tmr.c