On 8/15/18 2:07 AM, Toshiaki Makita wrote: > David Ahern reported memory leak in veth. >
... > veth_rq allocated in veth_newlink() was not freed on dellink. > > We need to free up them after veth_close() so that any packets will not > reference the queues afterwards. Thus free them in veth_dev_free() in > the same way as freeing stats structure (vstats). > > Also move queues allocation to veth_dev_init() to be in line with stats > allocation. > > Fixes: 638264dc90227 ("veth: Support per queue XDP ring") > Reported-by: David Ahern <dsah...@gmail.com> > Signed-off-by: Toshiaki Makita <makita.toshi...@lab.ntt.co.jp> > --- > This is a fix for a bug which exists only in net-next. > Let me know if I should wait for -next merging into net or reopen of -next. > > drivers/net/veth.c | 70 > +++++++++++++++++++++++++----------------------------- > 1 file changed, 33 insertions(+), 37 deletions(-) > Reviewed-by: David Ahern <dsah...@gmail.com> Tested-by: David Ahern <dsah...@gmail.com>