提交 4a56511d 编写于 作者: D Dan Carpenter 提交者: Yang Yingliang

scsi: scsi_dh_alua: Fix signedness bug in alua_rtpg()

stable inclusion
from linux-4.19.198
commit c021be62bbcbf5435ec89713ed542040196f5b89

--------------------------------

commit 80927822 upstream.

The "retval" variable needs to be signed for the error handling to work.

Link: https://lore.kernel.org/r/YLjMEAFNxOas1mIp@mwanda
Fixes: 7e26e3ea ("scsi: scsi_dh_alua: Check for negative result value")
Reviewed-by: NMartin Wilck <mwilck@suse.com>
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 3087da85
...@@ -522,7 +522,8 @@ static int alua_rtpg(struct scsi_device *sdev, struct alua_port_group *pg) ...@@ -522,7 +522,8 @@ static int alua_rtpg(struct scsi_device *sdev, struct alua_port_group *pg)
struct alua_port_group *tmp_pg; struct alua_port_group *tmp_pg;
int len, k, off, bufflen = ALUA_RTPG_SIZE; int len, k, off, bufflen = ALUA_RTPG_SIZE;
unsigned char *desc, *buff; unsigned char *desc, *buff;
unsigned err, retval; unsigned err;
int retval;
unsigned int tpg_desc_tbl_off; unsigned int tpg_desc_tbl_off;
unsigned char orig_transition_tmo; unsigned char orig_transition_tmo;
unsigned long flags; unsigned long flags;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册