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>] [day] [month] [year] [list]
Date:	Tue, 08 Apr 2008 17:31:49 -0700
From:	akpm@...ux-foundation.org
To:	jeff@...zik.org
Cc:	netdev@...r.kernel.org, akpm@...ux-foundation.org,
	sonic.zhang@...log.com, cooloney@...nel.org
Subject: [patch for 2.6.25? 2/3] smc91x driver: fix bug: print warning only in interrupt mode

From: Sonic Zhang <sonic.zhang@...log.com>

http://blackfin.uclinux.org/gf/project/uclinux-dist/tracker/?action=TrackerItemEdit&tracker_item_id=3956

Signed-off-by: Sonic Zhang <sonic.zhang@...log.com>
Signed-off-by: Bryan Wu <cooloney@...nel.org>
Cc: Jeff Garzik <jeff@...zik.org>

On Fri, 28 Mar 2008 21:45:02 -0400 Jeff Garzik <jeff@...zik.org> wrote:

> akpm@...ux-foundation.org wrote:
> > From: Sonic Zhang <sonic.zhang@...log.com>
> > 
> > http://blackfin.uclinux.org/gf/project/uclinux-dist/tracker/?action=TrackerItemEdit&tracker_item_id=3956
> > 
> > Signed-off-by: Sonic Zhang <sonic.zhang@...log.com>
> > Signed-off-by: Bryan Wu <cooloney@...nel.org>
> > Cc: Jeff Garzik <jeff@...zik.org>
> > Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
> > ---
> > 
> >  drivers/net/smc91x.c |    2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff -puN drivers/net/smc91x.c~smc91x-driver-fix-bug-print-warning-only-in-interrupt-mode drivers/net/smc91x.c
> > --- a/drivers/net/smc91x.c~smc91x-driver-fix-bug-print-warning-only-in-interrupt-mode
> > +++ a/drivers/net/smc91x.c
> > @@ -1326,9 +1326,11 @@ static irqreturn_t smc_interrupt(int irq
> >  	SMC_SET_INT_MASK(lp, mask);
> >  	spin_unlock(&lp->lock);
> >  
> > +#ifndef CONFIG_NET_POLL_CONTROLLER
> >  	if (timeout == MAX_IRQ_LOOPS)
> >  		PRINTK("%s: spurious interrupt (mask = 0x%02x)\n",
> >  		       dev->name, mask);
> > +#endif
> >  	DBG(3, "%s: Interrupt done (%d loops)\n",
> >  	       dev->name, MAX_IRQ_LOOPS - timeout);
> 
> NAK
> 
> Either this code is OK or it isn't.  This patch simply hides a problem 
> inside a configuration the developer probably doesn't use.
> 
> What's the _real_ problem?  Looking at the tracker, I'd guess that some 
> events need to be masked, but are not?
> 
> If the hardware is asserting events continually, the current code does 
> the right thing -- keep processing interrupt events flagged, until (a) 
> no more events asserted or (b) max loop count reached.
> 
> So the question is to find out why you are hitting the timeout, and what 
> to do about it.

Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
---

 drivers/net/smc91x.c |    2 ++
 1 file changed, 2 insertions(+)

diff -puN drivers/net/smc91x.c~smc91x-driver-fix-bug-print-warning-only-in-interrupt-mode drivers/net/smc91x.c
--- a/drivers/net/smc91x.c~smc91x-driver-fix-bug-print-warning-only-in-interrupt-mode
+++ a/drivers/net/smc91x.c
@@ -1326,9 +1326,11 @@ static irqreturn_t smc_interrupt(int irq
 	SMC_SET_INT_MASK(lp, mask);
 	spin_unlock(&lp->lock);
 
+#ifndef CONFIG_NET_POLL_CONTROLLER
 	if (timeout == MAX_IRQ_LOOPS)
 		PRINTK("%s: spurious interrupt (mask = 0x%02x)\n",
 		       dev->name, mask);
+#endif
 	DBG(3, "%s: Interrupt done (%d loops)\n",
 	       dev->name, MAX_IRQ_LOOPS - timeout);
 
_
--
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