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]
Date:	Thu, 24 May 2007 10:58:49 +0530
From:	Vivek Goyal <vgoyal@...ibm.com>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
Cc:	Bernhard Walle <bwalle@...e.de>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Fix crash with irqpoll due to the IRQF_IRQPOLL flag

On Wed, May 23, 2007 at 09:01:04AM -0700, Linus Torvalds wrote:
> 
> 
> On Tue, 22 May 2007, Bernhard Walle wrote:
> >
> > o System crashes if booted with irqpoll command line option.
> > 
> > o Problem happens because Inside note_interrupt() we are accessing
> >   desc->action->flag without taking the desc->lock. While accessing it
> >   somebody goes ahead and unregisters the irq handler hence desc->action
> >   is NULL. By the time note_interrupt() checks it, it crashes.
> 
> I absolutely _detest_ patches that make already complex and unreadable 
> code even more so. Especially conditionals. Please don't do that.
> 
> If you need a variable for a conditional, make it be an implicit one from 
> an inline function, and aim for making it readable.
> 
> So how about instead writing it out as a nice self-explanatory inline 
> function? I can almost guarantee that this generates no worse code, and it 
> also makes it easy to explain things like "we don't bother with the lock, 
> because we don't care enough".
> 
> Untested, but I think the point of the patch is obvious. Anybody want to 
> test it, send it back to me, and fix the bug while making the code more 
> readable?
> 

Hi Linus,

I tested it. It works fine. And yes, this patch is more readable.

Thanks
Vivek
-
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