]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xen/gntdevt: Fix race condition in gntdev_release()
authorMarek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Fri, 26 Jun 2015 01:28:24 +0000 (03:28 +0200)
committerElena Ufimtseva <elena.ufimtseva@oracle.com>
Wed, 12 Aug 2015 10:07:27 +0000 (06:07 -0400)
commit13fa38a0b6f3faf81d70e8b0e5e5c07160559b6b
tree70ef9e63c20ef06066bab0616394d27716111cb8
parenta47a7053799a153e67e3141bfd4d06f5162a59e4
xen/gntdevt: Fix race condition in gntdev_release()

While gntdev_release() is called the MMU notifier is still registered
and can traverse priv->maps list even if no pages are mapped (which is
the case -- gntdev_release() is called after all). But
gntdev_release() will clear that list, so make sure that only one of
those things happens at the same time.

Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
(cherry picked from commit 30b03d05e07467b8c6ec683ea96b5bffcbcd3931)
Signed-off-by: Elena Ufimtseva <elena.ufimtseva@oracle.com>
drivers/xen/gntdev.c