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]
Date:	Wed, 2 Jan 2013 12:34:09 -0800
From:	David Decotigny <decot@...glers.com>
To:	Ben Hutchings <bhutchings@...arflare.com>
Cc:	Josh Triplett <josh@...htriplett.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"David S. Miller" <davem@...emloft.net>,
	Or Gerlitz <ogerlitz@...lanox.com>,
	Amir Vadai <amirv@...lanox.com>,
	"Paul E. McKenney" <paul.mckenney@...aro.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Andrew Morton <akpm@...ux-foundation.org>,
	David Howells <dhowells@...hat.com>,
	Paul Gortmaker <paul.gortmaker@...driver.com>
Subject: Re: [PATCH v3] lib: cpu_rmap: avoid flushing all workqueues

Thanks,

I appreciate your review and clarification, as I was afraid there
could be something I missed. I will send v4 of this patch: an update
with the cpu_rmap_get helper that Josh suggested and the
"free_cpu_rmap" alias removed.

Regards,

--
David Decotigny

On Wed, Jan 2, 2013 at 12:29 PM, Ben Hutchings
<bhutchings@...arflare.com> wrote:
> On Sat, 2012-12-29 at 12:36 -0800, Josh Triplett wrote:
>> On Sat, Dec 29, 2012 at 11:57:09AM -0800, David Decotigny wrote:
>> > In some cases, free_irq_cpu_rmap() is called while holding a lock
>> > (eg. rtnl). This can lead to deadlocks, because it invokes
>> > flush_scheduled_work() which ends up waiting for whole system
>> > workqueue to flush, but some pending works might try to acquire the
>> > lock we are already holding.
>> >
>> > This commit uses reference-counting to replace
>> > irq_run_affinity_notifiers(). It also removes
>> > irq_run_affinity_notifiers() altogether.
>> >
>> > Signed-off-by: David Decotigny <decot@...glers.com>
>>
>> You might consider adding a cpu_rmap_get to parallel cpu_rmap_put.
>>
>> Also, why keep free_cpu_rmap around at this point?  As far as I can
>> tell, it has no callers.
>>
>> Otherwise, this looks good to me.
>
> I intended to make cpu_rmap usable independently of IRQ notification,
> although as you note there have been no other users so far.
> free_cpu_rmap() is now effectively an alias for cpu_rmap_put(), and the
> latter *does* have a caller.  So perhaps cpu_rmap_put() should be extern
> and the alias dropped.
>
> Ben.
>
> --
> Ben Hutchings, Staff Engineer, Solarflare
> Not speaking for my employer; that's the marketing department's job.
> They asked us to note that Solarflare product names are trademarked.
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ