Thread (16 messages) 16 messages, 5 authors, 2016-09-10

Re: [PATCH] net_namespace: fixed net_device reference leak

flat view

From: David Ahern <hidden>
Date: 2016-09-10 16:12:53

On 9/8/16 6:35 PM, Jojy Varghese wrote:
Thanks for the feedback guys. I appreciate it.

I am working with 4.4.3 kernel.  I will try to reproduce the issue
with the kernel tree at
https://git.kernel.org/cgit/linux/kernel/git/davem/net.git.

In the meantime, the only data I have now is :
-  "dst-ifdown"  does not look correct since it will never release
reference to loopback device.
-  One way to fix might be to assign the 'dst''s net device to the
init net device. I thought adding reference to init net device's
loopback might be safe.

Any suggestion on debugging further is much appreciated.
Last 2 times I chased down netdev refcnts I used the attach patch. It adds tracepoints to dev_hold and dev_put.

perf record -e net:dev_hold,net:dev_put -a -g -- <run your test>

You probably will need to increase memory for perf buffers (e.g., -m 8192).

It will dump a lot of data but you will find the missing put; you just have to be patient wading through the data and matching up hold and put references. python/perl script with perf script can make that easier.

---

Have you looked at whether there are open sockets? e.g., perhaps a dst reference is cached on a socket

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help