tech-net archive

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

Re: locking order between softnet_lock and the kernel lock

Thor Lancelot Simon <> writes:

> On Mon, Mar 26, 2012 at 02:38:44PM -0400, Beverly Schwartz wrote:
>> Here at BBN, we are getting a hang with heavy use of networking code
>> and looking for possible deadlocks.  We've made modifications to the
>> kernel.  I'm trying to understand the lock order invariants to make
>> sure we have applied it correctly to our code.
> Generally speaking, I don't think we require locks to be released
> in order - though of course it is good practice.

I'd agree with that, but I think Bev is concerned about two locks A and
B where the taking order is A then B and

take A
take B
release A
take A

and if someone else grabs A at *, then the other is waiting for B and we
are waiting for B.   So out of order releasing seems fine, but once
starting to release I think you have to release all the way.
But I am feeling a bit fuzzy on this.

Attachment: pgp3oS22rdIpF.pgp
Description: PGP signature

Home | Main Index | Thread Index | Old Index