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]
Date:	Mon, 26 May 2014 18:20:50 +0100
From:	Ben Hutchings <>
To:	Amir Vadai <>
Cc:	"David S. Miller" <>,,
	Yevgeny Petrilin <>,
	Or Gerlitz <>,
	Yuval Atias <>
Subject: Re: [PATCH net-next 1/9] net/mlx4_core: Enforce irq affinity
 changes immediatly

On Mon, 2014-05-19 at 14:33 +0300, Amir Vadai wrote:
> On 5/17/2014 11:33 PM, Ben Hutchings wrote:
> > On Mon, 2014-05-12 at 10:43 +0300, Amir Vadai wrote:
> >> From: Yuval Atias <>
> >>
> >> During heavy traffic, napi is constatntly polling the complition queue
> >> and no interrupt is fired. Because of that, changes to irq affinity are
> >> ignored until traffic is stopped and resumed.
> >>
> >> By registering to the irq notifier mechanism, and forcing interrupt when
> >> affinity is changed, irq affinity changes will be immediatly enforced.
> > [...]
> >
> > This somewhat breaks ARFS in your driver, as that depends on IRQ
> > affinity notification.
> Interesting...
> I missed the fact that irq_set_affinity_notifier is 'set' and not 'add'.
> So, do you have objection if I change the API to have a list of 
> notifiers instead of only one?

I don't mind.

> > It is also not safe to put an IRQ affinity notification function in a
> > module currently, as the work item for notification doesn't carry a
> > module reference and could be called after the module is removed.
> I can get a module reference when a notifier is added and put it when 
> the notifier is removed.

Maybe you can drop the reference in the affinity notifier release()
function, though that might still leave a race condition.  But the
module won't be removable until its devices are first removed or at
least brought down (depending on where you add/remove the notifier).

Anyway, I think that the issue you have found is quite general and
should be fixed in the networking core rather than your specific driver.


Ben Hutchings
Humans are not rational beings; they are rationalising beings.

Download attachment "signature.asc" of type "application/pgp-signature" (829 bytes)

Powered by blists - more mailing lists