summaryrefslogtreecommitdiff
path: root/pcap_sg.c
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2013-05-12 12:33:53 +0200
committerTobias Klauser <tklauser@distanz.ch>2013-05-12 12:33:53 +0200
commit10a80a61d67516c0ba4c13a7c07e9ebfa6fab9c5 (patch)
treef69e0c17e7170477a01e2f73c3d90483f4e4d46a /pcap_sg.c
parent21adfd2ba4324bb8575b17ecd76c0f3b3988246e (diff)
dissector: lldp: NULL check before dereference
Check return value of pkt_pull before dereferencing it (even though we check the packet length before and pkt_pull _should_ never return NULL). This was discovered by the coverity scanner. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Diffstat (limited to 'pcap_sg.c')
0 files changed, 0 insertions, 0 deletions
/a>)
target: Fix early transport_generic_handle_tmr abort scenario
This patch fixes a bug where incoming task management requests can be explicitly aborted during an active LUN_RESET, but who's struct work_struct are canceled in-flight before execution. This occurs when core_tmr_drain_tmr_list() invokes cancel_work_sync() for the incoming se_tmr_req->task_cmd->work, resulting in cmd->work for target_tmr_work() never getting invoked and the aborted TMR waiting indefinately within transport_wait_for_tasks(). To address this case, perform a CMD_T_ABORTED check early in transport_generic_handle_tmr(), and invoke the normal path via transport_cmd_check_stop_to_fabric() to complete any TMR kthreads blocked waiting for CMD_T_STOP in transport_wait_for_tasks(). Also, move the TRANSPORT_ISTATE_PROCESSING assignment earlier into transport_generic_handle_tmr() so the existing check in core_tmr_drain_tmr_list() avoids attempting abort the incoming se_tmr_req->task_cmd->work if it has already been queued into se_device->tmr_wq. Reported-by: Rob Millner <rlm@daterainc.com> Tested-by: Rob Millner <rlm@daterainc.com> Cc: Rob Millner <rlm@daterainc.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Cc: stable@vger.kernel.org # 3.14+ Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/target_core_transport.c')
-rw-r--r--drivers/target/target_core_transport.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c