On 1/17/2019 4:09 PM, Jason Gunthorpe wrote:
On Thu, Jan 17, 2019 at 12:41:22PM -0800, Dennis Dalessandro wrote:
From: Andrzej Witkowski <andrzej.witkowski@xxxxxxxxx>
VNIC uses the old deprecated path for freeing netdev private device
information. This will lead to a memory leak (of netdev devices)
and possibly incorrect cleanup behavior.
Fix by using the new API in the VNIC code path.
Fixes: 9f49a5b5c21d ("RDMA/netdev: Use priv_destructor for netdev cleanup")
? vnic's flow didn't change at all in that patch, specifically to not
create new bugs in it. I think it was already broken mind you..
Quite possible. Will look into it.
register_netdev sometimes calls the priv_destructor, and sometimes
doesn't, so this is a double free on error paths. Look at how ipoib
works for guidance..
Will work with the patch author internally and revise.
-Denny