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] [day] [month] [year] [list]
Date:   Sat, 16 Nov 2019 12:42:33 -0800 (PST)
From:   David Miller <davem@...emloft.net>
To:     ivan.khoronzhuk@...aro.org
Cc:     netdev@...r.kernel.org, vinicius.gomes@...el.com, jhs@...atatu.com,
        xiyou.wangcong@...il.com, jiri@...nulli.us,
        linux-kernel@...r.kernel.org
Subject: Re: [net-next PATCH] taprio: don't reject same mqprio settings

From: Ivan Khoronzhuk <ivan.khoronzhuk@...aro.org>
Date: Fri, 15 Nov 2019 03:56:07 +0200

> @@ -1347,6 +1347,26 @@ static int taprio_parse_clockid(struct Qdisc *sch, struct nlattr **tb,
>  	return err;
>  }
>  
> +static int taprio_mqprio_cmp(struct net_device *dev,
> +			     struct tc_mqprio_qopt *mqprio)
> +{
 ...
>  static int taprio_change(struct Qdisc *sch, struct nlattr *opt,
>  			 struct netlink_ext_ack *extack)
>  {
> @@ -1398,6 +1418,10 @@ static int taprio_change(struct Qdisc *sch, struct nlattr *opt,
>  	admin = rcu_dereference(q->admin_sched);
>  	rcu_read_unlock();
>  
> +	/* no changes - no new mqprio settings */
> +	if (mqprio && !taprio_mqprio_cmp(dev, mqprio))
> +		mqprio = NULL;
> +

I like Vinicius's feedback, please make the new helper function have
the signature:

static int taprio_mqprio_cmp(const struct net_device *dev,
			     const struct tc_mqprio_qopt *mqprio)

And make the NULL check in there instead of at the caller.

Please also remember to add the Fixes: tag.

Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ