Message ID | 20230110164044.755234-1-harshit.m.mogalapalli@oracle.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp2853268wrt; Tue, 10 Jan 2023 08:45:52 -0800 (PST) X-Google-Smtp-Source: AMrXdXvt3NWwORE+lFYnnTcqqBRX02Ce7jl9dg+XEwaA9mmLhAAV3yUFWKBMdlzEfcdveWxlCISX X-Received: by 2002:a05:6a20:1586:b0:9d:efc0:67 with SMTP id h6-20020a056a20158600b0009defc00067mr103573336pzj.15.1673369151916; Tue, 10 Jan 2023 08:45:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673369151; cv=none; d=google.com; s=arc-20160816; b=p/81x27bvC70oGV7U1rA8TSKzdBwLNXbL+WO5SNHN+xneV65kPBhH6a77UICEOokHA XX3OsMxAR/WKVMu3L2IERcuMtipn5xqc17aKYo6WcD4ZE55OZ2GWw92jKnyvY2Q/KNYH xPw69RP8VGUnqyAKWvFpUQudxbacB5dz2BtACxEJWVS2g0HtxpWyvSFoaTVUuZ4DHJvx 6JXMw9v8H6Qw/FoNa0Zc0OYrZphOKb9y0qpFzTXhdWUElSQWYlgwFFE+rezc0A0LB+YK 4sBlVl/IL4+ZpHKN0MEwnYMA4pouqA4YrlvY0kSGUtfIrUvc590QgBvkmTWZM+B1l7I1 +Ssw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:content-transfer-encoding:mime-version :message-id:date:subject:cc:from:dkim-signature; bh=f+ZiSxSYIGDsBpu3KVLkv2Tip7lmyPNI8cSaAfTSWQE=; b=C2fPzA5VCFVlcVVW7kExvMLUWHwLAttBCAwAyziPckFZiu3jR6Bv7DEZGGhvks8qG+ VVYK022SGtnqR3vRtqKqiztoiGj3XjckC51bclm3wkxFILplJrBUMBJWOzGjhcpGX0PB ARcwg4MC5bhyG+fKmYd6hktwcnX2m4YaVDKn1RUkDWeNB3OMuZCRUflWgm44m/NxqC35 OUvKcxPXq21wEZ3xRkntf8jkPpCU1w8qHFYsTeMFhP1HB9bzSI5PttSZDhsr3IMun5Ib Rak6MqvDNOCXb/GD9lXtdLh1op/vdWusH4WafOCiygQ6Uaamk473IoVm6HP2qH0m58Yn /N7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@oracle.com header.s=corp-2022-7-12 header.b=GHkLlOYQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f5-20020a170902860500b0019269c72094si11324182plo.504.2023.01.10.08.45.39; Tue, 10 Jan 2023 08:45:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@oracle.com header.s=corp-2022-7-12 header.b=GHkLlOYQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234087AbjAJQlJ (ORCPT <rfc822;syz17693488234@gmail.com> + 99 others); Tue, 10 Jan 2023 11:41:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55086 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233394AbjAJQlC (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 10 Jan 2023 11:41:02 -0500 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED10825CA; Tue, 10 Jan 2023 08:41:00 -0800 (PST) Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 30AGDQO3011416; Tue, 10 Jan 2023 16:40:56 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding; s=corp-2022-7-12; bh=f+ZiSxSYIGDsBpu3KVLkv2Tip7lmyPNI8cSaAfTSWQE=; b=GHkLlOYQNfTcMFNZLGlzC1V0h7crFLYmnLsBSFYjiZSah6bevtIJ0A4ic8lgwkiEfCfP +w7sy+GpPr3EceQ/3ApwqUl2oq5O3Ccldw0eRA/VfFeUcom1d2IcsHB1y42IYx+1SGpj 8uIHiMX+OPorVJKh9xzNfXfy70HrlHzbyfSBJe4DXslVPJxyYpnVvpRBXBUObVSoBMPl D3AIK65dKs8qVdsuigTM1isinQrRbQB1wPBMIwQIwA60s6z+nPuwa4Q3edMT5/a1ww7c mGs/l5KRbORaNJ8Q9fbxhTycJJYmGl1J/VeK6TgAUxeKo4zC8eTfFsL6GHDTNPvDKwrh vg== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3n1au1g5nf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 10 Jan 2023 16:40:56 +0000 Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 30AG8g0l008188; Tue, 10 Jan 2023 16:40:55 GMT Received: from pps.reinject (localhost [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3n1a43e3wf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 10 Jan 2023 16:40:54 +0000 Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 30AGYWHE011905; Tue, 10 Jan 2023 16:40:54 GMT Received: from ca-dev112.us.oracle.com (ca-dev112.us.oracle.com [10.129.136.47]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTP id 3n1a43e3vy-1; Tue, 10 Jan 2023 16:40:54 +0000 From: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com> Cc: stable@vger.kernel.org, harshit.m.mogalapalli@oracle.com, error27@gmail.com, darren.kenny@oracle.com, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Jens Axboe <axboe@kernel.dk>, Pavel Begunkov <asml.silence@gmail.com>, Sasha Levin <sashal@kernel.org>, linux-kernel@vger.kernel.org Subject: [PATCH 5.10.y] io_uring: Fix unsigned 'res' comparison with zero in io_fixup_rw_res() Date: Tue, 10 Jan 2023 08:40:43 -0800 Message-Id: <20230110164044.755234-1-harshit.m.mogalapalli@oracle.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.923,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2023-01-10_06,2023-01-10_03,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 bulkscore=0 spamscore=0 suspectscore=0 adultscore=0 phishscore=0 malwarescore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301100105 X-Proofpoint-ORIG-GUID: -QehMCJaFJPhNNGSZSlaHboOl3q9GtTL X-Proofpoint-GUID: -QehMCJaFJPhNNGSZSlaHboOl3q9GtTL X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754654731812434546?= X-GMAIL-MSGID: =?utf-8?q?1754654731812434546?= |
Series |
[5.10.y] io_uring: Fix unsigned 'res' comparison with zero in io_fixup_rw_res()
|
|
Commit Message
Harshit Mogalapalli
Jan. 10, 2023, 4:40 p.m. UTC
Smatch warning: io_fixup_rw_res() warn:
unsigned 'res' is never less than zero.
Change type of 'res' from unsigned to long.
Fixes: 788d0824269b ("io_uring: import 5.15-stable io_uring")
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
---
Note: The Fixes commit is a 5.15 to 5.10 backport, the commit which
this patch actually Fixes in 5.15 is d6b7efc722a2
---
io_uring/io_uring.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c index 945faf036ad0..0c4d16afb9ef 100644 --- a/io_uring/io_uring.c +++ b/io_uring/io_uring.c @@ -2702,7 +2702,7 @@ static bool __io_complete_rw_common(struct io_kiocb *req, long res) return false; } -static inline int io_fixup_rw_res(struct io_kiocb *req, unsigned res) +static inline int io_fixup_rw_res(struct io_kiocb *req, long res) { struct io_async_rw *io = req->async_data;