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)
committerBen Hutchings <ben@decadent.org.uk>
Tue, 13 Oct 2015 02:46:01 +0000 (03:46 +0100)
commit 30b03d05e07467b8c6ec683ea96b5bffcbcd3931 upstream.

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>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>

No differences found