On Sun, Jan 13, 2019 at 05:35:19AM +0000, Parav Pandit wrote: > > Because the device_mutex and net lock are not nested, and the > > sequence is backwards, it has a problem. > > Yes. I see it now. This means we need to keep a shadow list which > register_device() can refer while holding device_mutex equivalent > lock which synchronizes with init_net() callback, so that shadow > list access is safe. This is the same basic problem client has with registration.. I was working on a locking pattern that makes this simpler and safe, I think we can copy that pattern here with no trouble. I'll send some code in a bit Jason