[patch] POSIX advisory mode lock panic fix by Dfly

Joerg Sonnenberger joerg at britannica.bec.de
Thu Apr 22 01:20:54 PDT 2004


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 at xxxxxxxxxxxxx>





More information about the Submit mailing list