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: <ygnh4kl6klja.fsf@nvidia.com>
Date:   Tue, 1 Dec 2020 09:55:37 +0200
From:   Vlad Buslov <vladbu@...dia.com>
To:     Jakub Kicinski <kuba@...nel.org>
CC:     <davem@...emloft.net>, <netdev@...r.kernel.org>,
        <jhs@...atatu.com>, <xiyou.wangcong@...il.com>, <jiri@...nulli.us>
Subject: Re: [PATCH net-next] net: sched: remove redundant 'rtnl_held' argument

On Tue 01 Dec 2020 at 04:52, Jakub Kicinski <kuba@...nel.org> wrote:
> On Fri, 27 Nov 2020 17:12:05 +0200 Vlad Buslov wrote:
>> @@ -2262,7 +2260,7 @@ static int tc_del_tfilter(struct sk_buff *skb, struct nlmsghdr *n,
>>  
>>  	if (prio == 0) {
>>  		tfilter_notify_chain(net, skb, block, q, parent, n,
>> -				     chain, RTM_DELTFILTER, rtnl_held);
>> +				     chain, RTM_DELTFILTER);
>>  		tcf_chain_flush(chain, rtnl_held);
>>  		err = 0;
>>  		goto errout;
>
> Hum. This looks off.

Hi Jakub,

Prio==0 means user requests to flush whole chain. In such case rtnl lock
is obtained earlier in tc_del_tfilter():

	/* Take rtnl mutex if flushing whole chain, block is shared (no qdisc
	 * found), qdisc is not unlocked, classifier type is not specified,
	 * classifier is not unlocked.
	 */
	if (!prio ||
	    (q && !(q->ops->cl_ops->flags & QDISC_CLASS_OPS_DOIT_UNLOCKED)) ||
	    !tcf_proto_is_unlocked(name)) {
		rtnl_held = true;
		rtnl_lock();
	}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ