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


Groups > linux.kernel > #1375536 > unrolled thread

[patch] iommu/amd: Signedness bug in acpihid_device_group()

Started byDan Carpenter <dan.carpenter@oracle.com>
First post2016-04-11 09:20 +0200
Last post2016-04-11 16:20 +0200
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [patch] iommu/amd: Signedness bug in acpihid_device_group() Dan Carpenter <dan.carpenter@oracle.com> - 2016-04-11 09:20 +0200
    RE: [patch] iommu/amd: Signedness bug in acpihid_device_group() "Wan, Vincent" <Vincent.Wan@amd.com> - 2016-04-11 09:30 +0200
    Re: [patch] iommu/amd: Signedness bug in acpihid_device_group() Joerg Roedel <joro@8bytes.org> - 2016-04-11 16:20 +0200

#1375536 — [patch] iommu/amd: Signedness bug in acpihid_device_group()

FromDan Carpenter <dan.carpenter@oracle.com>
Date2016-04-11 09:20 +0200
Subject[patch] iommu/amd: Signedness bug in acpihid_device_group()
Message-ID<rmEiD-1Ws-35@gated-at.bofh.it>
"devid" needs to be signed for the error handling to work.

Fixes:b097d11a0fa3f ('iommu/amd: Manage iommu_group for ACPI HID devices')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index c430c10..12f7779 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -283,7 +283,7 @@ static struct iommu_dev_data *get_dev_data(struct device *dev)
 static struct iommu_group *acpihid_device_group(struct device *dev)
 {
 	struct acpihid_map_entry *p, *entry = NULL;
-	u16 devid;
+	int devid;
 
 	devid = get_acpihid_device_id(dev, &entry);
 	if (devid < 0)

[toc] | [next] | [standalone]


#1375538

From"Wan, Vincent" <Vincent.Wan@amd.com>
Date2016-04-11 09:30 +0200
Message-ID<rmEsi-225-3@gated-at.bofh.it>
In reply to#1375536
> From: Dan Carpenter [mailto:dan.carpenter@oracle.com]
> Sent: Monday, April 11, 2016 3:15 PM
> To: Joerg Roedel; Wan, Vincent
> Cc: iommu@lists.linux-foundation.org; linux-kernel@vger.kernel.org; kernel-
> janitors@vger.kernel.org
> Subject: [patch] iommu/amd: Signedness bug in acpihid_device_group()
> 
> "devid" needs to be signed for the error handling to work.
> 
> Fixes:b097d11a0fa3f ('iommu/amd: Manage iommu_group for ACPI HID
> devices')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
> index c430c10..12f7779 100644
> --- a/drivers/iommu/amd_iommu.c
> +++ b/drivers/iommu/amd_iommu.c
> @@ -283,7 +283,7 @@ static struct iommu_dev_data *get_dev_data(struct
> device *dev)  static struct iommu_group *acpihid_device_group(struct device
> *dev)  {
>  	struct acpihid_map_entry *p, *entry = NULL;
> -	u16 devid;
> +	int devid;

Sure, thanks for your patch.

Wan Zongshun.

> 
>  	devid = get_acpihid_device_id(dev, &entry);
>  	if (devid < 0)

[toc] | [prev] | [next] | [standalone]


#1376011

FromJoerg Roedel <joro@8bytes.org>
Date2016-04-11 16:20 +0200
Message-ID<rmKR4-7gk-31@gated-at.bofh.it>
In reply to#1375536
On Mon, Apr 11, 2016 at 10:14:46AM +0300, Dan Carpenter wrote:
> "devid" needs to be signed for the error handling to work.
> 
> Fixes:b097d11a0fa3f ('iommu/amd: Manage iommu_group for ACPI HID devices')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Applied, thanks.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web