summaryrefslogtreecommitdiff
path: root/drivers/scsi/cxgbi
diff options
context:
space:
mode:
authorBart Van Assche <bart.vanassche@sandisk.com>2016-11-01 08:19:57 -0600
committerMartin K. Petersen <martin.petersen@oracle.com>2016-11-01 13:32:24 -0400
commitdf3d422cbac685da882e4c239dfda07de33d431b (patch)
tree5d61ed8c7e551eb980a4c1772964bdce25d8c1d8 /drivers/scsi/cxgbi
parentaac173e9618faadf8f92af6cc05e64f7acc64d79 (diff)
scsi: scsi_dh_alua: Fix a reference counting bug
The code at the end of alua_rtpg_work() is as follows: scsi_device_put(sdev); kref_put(&pg->kref, release_port_group); In other words, alua_rtpg_queue() must hold an sdev reference and a pg reference before queueing rtpg work. If no rtpg work is queued no additional references should be held when alua_rtpg_queue() returns. If no rtpg work is queued, ensure that alua_rtpg_queue() only gives up the sdev reference if that reference was obtained by the same alua_rtpg_queue() call. Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> Reported-by: Tang Junhui <tang.junhui@zte.com.cn> Cc: Hannes Reinecke <hare@suse.com> Cc: Tang Junhui <tang.junhui@zte.com.cn> Cc: <stable@vger.kernel.org> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/cxgbi')
0 files changed, 0 insertions, 0 deletions