lkml.org 
[lkml]   [2022]   [Feb]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v1 09/10] iommu/vt-d: Refactor dmar_insert_one_dev_info()
Hi BaoLu,

On Mon, 7 Feb 2022 14:41:41 +0800, Lu Baolu <baolu.lu@linux.intel.com>
wrote:

> static void intel_iommu_release_device(struct device *dev)
> {
> - struct intel_iommu *iommu;
> -
> - iommu = device_to_iommu(dev, NULL, NULL);
> - if (!iommu)
> - return;
> -
> - dmar_remove_one_dev_info(dev);
> + struct device_domain_info *info = get_domain_info(dev);
> + unsigned long index = DEVI_IDX(info->segment, info->bus,
> info->devfn);
> + xa_erase(&device_domain_array, index);
> + dev_iommu_priv_set(info->dev, NULL);
> set_dma_ops(dev, NULL);
> + kfree(info);
Now that info and sinfo are under RCU, should we use kfree_rcu?

Thanks,

Jacob

\
 
 \ /
  Last update: 2022-02-07 19:35    [W:0.154 / U:1.528 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site