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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20220914215357.i7kvrnuczrltdsoj@skbuf>
Date:   Wed, 14 Sep 2022 21:53:58 +0000
From:   Vladimir Oltean <vladimir.oltean@....com>
To:     "netdev@...r.kernel.org" <netdev@...r.kernel.org>
CC:     Vinicius Costa Gomes <vinicius.gomes@...el.com>,
        Jamal Hadi Salim <jhs@...atatu.com>,
        Cong Wang <xiyou.wangcong@...il.com>,
        Jiri Pirko <jiri@...nulli.us>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Voon Weifeng <weifeng.voon@...el.com>,
        Vladimir Oltean <olteanv@...il.com>,
        Kurt Kanzenbach <kurt@...utronix.de>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net 3/3] net/sched: taprio: dereference oper and admin
 sched under RCU in taprio_destroy

On Wed, Sep 14, 2022 at 05:34:39PM +0300, Vladimir Oltean wrote:
> -	if (q->oper_sched)
> -		call_rcu(&q->oper_sched->rcu, taprio_free_sched_cb);
> +	rcu_read_lock();
> +
> +	oper = rcu_dereference(q->oper_sched);
> +	admin = rcu_dereference(q->admin_sched);
> +
> +	if (oper)
> +		call_rcu(&oper->rcu, taprio_free_sched_cb);
>  
> -	if (q->admin_sched)
> -		call_rcu(&q->admin_sched->rcu, taprio_free_sched_cb);
> +	if (admin)
> +		call_rcu(&admin->rcu, taprio_free_sched_cb);
> +
> +	rcu_read_unlock();
>  }

I decided to code up this patch at the last minute, since the sparse
warning was bugging me. But after more testing (including with lockdep,
which says absolutely nothing), I notice some RCU stalls after this
patch. It looks like call_rcu() really doesn't like to be called under
rcu_read_lock(). Please discard this patch set from patchwork, I'll
resend when things will work properly.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ