]> git.karo-electronics.de Git - linux-beck.git/commit
VFIO: use ACCESS_ONCE() to guard access to dev->driver
authorJiang Liu <liuj97@gmail.com>
Fri, 7 Dec 2012 20:43:50 +0000 (13:43 -0700)
committerAlex Williamson <alex.williamson@redhat.com>
Fri, 7 Dec 2012 20:43:50 +0000 (13:43 -0700)
commitde2b3eeafb555d7b623c9f34e399b39105ca527f
tree4f744043daec519931283d7f9060fc5e8dd47756
parent9df7b25ab71cee770826d1e7983eb8b6715543d6
VFIO: use ACCESS_ONCE() to guard access to dev->driver

Comments from dev_driver_string(),
/* dev->driver can change to NULL underneath us because of unbinding,
 * so be careful about accessing it.
 */

So use ACCESS_ONCE() to guard access to dev->driver field.

Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
drivers/vfio/vfio.c