]> git.baikalelectronics.ru Git - kernel.git/commit
iommu/vt-d: Fix an unbalanced rcu_read_lock/rcu_read_unlock()
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Fri, 26 Nov 2021 13:55:55 +0000 (21:55 +0800)
committerJoerg Roedel <jroedel@suse.de>
Fri, 26 Nov 2021 21:54:47 +0000 (22:54 +0100)
commit8a5ee831c4140bdf2bff4e42e5f9e8f7f54239c2
tree68de0d73a4bd890163f2dfec8763c7ce6e0653cd
parentd49fb673eafa74df6a613dd9f9687127d0aa6cd1
iommu/vt-d: Fix an unbalanced rcu_read_lock/rcu_read_unlock()

If we return -EOPNOTSUPP, the rcu lock remains lock. This is spurious.
Go through the end of the function instead. This way, the missing
'rcu_read_unlock()' is called.

Fixes: 2374ce0e0d41 ("iommu/vt-d: Check FL and SL capability sanity in scalable mode")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/40cc077ca5f543614eab2a10e84d29dd190273f6.1636217517.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Link: https://lore.kernel.org/r/20211126135556.397932-2-baolu.lu@linux.intel.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/intel/cap_audit.c