mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 22:37:45 -04:00
This patch fixes a recent ABORT_TASK regression associated with commitfebe562c, where a left-over target_put_sess_cmd() would still be called when __target_check_io_state() detected a command has already been completed, and explicit ABORT must be avoided. Note commitfebe562cdropped the local kref_get_unless_zero() check in core_tmr_abort_task(), but did not drop this extra corresponding target_put_sess_cmd() in the failure path. So go ahead and drop this now bogus target_put_sess_cmd(), and avoid this potential use-after-free. Reported-by: Dan Lane <[email protected]> Cc: Quinn Tran <[email protected]> Cc: Himanshu Madhani <[email protected]> Cc: Sagi Grimberg <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: Hannes Reinecke <[email protected]> Cc: Andy Grover <[email protected]> Cc: Mike Christie <[email protected]> Cc: [email protected] # 3.14+ Signed-off-by: Nicholas Bellinger <[email protected]>