lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 2 Nov 2020 09:21:05 +0800
From:   Tonghao Zhang <xiangxia.m.yue@...il.com>
To:     YueHaibing <yuehaibing@...wei.com>
Cc:     Pravin Shelar <pshelar@....org>,
        David Miller <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Linux Kernel Network Developers <netdev@...r.kernel.org>,
        ovs dev <dev@...nvswitch.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net-next] openvswitch: Use IS_ERR instead of IS_ERR_OR_NULL

On Sat, Oct 31, 2020 at 2:02 PM YueHaibing <yuehaibing@...wei.com> wrote:
>
> Fix smatch warning:
>
> net/openvswitch/meter.c:427 ovs_meter_cmd_set() warn: passing zero to 'PTR_ERR'
>
> dp_meter_create() never returns NULL, use IS_ERR
> instead of IS_ERR_OR_NULL to fix this.
>
> Signed-off-by: YueHaibing <yuehaibing@...wei.com>
Acked-by: Tonghao Zhang <xiangxia.m.yue@...il.com>
> ---
>  net/openvswitch/meter.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/openvswitch/meter.c b/net/openvswitch/meter.c
> index 8fbefd52af7f..15424d26e85d 100644
> --- a/net/openvswitch/meter.c
> +++ b/net/openvswitch/meter.c
> @@ -423,7 +423,7 @@ static int ovs_meter_cmd_set(struct sk_buff *skb, struct genl_info *info)
>                 return -EINVAL;
>
>         meter = dp_meter_create(a);
> -       if (IS_ERR_OR_NULL(meter))
> +       if (IS_ERR(meter))
>                 return PTR_ERR(meter);
>
>         reply = ovs_meter_cmd_reply_start(info, OVS_METER_CMD_SET,
> --
> 2.17.1
>


-- 
Best regards, Tonghao

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ