Re: [PATCH 2/2] sysctl: lockdep support for sysctl reference counting.

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Eric W. Biederman
Date: Tuesday, March 31, 2009 - 6:40 am

Peter Zijlstra <peterz@infradead.org> writes:


Exactly.

I must have written an explanation so many times that it got
lost when I wrote that commit message.

In particular the problem can be see with /proc/sys/net/ipv4/conf/*/forwarding.

The problem is that the handler for fowarding takes the rtnl_lock
with the reference count held.

Then we call unregister_sysctl_table under the rtnl_lock.
which waits for the reference count to go to zero.



If the refcount is to be considered a lock.  sysctl_lock must be considered
the internals of that lock.  lockdep gets extremely confused otherwise.
Since the spinlock is static to this file I'm not especially worried
about it.


There is only one place we initialize it, and as far as I know really
only one place we take it.  Which is the definition of a lockdep
class as far as I know.

Eric

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 0/2] sysctl: lockdep support., Eric W. Biederman, (Sat Mar 21, 12:39 am)
[PATCH 1/2] sysctl: Don't take the use count of multiple h ..., Eric W. Biederman, (Sat Mar 21, 12:40 am)
[PATCH 2/2] sysctl: lockdep support for sysctl reference ..., Eric W. Biederman, (Sat Mar 21, 12:42 am)
Re: [PATCH 2/2] sysctl: lockdep support for sysctl refere ..., Eric W. Biederman, (Mon Mar 30, 3:53 pm)
Re: [PATCH 2/2] sysctl: lockdep support for sysctl refere ..., Eric W. Biederman, (Mon Mar 30, 4:50 pm)
Re: [PATCH 2/2] sysctl: lockdep support for sysctl refere ..., Eric W. Biederman, (Tue Mar 31, 1:47 am)
Re: [PATCH 2/2] sysctl: lockdep support for sysctl refere ..., Eric W. Biederman, (Tue Mar 31, 6:40 am)
Re: [PATCH 2/2] sysctl: lockdep support for sysctl refere ..., Eric W. Biederman, (Tue Mar 31, 3:44 pm)