lkml.org 
[lkml]   [2022]   [Jul]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] nvmet-auth: Fix unsigned comparison with less than zero
Date
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@linux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
> ---


I've already sent out the fix and it is been reviewed-by author of
the code.

-ck


\
 
 \ /
  Last update: 2022-07-19 09:11    [W:0.043 / U:0.688 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site