linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] scsi_dh_alua: uninitialized variable in alua_check_vpd()
@ 2016-03-11 10:17 Dan Carpenter
  2016-03-11 10:50 ` Hannes Reinecke
  0 siblings, 1 reply; 7+ messages in thread
From: Dan Carpenter @ 2016-03-11 10:17 UTC (permalink / raw)
  To: James E.J. Bottomley, Hannes Reinecke
  Cc: Martin K. Petersen, Bart Van Assche, Johannes Thumshirn,
	Ewan Milne, linux-scsi, linux-kernel, kernel-janitors

The pg_updated variable is support to be set to zero at the start but
it is uninitialized.

Fixes: cb0a168cb6b8 ('scsi_dh_alua: update 'access_state' field')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c b/drivers/scsi/device_handler/scsi_dh_alua.c
index 5bcdf8d..e4f6174 100644
--- a/drivers/scsi/device_handler/scsi_dh_alua.c
+++ b/drivers/scsi/device_handler/scsi_dh_alua.c
@@ -332,7 +332,7 @@ static int alua_check_vpd(struct scsi_device *sdev, struct alua_dh_data *h,
 {
 	int rel_port = -1, group_id;
 	struct alua_port_group *pg, *old_pg = NULL;
-	bool pg_updated;
+	bool pg_updated = 0;
 	unsigned long flags;
 
 	group_id = scsi_vpd_tpg_id(sdev, &rel_port);

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-03-14 20:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-11 10:17 [patch] scsi_dh_alua: uninitialized variable in alua_check_vpd() Dan Carpenter
2016-03-11 10:50 ` Hannes Reinecke
2016-03-11 11:19   ` [patch v2] " Dan Carpenter
2016-03-11 11:48     ` Hannes Reinecke
2016-03-11 14:40     ` Manoj Kumar
2016-03-14 20:02     ` Martin K. Petersen
2016-03-11 11:19   ` [patch] " Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).