* Patch "iommu/amd: Fix bug in put_pasid_state_wait" has been added to the 4.0-stable tree
@ 2015-06-02 7:22 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2015-06-02 7:22 UTC (permalink / raw)
To: oded.gabbay, gregkh, jroedel; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
iommu/amd: Fix bug in put_pasid_state_wait
to the 4.0-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
iommu-amd-fix-bug-in-put_pasid_state_wait.patch
and it can be found in the queue-4.0 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From 1bf1b431d98d7e5b5419876d4c219469e60693e1 Mon Sep 17 00:00:00 2001
From: Oded Gabbay <oded.gabbay@amd.com>
Date: Thu, 16 Apr 2015 17:08:44 +0300
Subject: iommu/amd: Fix bug in put_pasid_state_wait
From: Oded Gabbay <oded.gabbay@amd.com>
commit 1bf1b431d98d7e5b5419876d4c219469e60693e1 upstream.
This patch fixes a bug in put_pasid_state_wait that appeared in kernel 4.0
The bug is that pasid_state->count wasn't decremented before entering the
wait_event. Thus, the condition in wait_event will never be true.
The fix is to decrement (atomically) the pasid_state->count before the
wait_event.
Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/iommu/amd_iommu_v2.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/iommu/amd_iommu_v2.c
+++ b/drivers/iommu/amd_iommu_v2.c
@@ -266,6 +266,7 @@ static void put_pasid_state(struct pasid
static void put_pasid_state_wait(struct pasid_state *pasid_state)
{
+ atomic_dec(&pasid_state->count);
wait_event(pasid_state->wq, !atomic_read(&pasid_state->count));
free_pasid_state(pasid_state);
}
Patches currently in stable-queue which might be from oded.gabbay@amd.com are
queue-4.0/iommu-amd-fix-bug-in-put_pasid_state_wait.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-06-02 7:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-02 7:22 Patch "iommu/amd: Fix bug in put_pasid_state_wait" has been added to the 4.0-stable tree gregkh
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).