Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

iommu/amd: Correct the wrong setting of alias DTE in do_attach

In below commit alias DTE is set when its peripheral is
setting DTE. However there's a code bug here to wrongly
set the alias DTE, correct it in this patch.

commit e25bfb56ea7f046b71414e02f80f620deb5c6362
Author: Joerg Roedel <jroedel@suse.de>
Date: Tue Oct 20 17:33:38 2015 +0200

iommu/amd: Set alias DTE in do_attach/do_detach

Signed-off-by: Baoquan He <bhe@redhat.com>
Tested-by: Mark Hounschell <markh@compro.net>
Cc: stable@vger.kernel.org # v4.4
Signed-off-by: Joerg Roedel <jroedel@suse.de>

authored by

Baoquan He and committed by
Joerg Roedel
9b1a12d2 da972fb1

+1 -1
+1 -1
drivers/iommu/amd_iommu.c
··· 2049 2049 /* Update device table */ 2050 2050 set_dte_entry(dev_data->devid, domain, ats); 2051 2051 if (alias != dev_data->devid) 2052 - set_dte_entry(dev_data->devid, domain, ats); 2052 + set_dte_entry(alias, domain, ats); 2053 2053 2054 2054 device_flush_dte(dev_data); 2055 2055 }