stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH AUTOSEL 4.4 01/17] iommu/arm-smmu: Free context bitmap in the err path of arm_smmu_init_domain_context
@ 2019-10-26 13:22 Sasha Levin
  2019-10-26 13:22 ` [PATCH AUTOSEL 4.4 02/17] mac80211_hwsim: fix incorrect dev_alloc_name failure goto Sasha Levin
                   ` (15 more replies)
  0 siblings, 16 replies; 17+ messages in thread
From: Sasha Levin @ 2019-10-26 13:22 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: Liu Xiang, Will Deacon, Sasha Levin, iommu

From: Liu Xiang <liuxiang_1999@126.com>

[ Upstream commit 6db7bfb431220d78e34d2d0afdb7c12683323588 ]

When alloc_io_pgtable_ops is failed, context bitmap which is just allocated
by __arm_smmu_alloc_bitmap should be freed to release the resource.

Signed-off-by: Liu Xiang <liuxiang_1999@126.com>
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/iommu/arm-smmu.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c
index 47dc7a793f5cf..bc22065d2afa8 100644
--- a/drivers/iommu/arm-smmu.c
+++ b/drivers/iommu/arm-smmu.c
@@ -916,6 +916,7 @@ static int arm_smmu_init_domain_context(struct iommu_domain *domain,
 	return 0;
 
 out_clear_smmu:
+	__arm_smmu_free_bitmap(smmu->context_map, cfg->cbndx);
 	smmu_domain->smmu = NULL;
 out_unlock:
 	mutex_unlock(&smmu_domain->init_mutex);
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2019-10-26 13:24 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-26 13:22 [PATCH AUTOSEL 4.4 01/17] iommu/arm-smmu: Free context bitmap in the err path of arm_smmu_init_domain_context Sasha Levin
2019-10-26 13:22 ` [PATCH AUTOSEL 4.4 02/17] mac80211_hwsim: fix incorrect dev_alloc_name failure goto Sasha Levin
2019-10-26 13:22 ` [PATCH AUTOSEL 4.4 03/17] mac80211: accept deauth frames in IBSS mode Sasha Levin
2019-10-26 13:22 ` [PATCH AUTOSEL 4.4 04/17] llc: fix sk_buff leak in llc_sap_state_process() Sasha Levin
2019-10-26 13:22 ` [PATCH AUTOSEL 4.4 05/17] llc: fix sk_buff leak in llc_conn_service() Sasha Levin
2019-10-26 13:22 ` [PATCH AUTOSEL 4.4 06/17] llc: fix another potential sk_buff leak in llc_ui_sendmsg() Sasha Levin
2019-10-26 13:22 ` [PATCH AUTOSEL 4.4 07/17] llc: fix sk_buff refcounting in llc_conn_state_process() Sasha Levin
2019-10-26 13:22 ` [PATCH AUTOSEL 4.4 08/17] net: stmmac: fix length of PTP clock's name string Sasha Levin
2019-10-26 13:22 ` [PATCH AUTOSEL 4.4 09/17] bonding: fix potential NULL deref in bond_update_slave_arr Sasha Levin
2019-10-26 13:22 ` [PATCH AUTOSEL 4.4 10/17] drm/msm/dsi: Implement reset correctly Sasha Levin
2019-10-26 13:22 ` [PATCH AUTOSEL 4.4 11/17] hrtimer: Annotate lockless access to timer->base Sasha Levin
2019-10-26 13:22 ` [PATCH AUTOSEL 4.4 12/17] xtensa: fix {get,put}_user() for 64bit values Sasha Levin
2019-10-26 13:22 ` [PATCH AUTOSEL 4.4 13/17] net: bcmgenet: Fix RGMII_MODE_EN value for GENET v1/2/3 Sasha Levin
2019-10-26 13:22 ` [PATCH AUTOSEL 4.4 14/17] net: usb: sr9800: fix uninitialized local variable Sasha Levin
2019-10-26 13:22 ` [PATCH AUTOSEL 4.4 15/17] usb: hso: obey DMA rules in tiocmget Sasha Levin
2019-10-26 13:23 ` [PATCH AUTOSEL 4.4 16/17] ocfs2: fix error handling in ocfs2_setattr() Sasha Levin
2019-10-26 13:23 ` [PATCH AUTOSEL 4.4 17/17] scripts/gdb: fix debugging modules on s390 Sasha Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).