Re: [CFT][PATCH] net: Delay default_device_exit_batch until no devices are unregistering
From: Francesco Ruggeri <hidden>
Date: 2013-09-17 17:14:32
From: Francesco Ruggeri <hidden>
Date: 2013-09-17 17:14:32
If you could test this patch perhaps refine it I think we are almost at a final point of fixing this.
I will.
Just to be clear my reason for prefering this approach is that because it adds no extra wait points (we already wait for the rtnl_lock), the logic is unconditional and explicit and not hidden in the loopback device's reference count. Which should allow anyone reading the code to discover and understand this guarantee. Although a big fat comment in default_device_exit_batch that we are guaranteeing we don't allow the network namespace to exit while there are still network devices in it (or something to that effect) is probably appropriate.
I agree, this approach is cleaner than overloading loopback_dev's refcount as in my original patch. I will let you know how my tests go over the next few days. Thanks, Francesco
Eric