[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <c87665a9-14e6-38bb-361f-2d31352d8104@nvidia.com>
Date: Tue, 19 Jul 2022 07:09:43 +0000
From: Chaitanya Kulkarni <chaitanyak@...dia.com>
To: Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
CC: "sagi@...mberg.me" <sagi@...mberg.me>,
Chaitanya Kulkarni <chaitanyak@...dia.com>,
"linux-nvme@...ts.infradead.org" <linux-nvme@...ts.infradead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Abaci Robot <abaci@...ux.alibaba.com>,
"hch@....de" <hch@....de>
Subject: Re: [PATCH] nvmet-auth: Fix unsigned comparison with less than zero
On 7/19/22 00:00, Jiapeng Chong wrote:
> The return from the call to nvmet_auth_challenge() and nvmet_setup_auth()
> is int, it can be a negative error code, however this is being assigned
> to an u16 variable 'status', so making 'status' an int, and change the
> position to keep the code format.
>
> This was found by coccicheck:
>
> ./drivers/nvme/target/fabrics-cmd-auth.c:488:6-12: WARNING: Unsigned expression compared with zero: status < 0.
> ./drivers/nvme/target/fabrics-cmd-auth.c:251:8-14: WARNING: Unsigned expression compared with zero: status < 0.
>
> Reported-by: Abaci Robot <abaci@...ux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
> ---
I've already sent out the fix and it is been reviewed-by author of
the code.
-ck
Powered by blists - more mailing lists