Unverified Commit 35c8e6d6 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!5648 [sync] PR-5493: arm64/mpam: Fix repeated enabling in mpam_enable()

parents 9a28ee65 026e3154
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -543,6 +543,7 @@ static void mpam_enable(struct work_struct *work)
	unsigned long flags;
	struct mpam_device *dev;
	bool all_devices_probed = true;
	static atomic_t once;

	/* Have we probed all the devices? */
	mutex_lock(&mpam_devices_lock);
@@ -557,7 +558,7 @@ static void mpam_enable(struct work_struct *work)
	}
	mutex_unlock(&mpam_devices_lock);

	if (!all_devices_probed)
	if (!(all_devices_probed && !atomic_fetch_inc(&once)))
		return;

	mutex_lock(&mpam_devices_lock);