lkml.org 
[lkml]   [2023]   [Jan]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH net-next v8 1/8] bnxt_en: Add auxiliary driver support
On Thu, 19 Jan 2023 22:05:28 -0800 Ajit Khaparde wrote:
> @@ -13212,6 +13214,7 @@ static void bnxt_remove_one(struct pci_dev *pdev)
> kfree(bp->rss_indir_tbl);
> bp->rss_indir_tbl = NULL;
> bnxt_free_port_stats(bp);
> + bnxt_aux_priv_free(bp);
> free_netdev(dev);

You're still freeing the memory in which struct device sits regardless
of its reference count.

Greg, is it legal to call:

auxiliary_device_delete(adev); // AKA device_del(&auxdev->dev);
auxiliary_device_uninit(adev); // AKA put_device(&auxdev->dev);
free(adev); // frees struct device

? I tried to explain this three times, maybe there's some wait during
device_del() I'm not seeing which makes this safe :S

\
 
 \ /
  Last update: 2023-03-26 23:53    [W:0.112 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site