Re: [PATCH for-rc 2/7] IB/hfi1: Use new API to deallocate vnic rdma-netdev in hfi1 driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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






[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux