tech-kern archive

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

Re: PUFFS lookup/reclaim race



On Fri, Jul 13, 2012 at 12:34:20AM +0000, Emmanuel Dreyfus wrote:
 > Understanding how it happens is nice, now the next question is: how
 > can I fix it? The only way I can think of is to prevent inactive from
 > recycling the vnode if a lookup is in progress anywhere in the filesystem.
 > Any better idea?

Yeah: don't return copies of things that are basically pointers (in
this case, the cookie) without doing proper usage tracking on them. It
isn't valid to reclaim something that someone else is using; the way
to prevent it is to take out a reservation (commonly expressed by
counting references) on the thing. Or to never reclaim anything
except by garbage collection, but that's almost always painful.

-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index