Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1555929

Re: [PATCH v7 08/19] iommu: Implement reserved_regions iommu-group sysfs file

From Auger Eric <eric.auger@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH v7 08/19] iommu: Implement reserved_regions iommu-group sysfs file
Date 2017-01-10 22:30 +0100
Message-ID <sYc9s-6qU-49@gated-at.bofh.it> (permalink)
References <sXIuJ-4Rr-3@gated-at.bofh.it> <sXIuL-4Rr-55@gated-at.bofh.it> <sY7t8-3Cj-25@gated-at.bofh.it> <sY8fw-47w-21@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi Joerg,
On 10/01/2017 18:14, Joerg Roedel wrote:
> On Tue, Jan 10, 2017 at 05:20:34PM +0100, Auger Eric wrote:
>> The /sys/kernel/iommu_groups/n directory seems to be removed before this
>> gets called and this may produce a WARNING when devices get removed from
>> the group. I intend to remove the call since I have the feeling
>> everything gets cleaned up properly.
> 
> A feeling is not enough, please check that in the code.

So my understanding is on group's kobject_release we have:
kobject_release
|_ kobject_cleanup
	|_ kobject_del
		|_ sysfs_remove_dir
			|_ kernfs_remove
				|_ _kernfs_remove
	../..
	|_ ktype release (iommu_group_release)

_kernfs_remove() calls kernfs_put() on all descendant nodes, leading to
the whole directory cleanup.

In iommu_group_release I called sysfs_remove_file on the
reserved_regions attribute file. My understanding is its job is
identifical as what was done previously and the node was already
destroyed hence the warning.

sysfs_remove_file
|_ sysfs_remove_file_ns
	|_ kernfs_remove_by_name_ns
		|_kernfs_remove

So my understanding is it is safe to remove it.

Thanks

Eric
> 
> 
> 	Joerg
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

[PATCH v7 08/19] iommu: Implement reserved_regions iommu-group sysfs file Eric Auger <eric.auger@redhat.com> - 2017-01-09 14:50 +0100
  Re: [PATCH v7 08/19] iommu: Implement reserved_regions iommu-group  sysfs file Auger Eric <eric.auger@redhat.com> - 2017-01-10 17:30 +0100
    Re: [PATCH v7 08/19] iommu: Implement reserved_regions iommu-group  sysfs file Joerg Roedel <joro@8bytes.org> - 2017-01-10 18:20 +0100
      Re: [PATCH v7 08/19] iommu: Implement reserved_regions iommu-group  sysfs file Auger Eric <eric.auger@redhat.com> - 2017-01-10 22:30 +0100

csiph-web