Subject: Re: Question on ipmr.c locking in 2.6.25

From: Ben Greear <[email-masked]>
Date: Wed, 28 May 2008 15:06:45 -0700

Ben Hutchings wrote:
> Ben Greear wrote:
>> It looks like this method can return without unlocking the
>> mrt_lock or mfc_unres_lock.  Is this a bug, or am I just
>> confused about how it is supposed to work?
> <snip>
> 
> Since it returns without unlocking in the normal (not error) case, I would
> guess that's how it's supposed to work.  The caller can uses the it->cache
> pointer to work out which lock (if any) it needs to unlock.
> 
> Still, this is an unusual way of doing things, and rates about a 2 on
> Rusty's scale <http://ozlabs.org/~rusty/index.cgi/2008/03/30/> (though
> to be fair this is not critical for static functions).

Ok, I think I see how it works.

Now I wonder:  If a reader read only a small bit of the proc file,
and then just went to sleep w/out closing or reading the rest of
the file, would that effectively DOS a system by pinning the locks?

Thanks,
Ben

> Ben.

-- 
Ben Greear <[email-masked]>
Candela Technologies Inc  http://www.candelatech.com