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]
Message-ID: <YwxQQOzw/dGKJKyB@pop-os.localdomain>
Date:   Sun, 28 Aug 2022 22:36:00 -0700
From:   Cong Wang <xiyou.wangcong@...il.com>
To:     Zhengchao Shao <shaozhengchao@...wei.com>
Cc:     netdev@...r.kernel.org, linux-kernel@...r.kernel.org, toke@...e.dk,
        jhs@...atatu.com, jiri@...nulli.us, davem@...emloft.net,
        edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
        stephen@...workplumber.org, cake@...ts.bufferbloat.net,
        weiyongjun1@...wei.com, yuehaibing@...wei.com
Subject: Re: [PATCH net-next] net: sched: remove redundant NULL check in
 change hook function

On Sat, Aug 27, 2022 at 09:49:10AM +0800, Zhengchao Shao wrote:
> Currently, the change function can be called by two ways. The one way is
> that qdisc_change() will call it. Before calling change function,
> qdisc_change() ensures tca[TCA_OPTIONS] is not empty. The other way is
> that .init() will call it. The opt parameter is also checked before
> calling change function in .init(). Therefore, it's no need to check the
> input parameter opt in change function.
> 

Right.. but the one below:

> diff --git a/net/sched/sch_gred.c b/net/sched/sch_gred.c
> index c50a0853dcb9..e23d3dbb7272 100644
> --- a/net/sched/sch_gred.c
> +++ b/net/sched/sch_gred.c
> @@ -413,9 +413,6 @@ static int gred_change_table_def(struct Qdisc *sch, struct nlattr *dps,
>  	bool red_flags_changed;
>  	int i;
>  
> -	if (!dps)
> -		return -EINVAL;
> -

I don't think anyone checks tb[TCA_GRED_DPS]. What you intended to patch
is gred_change(), right?

Thanks.

Powered by blists - more mailing lists