[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-arm-kernel
Subject:    Re: race condition in do_IRQ
From:       Marius Groeger <mgroeger () sysgo ! com>
Date:       2004-05-07 8:15:25
Message-ID: Pine.LNX.4.56.0405071001230.2015 () mag ! sysgo ! com
[Download RAW message or body]

On Thu, 6 May 2004, Matthias Welwarsky wrote:

> However, in this particular case, the simple fact that this code is in use in
> production systems for some time should have lead to the assumption that it
> cannot be _that_ borked. Rule of thumb: if you find code in the linux kernel

To explain the background: we are trying to find a tricky bug with current
RTAI on ARM7 and need to understand the Linux side completely first.

On Thu, 6 May 2004, Marc Singer wrote:

> We're all better off reading the code than reading comments.  Really.

If a function relies on lockings that happen outside it's scope, this does
deserve a comment, don't you think?

On Thu, 6 May 2004, Erik Mouw wrote:

> On Thu, May 06, 2004 at 05:23:33PM +0200, Marius Groeger wrote:
> > > Because then you're documenting how the code works, which is against the
> > > coding style.  The code tells you how it works (if people read it) so
> > > its redundant.
> >
> > You are actually serious about that, right?
>
> Of course he is. See Chapter 5 in Documentation/CodingStyle.

The same chapter also demands to write code which is obvious. I don't feel
that the code in question lives up to this, but of course, YMMV. If the code
works on the implicit assumption that a certain lock is in effect, this is
not obvious or readable from this code in the slightest way.

Don't stick to the rules for the rule's sake.

Thanks again to all who commented (oops! :-) on the initial problem!

Regards,
Marius

-- 
Marius Groeger <mgroeger@sysgo.com>           Project Manager
SYSGO AG                      Embedded and Real-Time Software
Voice: +49 6136 9948 0                  FAX: +49 6136 9948 10
www.sysgo.com | www.elinos.com | www.osek.de | www.imerva.com


-------------------------------------------------------------------
Subscription options: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel
FAQ:       http://www.arm.linux.org.uk/armlinux/mlfaq.php
Etiquette: http://www.arm.linux.org.uk/armlinux/mletiquette.php
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic