From: Jens Axboe <axboe@kernel.dk>
To: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Cc: asml.silence@gmail.com, io-uring@vger.kernel.org,
linux-kernel@vger.kernel.org,
Abaci Robot <abaci@linux.alibaba.com>
Subject: Re: [PATCH] io_uring: rw: Fix an unsigned comparison which can never be negative
Date: Thu, 15 Sep 2022 00:27:20 -0600 [thread overview]
Message-ID: <f33df5e9-8162-16b3-c0e3-73aabea7471b@kernel.dk> (raw)
In-Reply-To: <20220915054909.81394-1-jiapeng.chong@linux.alibaba.com>
On 9/14/22 11:49 PM, Jiapeng Chong wrote:
> The parameter 'res' is defined as unsigned type, so the following if
> statement is invalid, we can modify the type of res to long.
> if (res < 0)
> res = io->bytes_done;
> else
> res += io->bytes_done;
>
> io_uring/rw.c:265 io_fixup_rw_res() warn: unsigned 'res' is never less than zero.
This one is already fixed here:
https://git.kernel.dk/cgit/linux-block/commit/?h=io_uring-6.0&id=62bb0647b14646fa6c9aa25ecdf67ad18f13523c
--
Jens Axboe
prev parent reply other threads:[~2022-09-15 6:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-15 5:49 Jiapeng Chong
2022-09-15 6:27 ` Jens Axboe [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f33df5e9-8162-16b3-c0e3-73aabea7471b@kernel.dk \
--to=axboe@kernel.dk \
--cc=abaci@linux.alibaba.com \
--cc=asml.silence@gmail.com \
--cc=io-uring@vger.kernel.org \
--cc=jiapeng.chong@linux.alibaba.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®