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:   Tue, 12 Mar 2019 22:48:38 -0700
From:   Cong Wang <xiyou.wangcong@...il.com>
To:     Zhike Wang <wangzhike@...com>
Cc:     Jamal Hadi Salim <jhs@...atatu.com>, Jiri Pirko <jiri@...nulli.us>,
        Linux Kernel Network Developers <netdev@...r.kernel.org>
Subject: Re: [PATCH] net_sched: return correct value for *notify* functions

On Mon, Mar 11, 2019 at 3:16 AM Zhike Wang <wangzhike@...com> wrote:
>
> It is confusing to directly use return value of netlink_send()/
> netlink_unicast() as the return value of *notify*, as it may be not
> error at all.
>
> Example: in tc_del_tfilter(), after calling tfilter_del_notify(), it will
> goto errout if (err). However, the netlink_send()/netlink_unicast() will
> return positive value even for successful case. So it may not call
> tcf_chain_tp_remove() and so on to clean up the resource, as a result,
> resource is leaked.
>
> It may be easier to only check the return value of tfilter_del_nofiy(),
> but it is more clean to correct all related functions.


Looks good to me, as tc action already uses it in a same way.

Acked-by: Cong Wang <xiyou.wangcong@...il.com>

Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ