lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 22 Dec 2012 22:15:57 +0100
From:	Geert Uytterhoeven <geert@...ux-m68k.org>
To:	Christoph Hellwig <hch@....de>,
	"Nicholas A. Bellinger" <nab@...ux-iscsi.org>
Cc:	linux-scsi@...r.kernel.org, target-devel@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Geert Uytterhoeven <geert@...ux-m68k.org>
Subject: [PATCH] target: initialize sense_reason_t ret in core_scsi3_emulate_pro_register()

drivers/target/target_core_pr.c: In function ‘core_scsi3_emulate_pro_register’:
drivers/target/target_core_pr.c:2056: warning: ‘ret’ may be used uninitialized in this function

If !spec_i_pt, the "goto out_put_pr_reg" on line 2141 seems to be a real
case where ret is not initialized.

Signed-off-by: Geert Uytterhoeven <geert@...ux-m68k.org>
---
 drivers/target/target_core_pr.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/target/target_core_pr.c b/drivers/target/target_core_pr.c
index e35dbf8..c2e8026 100644
--- a/drivers/target/target_core_pr.c
+++ b/drivers/target/target_core_pr.c
@@ -2053,7 +2053,7 @@ core_scsi3_emulate_pro_register(struct se_cmd *cmd, u64 res_key, u64 sa_res_key,
 	/* Used for APTPL metadata w/ UNREGISTER */
 	unsigned char *pr_aptpl_buf = NULL;
 	unsigned char isid_buf[PR_REG_ISID_LEN], *isid_ptr = NULL;
-	sense_reason_t ret;
+	sense_reason_t ret = 0;
 	int pr_holder = 0, type;
 
 	if (!se_sess || !se_lun) {
-- 
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ