Skip to content

sysctl: lockdep support.

Eric W. Biederman lkml netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 11 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2sysctl: Don't take the use count of multiple heads at a time.fs/proc/proc_sysctl.c+10 -140 replies
2/2sysctl: lockdep support for sysctl reference counting.include/linux/sysctl.h kernel/sysctl.c+91 -2111 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] sysctl: lockdep support.

The problem: There is a class of deadlocks that we currently have in the kernel that lockdep does not recognize.

In particular with the network stack we can have:

rtnl_lock();                         use_table();
unregister_netdevice();              rtnl_lock();
unregister_sysctl_table();           ....
wait_for_completion();               rtnl_lock();
....                                 unuse_table()
rtnl_unlock();                       complete();

Where we never make it to the lines labled ....

My patch following patches treats the sysctl use count as a read/writer lock for purposes of lockdep.

The code works but I'm not certain I have plugged into lockdep quite correctly.

Eric