DragonFly BSD
DragonFly submit List (threaded) for 2004-04
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: [patch] POSIX advisory mode lock panic fix by Dfly


From: Joerg Sonnenberger <joerg@xxxxxxxxxxxxxxxxx>
Date: Thu, 22 Apr 2004 10:17:07 +0200

On Thu, Apr 22, 2004 at 01:01:08AM -0700, Matthew Dillon wrote:
>     I'm a bit confused about lf_count_adjust() ... why is it changing
>     the newowner pointer?  Maybe you meant newowner->ui_posixlocks +=
>     instead of newowner +=  ?

Yeah, typo.

>     lf_count_increment() is still entanged with the resource check.
>     lf_count_increment() should be integrated with or called from
>     the allocation code, and the resource check should be done 
>     separately.  lf_count_decrement() should be integrated with the
>     structure freeing code.  When you have the increment/decrement
>     disconnected the way it is in the patch, chances are very high that
>     bugs will creep in.

I'm going to think about the whole lock handling in kern_lockf.c, I have
the slight feeling I can simplify it and do the allocation properly at the
same time.

Joerg

> 
> 					-Matt
> 					Matthew Dillon 
> 					<dillon@xxxxxxxxxxxxx>



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