All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lu Baolu <baolu.lu@linux.intel.com>
To: Jon Derrick <jonathan.derrick@intel.com>,
	iommu@lists.linux-foundation.org, linux-pci@vger.kernel.org
Cc: baolu.lu@linux.intel.com, Bjorn Helgaas <helgaas@kernel.org>,
	Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
	Keith Busch <kbusch@kernel.org>, Joerg Roedel <joro@8bytes.org>,
	Christoph Hellwig <hch@lst.de>,
	David Woodhouse <dwmw2@infradead.org>
Subject: Re: [RFC 1/5] iommu: Remove device link to group on failure
Date: Wed, 1 Jan 2020 11:59:43 +0800	[thread overview]
Message-ID: <14d024e0-42df-12ae-0571-bd27b26166b7@linux.intel.com> (raw)
In-Reply-To: <1577823863-3303-2-git-send-email-jonathan.derrick@intel.com>

Hi,

On 1/1/20 4:24 AM, Jon Derrick wrote:
> This adds the missing teardown step that removes the device link from
> the group when the device addition fails.

This change looks good to me.

Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>

Best regards,
baolu

> 
> Signed-off-by: Jon Derrick <jonathan.derrick@intel.com>
> ---
>   drivers/iommu/iommu.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
> index d5174f0..3e35284 100644
> --- a/drivers/iommu/iommu.c
> +++ b/drivers/iommu/iommu.c
> @@ -768,6 +768,7 @@ int iommu_group_add_device(struct iommu_group *group, struct device *dev)
>   	mutex_unlock(&group->mutex);
>   	dev->iommu_group = NULL;
>   	kobject_put(group->devices_kobj);
> +	sysfs_remove_link(group->devices_kobj, device->name);
>   err_free_name:
>   	kfree(device->name);
>   err_remove_link:
> 

WARNING: multiple messages have this Message-ID (diff)
From: Lu Baolu <baolu.lu@linux.intel.com>
To: Jon Derrick <jonathan.derrick@intel.com>,
	iommu@lists.linux-foundation.org, linux-pci@vger.kernel.org
Cc: Bjorn Helgaas <helgaas@kernel.org>,
	Keith Busch <kbusch@kernel.org>,
	David Woodhouse <dwmw2@infradead.org>,
	Christoph Hellwig <hch@lst.de>
Subject: Re: [RFC 1/5] iommu: Remove device link to group on failure
Date: Wed, 1 Jan 2020 11:59:43 +0800	[thread overview]
Message-ID: <14d024e0-42df-12ae-0571-bd27b26166b7@linux.intel.com> (raw)
In-Reply-To: <1577823863-3303-2-git-send-email-jonathan.derrick@intel.com>

Hi,

On 1/1/20 4:24 AM, Jon Derrick wrote:
> This adds the missing teardown step that removes the device link from
> the group when the device addition fails.

This change looks good to me.

Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>

Best regards,
baolu

> 
> Signed-off-by: Jon Derrick <jonathan.derrick@intel.com>
> ---
>   drivers/iommu/iommu.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
> index d5174f0..3e35284 100644
> --- a/drivers/iommu/iommu.c
> +++ b/drivers/iommu/iommu.c
> @@ -768,6 +768,7 @@ int iommu_group_add_device(struct iommu_group *group, struct device *dev)
>   	mutex_unlock(&group->mutex);
>   	dev->iommu_group = NULL;
>   	kobject_put(group->devices_kobj);
> +	sysfs_remove_link(group->devices_kobj, device->name);
>   err_free_name:
>   	kfree(device->name);
>   err_remove_link:
> 
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

  reply	other threads:[~2020-01-01  4:00 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-31 20:24 [RFC 0/5] Clean up VMD DMA Map Ops Jon Derrick
2019-12-31 20:24 ` Jon Derrick
2019-12-31 20:24 ` [RFC 1/5] iommu: Remove device link to group on failure Jon Derrick
2019-12-31 20:24   ` Jon Derrick
2020-01-01  3:59   ` Lu Baolu [this message]
2020-01-01  3:59     ` Lu Baolu
2019-12-31 20:24 ` [RFC 2/5] iommu/vt-d: Unlink device if failed to add to group Jon Derrick
2019-12-31 20:24   ` Jon Derrick
2020-01-01  4:05   ` Lu Baolu
2020-01-01  4:05     ` Lu Baolu
2020-01-12  1:36   ` Lu Baolu
2020-01-12  1:36     ` Lu Baolu
2020-01-13 12:20     ` Joerg Roedel
2020-01-13 12:20       ` Joerg Roedel
2020-01-14  1:58       ` Lu Baolu
2020-01-14  1:58         ` Lu Baolu
2019-12-31 20:24 ` [RFC 3/5] x86/PCI: Expose VMD's device in pci_sysdata Jon Derrick
2019-12-31 20:24   ` Jon Derrick
2020-01-09 14:33   ` Christoph Hellwig
2020-01-09 14:33     ` Christoph Hellwig
2020-01-09 15:06     ` Derrick, Jonathan
2020-01-09 15:06       ` Derrick, Jonathan
2020-01-09 16:45     ` Derrick, Jonathan
2020-01-09 16:45       ` Derrick, Jonathan
2019-12-31 20:24 ` [RFC 4/5] PCI: vmd: Stop overriding dma_map_ops Jon Derrick
2019-12-31 20:24   ` Jon Derrick
2020-01-03 15:00   ` kbuild test robot
2020-01-04  9:39   ` kbuild test robot
2020-01-09 14:36   ` Christoph Hellwig
2020-01-09 14:36     ` Christoph Hellwig
2020-01-09 15:08     ` Derrick, Jonathan
2020-01-09 15:08       ` Derrick, Jonathan
2019-12-31 20:24 ` [RFC 5/5] x86/PCI: Remove unused X86_DEV_DMA_OPS Jon Derrick
2019-12-31 20:24   ` Jon Derrick
2020-01-09 14:37   ` Christoph Hellwig
2020-01-09 14:37     ` Christoph Hellwig
2020-01-09 15:06     ` Derrick, Jonathan
2020-01-09 15:06       ` Derrick, Jonathan
2020-01-07 13:41 ` [RFC 0/5] Clean up VMD DMA Map Ops Joerg Roedel
2020-01-07 13:41   ` Joerg Roedel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=14d024e0-42df-12ae-0571-bd27b26166b7@linux.intel.com \
    --to=baolu.lu@linux.intel.com \
    --cc=dwmw2@infradead.org \
    --cc=hch@lst.de \
    --cc=helgaas@kernel.org \
    --cc=iommu@lists.linux-foundation.org \
    --cc=jonathan.derrick@intel.com \
    --cc=joro@8bytes.org \
    --cc=kbusch@kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.