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.



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