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: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Tue, 20 Apr 2004 12:42:23 -0700 (PDT)

:>       integrated into the lockf structure allocation and deallocation
:>       functions).
:
:Well, the number of locks needs to be kept track of on a per-process 
:level as well for possible setuid() transfers. I think that passing a 
:struct lockf * is a good idea; but it's not moot unless the process 
:count is upgraded in the lf_alloc() instead of in chgposixlockcnt() (but 
:I don't think that's very clean, is it?)

    Sometimes these things just fall into place, other times they are
    predetermined to be ugly no matter what you do :-).

    If its going to be ugly it is best to put the ugliness all in one place.
    So, for example, it is generally better to pass the governing structure 
    to a wrapper procedure with ugly insides then it is to strew 'pp' all over
    the source file.  Sometimes special cases prevent it from working out,
    and sometimes things just fall into place and you get an elegant solution.

						-Matt



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