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:	Tue, 07 Aug 2007 16:04:19 -0700
From:	Roland Dreier <rdreier@...co.com>
To:	Michael Buesch <mb@...sch.de>
Cc:	"Michael Chan" <mchan@...adcom.com>, davem@...emloft.net,
	jeff@...zik.org, netdev@...r.kernel.org, eliezert@...adcom.com,
	lusinsky@...adcom.com, eilong@...adcom.com
Subject: Re: [RFC][BNX2X]: New driver for Broadcom 10Gb Ethernet.

 > > +static irqreturn_t bnx2x_msix_sp_int(int irq, void *dev_instance)
 > > +{
 > > +	struct net_device *dev = dev_instance;
 > 
 > You need to check if dev==NULL and bail out.
 > Another driver sharing the IRQ with this might choose to pass the dev
 > pointer as NULL.

I don't really understand this.  If another driver is sharing the IRQ
with a different device pointer (or even NULL), then that driver's
handler is the one that would be called.  It's certainly the case that
an interrupt handler can be called for a shared interrupt generated by
another device, but a driver will never get a cookie back into its
interrupt handler different than the one it passed to request_irq().

A NULL check couldn't really help anything -- because if one driver's
dev_id can get passed into another driver's interrupt handler, the
non-NULL case would be even worse, because you would have one driver
poking into another driver's data structure.  But fortunately the
kernel is smart enough not to create this mess.

(And also, MSI-X interrupts are never shared so this is doubly
irrelevant in this particular case)

 - R.
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ