NetBSD-Bugs archive

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

Re: kern/38085: l_priority not protected against sloppy developers.



The following reply was made to PR kern/38085; it has been noted by GNATS.

From: Andrew Doran <ad%netbsd.org@localhost>
To: Christos Zoulas <christos%zoulas.com@localhost>
Cc: gnats-bugs%NetBSD.org@localhost, kern-bug-people%netbsd.org@localhost,
        gnats-admin%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost
Subject: Re: kern/38085: l_priority not protected against sloppy developers.
Date: Sun, 24 Feb 2008 03:51:15 +0000

 On Fri, Feb 22, 2008 at 05:13:54PM -0500, Christos Zoulas wrote:
 
 > | Index: kern_sleepq.c
 > | ===================================================================
 > | RCS file: /cvsroot/src/sys/kern/kern_sleepq.c,v
 > | retrieving revision 1.21
 > | diff -r1.21 kern_sleepq.c
 > | 456c456
 > | <  l->l_priority = pri;
 > | ---
 > | >  l->l_priority = (pri & MAXPRI);
 > | 472c472
 > | <  l->l_inheritedprio = pri;
 > | ---
 > | >  l->l_inheritedprio = (pri & MAXPRI);
 > 
 > I think sloppy programmers should be spanked, and this should be a KASSERT()
 > instead.
 
 Agreed. In -current, tsleep() ignores the priority passed in by the caller
 and new code is using condition variables.
 
 Thanks,
 Andrew
 


Home | Main Index | Thread Index | Old Index