diff options
author | tang.junhui <tang.junhui@zte.com.cn> | 2016-10-28 15:54:07 +0800 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2016-11-01 13:31:08 -0400 |
commit | 1fdd14279eab2e9f79745631379f0c53cb8f9a5a (patch) | |
tree | da02b1bf7fd2fa61cbfe6cd4cf8d25bd04b2c1ba | |
parent | 2bf7dc8443e113844d078fd6541b7f4aa544f92f (diff) |
scsi: scsi_dh_alua: fix missing kref_put() in alua_rtpg_work()
Reference count of pg leaks in alua_rtpg_work() since kref_put() is not
called to decrease the reference count of pg when the condition
pg->rtpg_sdev==NULL satisfied (actually it is easy to satisfy), it would
cause memory of pg leakage.
Signed-off-by: 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>
-rw-r--r-- | drivers/scsi/device_handler/scsi_dh_alua.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c b/drivers/scsi/device_handler/scsi_dh_alua.c index 241829e59668..f375167f16ea 100644 --- a/drivers/scsi/device_handler/scsi_dh_alua.c +++ b/drivers/scsi/device_handler/scsi_dh_alua.c @@ -793,6 +793,7 @@ static void alua_rtpg_work(struct work_struct *work) WARN_ON(pg->flags & ALUA_PG_RUN_RTPG); WARN_ON(pg->flags & ALUA_PG_RUN_STPG); spin_unlock_irqrestore(&pg->lock, flags); + kref_put(&pg->kref, release_port_group); return; } if (pg->flags & ALUA_SYNC_STPG) |