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: <ZS_L_pWMNVYLka-K@localhost.localdomain>
Date:   Wed, 18 Oct 2023 14:13:50 +0200
From:   Frederic Weisbecker <frederic@...nel.org>
To:     Tejun Heo <tj@...nel.org>
Cc:     Lai Jiangshan <jiangshanlai@...il.com>,
        LKML <linux-kernel@...r.kernel.org>,
        "Paul E . McKenney" <paulmck@...nel.org>
Subject: Re: [PATCH] workqueue: Provide one lock class key per work_on_cpu()
 callsite

Le Tue, Oct 17, 2023 at 11:53:12PM -1000, Tejun Heo a écrit :
> On Sun, Sep 24, 2023 at 05:07:02PM +0200, Frederic Weisbecker wrote:
> > All callers of work_on_cpu() share the same lock class key for all the
> > functions queued. As a result the workqueue related locking scenario for
> > a function A may be spuriously accounted as an inversion against the
> > locking scenario of function B such as in the following model:
> > 
> > 	long A(void *arg)
> > 	{
> > 		mutex_lock(&mutex);
> > 		mutex_unlock(&mutex);
> > 	}
> > 
> > 	long B(void *arg)
> > 	{
> > 	}
> > 
> > 	void launchA(void)
> > 	{
> > 		work_on_cpu(0, A, NULL);
> > 	}
> > 
> > 	void launchB(void)
> > 	{
> > 		mutex_lock(&mutex);
> > 		work_on_cpu(1, B, NULL);
> > 		mutex_unlock(&mutex);
> > 	}
> > 
> > launchA and launchB running concurrently have no chance to deadlock.
> > However the above can be reported by lockdep as a possible locking
> > inversion because the works containing A() and B() are treated as
> > belonging to the same locking class.
> 
> Sorry about the delay. I missed this one. Applied to wq/for-6.7.

No problem, thanks a lot!

> 
> Thanks.
> 
> -- 
> tejun

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ