Thread (6 messages) 6 messages, 3 authors, 2020-09-01

Re: [PATCH] veth: fix memory leak in veth_newlink()

From: Rustam Kovhaev <hidden>
Date: 2020-08-31 00:50:55
Also in: bpf, lkml

On Mon, Aug 31, 2020 at 09:16:32AM +0900, Toshiaki Makita wrote:
On 2020/08/30 22:13, Rustam Kovhaev wrote:
quoted
when register_netdevice(dev) fails we should check whether struct
veth_rq has been allocated via ndo_init callback and free it, because,
depending on the code path, register_netdevice() might not call
priv_destructor() callback
AFAICS, register_netdevice() always goto err_uninit and calls priv_destructor()
on failure after ndo_init() succeeded.
So I could not find such a code path.
Would you elaborate on it?
in net/core/dev.c:9863, where register_netdevice() calls rollback_registered(),
which does not call priv_destructor(), then register_netdevice() returns error
net/core/dev.c:9884
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help