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]
Message-ID: <CALm+0cXwL2fjF9njuWDRX3cmnUqyPjNKAeWQaWZ6S+BedC3MXQ@mail.gmail.com>
Date: Mon, 21 Oct 2024 20:33:05 +0800
From: Z qiang <qiang.zhang1211@...il.com>
To: Frederic Weisbecker <frederic@...nel.org>
Cc: paulmck@...nel.org, neeraj.upadhyay@...nel.org, joel@...lfernandes.org, 
	urezki@...il.com, boqun.feng@...il.com, rcu@...r.kernel.org, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] rcu/nocb: Fix the WARN_ON_ONCE() in rcu_nocb_rdp_deoffload()

>
> Le Mon, Oct 21, 2024 at 07:01:02PM +0800, Z qiang a écrit :
> > > For the non-nocb cpus set during boot, the corresponding
> > > rcuop kthread, we should park directly, otherwise
> > > WARN_ON_ONCE(!rcu_rdp_is_offloaded(rdp)) will be triggered.
>
> Ah but this case is different. kthread_park() is called on
> the kthread that is freshly created. In that case it is
> parked before the kthread even had a chance to call its handler
> (which is rcu_nocb_cb_kthread()).
>
> See these lines in kthread():
>
>         /* OK, tell user we're spawned, wait for stop or wakeup */
>         __set_current_state(TASK_UNINTERRUPTIBLE);
>         create->result = current;
>         /*
>          * Thread is going to call schedule(), do not preempt it,
>          * or the creator may spend more time in wait_task_inactive().
>          */
>         preempt_disable();
>         complete(done);
>         schedule_preempt_disabled();
>         preempt_enable();
>
>         ret = -EINTR;
>         if (!test_bit(KTHREAD_SHOULD_STOP, &self->flags)) {
>                 cgroup_kthread_ready();
>                 __kthread_parkme(self);
>                 ret = threadfn(data);
>         }
>

Ah, Thanks!
get it, I ignored parkme in kthread(),
will update and resend.

Thanks
Zqiang


>
>
> So really rcu_rdp_is_offloaded() has to be true (but we can
> warn if it's not. Though we already have a test for this in
> nocb_cb_wait()).
>
> Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ