NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/38085: l_priority not protected against sloppy developers.

>Number:         38085
>Category:       kern
>Synopsis:       l_priority not protected against sloppy developers.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Feb 22 21:00:00 +0000 2008
>Originator:     Herb Peyerl
>Release:        NetBSD-current
System: NetBSD 3.1 NetBSD 3.1 (GENERIC.MP) #0: Tue Oct 31 
04:42:38 UTC 2006
Architecture: i386
Machine: i386

        A sloppy programmer (not me) who does:

    tsleep( arg, -1, "zzzzzz", 0 );

...can inadvertantly trash the runqueue/sleepq's causing someone (me) to spend
lots of quality time with ddb...

        Something like this?

Index: kern_sleepq.c
RCS file: /cvsroot/src/sys/kern/kern_sleepq.c,v
retrieving revision 1.21
diff -r1.21 kern_sleepq.c
<       l->l_priority = pri;
>       l->l_priority = (pri & MAXPRI);
<       l->l_inheritedprio = pri;
>       l->l_inheritedprio = (pri & MAXPRI);

Home | Main Index | Thread Index | Old Index