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 [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to