Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp3854407pxv; Mon, 19 Jul 2021 10:19:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxmJg0lxeqe3aa8h8qfS1relH/JMR57wnq5erXbC54bWag69oE9OkriL75QMUmaLT416U1u X-Received: by 2002:a50:f0d4:: with SMTP id a20mr35869504edm.354.1626715141787; Mon, 19 Jul 2021 10:19:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626715141; cv=none; d=google.com; s=arc-20160816; b=utdwseBsrE1cZ5Aoki8QCk9InhWqtcT3aRnVH6oWUYDipy43k/IrYN1gRcFLWHG7uw QiTSvDOfE4I8c3zI/WJ8P74IcZlJmFMnGjCkzeF93W112ihsM9HlVTwlnvOZwyGjNUOa BkG+3VTi4eym4XyUASxic2esDK4FS+jnO5Fe8O7/KP4kfLI65Pv9TUInLnLniV5ryGaI ihwU4KGoQhUV7KuVgpb1XsjerpRfGsovZBkx8V3LW2KiQZQdTkCX18IFMVhr63xAw2tc Wl7pWVzfnp5C0+2yRVIbnaG7T1q/tyyGUu8I2VhjVZMQmwdgVcc1f9tDnoWb86553+GI xg+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=j5/dImHt3pkHudT8s/ZtoIbijzVYTYKGIYPcnltPJIk=; b=S/mfYQgTAk53i4U5qoGmqP2WmI6iLcU5+fjkE9+Um/+hfaqfvUBnlYVx5sXfCV33Vv rq+qbjJ88Z4IMmRouJLuMypwZsi7IukzkNISRWYEasl8KqcbPMQ2LuAhaDkC9ElHpJLn 8Gwc2//rS0HDz6WH4Hwpx0067mRXFzDV7oWiEigQayzLkbTi2wokVqMPz0Xi89uyXdUV mAeY9HNP7510xw8oxTOQj4MJtuGiBlJAntTWYqHoc1HA261Xo6KuI4UvJK6jeskXuSf6 DDGFcDEz0ZRKfJw0ans0l1XaK4Gj6M/AvzW6Wk1BcDKp+qNDcs/WDV4Z740nq8JlxqTs 5ZuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=WCHOzCfm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x30si20892597edy.146.2021.07.19.10.18.38; Mon, 19 Jul 2021 10:19:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=WCHOzCfm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349509AbhGSQgq (ORCPT + 99 others); Mon, 19 Jul 2021 12:36:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:40696 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348111AbhGSPYf (ORCPT ); Mon, 19 Jul 2021 11:24:35 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 23DA26143E; Mon, 19 Jul 2021 16:01:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626710502; bh=43/x1/W8oa55JhLu6E58HoHNqnMOr2sHVb5/+N2+Da8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WCHOzCfmADVYjwa6Al8FhgrLxqDiKntFbi1kAHHtP/W04VvRXdQA0pZND1hU+9PUy M3CTXtqXwQ9yCtqdB8SE0Nw5IFKFU4BHFIUUGgotdAmcqGHcYdb71vLTv5yV8rQbvm IEarJTfT/clU7cDPWdpaE8/4KKcplwLB+I+NRYxE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Martin Wilck , Dan Carpenter , "Martin K. Petersen" Subject: [PATCH 5.10 243/243] scsi: scsi_dh_alua: Fix signedness bug in alua_rtpg() Date: Mon, 19 Jul 2021 16:54:32 +0200 Message-Id: <20210719144948.766537290@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210719144940.904087935@linuxfoundation.org> References: <20210719144940.904087935@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dan Carpenter commit 80927822e8b6be46f488524cd7d5fe683de97fc4 upstream. The "retval" variable needs to be signed for the error handling to work. Link: https://lore.kernel.org/r/YLjMEAFNxOas1mIp@mwanda Fixes: 7e26e3ea0287 ("scsi: scsi_dh_alua: Check for negative result value") Reviewed-by: Martin Wilck Signed-off-by: Dan Carpenter Signed-off-by: Martin K. Petersen Signed-off-by: Greg Kroah-Hartman --- drivers/scsi/device_handler/scsi_dh_alua.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/scsi/device_handler/scsi_dh_alua.c +++ b/drivers/scsi/device_handler/scsi_dh_alua.c @@ -508,7 +508,8 @@ static int alua_rtpg(struct scsi_device struct alua_port_group *tmp_pg; int len, k, off, bufflen = ALUA_RTPG_SIZE; unsigned char *desc, *buff; - unsigned err, retval; + unsigned err; + int retval; unsigned int tpg_desc_tbl_off; unsigned char orig_transition_tmo; unsigned long flags;