summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libfc
diff options
context:
space:
mode:
authorKiran Patil2011-06-21 01:59:41 +0200
committerJames Bottomley2011-06-29 23:32:31 +0200
commitf2f7b09ccea1717026915a4401f0452f05c97364 (patch)
tree238d65acd5bc7771b2a7e96f4c8988c8fecc977e /drivers/scsi/libfc
parent[SCSI] libfc:Fix for exchange/seq loopup failure when FCoE stack is used as t... (diff)
downloadkernel-qcow2-linux-f2f7b09ccea1717026915a4401f0452f05c97364.tar.gz
kernel-qcow2-linux-f2f7b09ccea1717026915a4401f0452f05c97364.tar.xz
kernel-qcow2-linux-f2f7b09ccea1717026915a4401f0452f05c97364.zip
[SCSI] tcm_fc: Fixing reference counting problem which was causing ft_sess to be deleted.
Problem: After fixing the issue in TCM core w.r.t LUN Reset (Task Management request) , ran into issue where during the completing of this LUN Reset command, reference count of "ft_sess" drops to zero which caused "sess" to be deleted. Fix: As part of handling task management request (e.g. LUN Reset), TCM core function "transport_generic_do_tmr" ends up calling ft_free_cmd which in turn calls "ft_sess_put" (which drops session's reference count by 1) and then frees ft_cmd. Then function "transport_generic_do_tmr" calls "transport_cmd_check_stop" which in turn also calls ft_free_cmd (which calls ft_sess_put - which drops reference count of sess by 1, hence reference count of sess becomes zero and session gets deleted). Fix is to just send response in case of tmr from function "ft_queue_resp_code" and not delete "ft_cmd" (means don't call ft_free_cmd). Earlier code was to send the response code and also free ft_cmd. ft_free_cmd will be freed later after sending response code as a result of "transport_cmd_check_stop" (which calls ft_release_cmd -> ft_free_cmd) being called from "transport_generic_do_tmr" after sening TMR response code. Notes/Dependencies: This bug was found after fixing NULL pointer access issue in TCM core (in LUN Reset codepath) Signed-off-by: Kiran Patil <kiran.patil@intel.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/libfc')
0 files changed, 0 insertions, 0 deletions