summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-06-08 01:28:46 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2013-06-08 01:28:46 +0200
commit5125ed5b5438ab534df9bfc309dd556781c4ec9b (patch)
tree243b24b8c34b707022150286bfffce661a7d37dd
parentMerge tag 'ecryptfs-3.10-rc5-msync' of git://git.kernel.org/pub/scm/linux/ker... (diff)
parentvfio: fix crash on rmmod (diff)
downloadlinux-5125ed5b5438ab534df9bfc309dd556781c4ec9b.tar.xz
linux-5125ed5b5438ab534df9bfc309dd556781c4ec9b.zip
Merge tag 'vfio-v3.10-rc5' of git://github.com/awilliam/linux-vfio
Pull vfio fix from Alex Williamson: "fix rmmod crash" * tag 'vfio-v3.10-rc5' of git://github.com/awilliam/linux-vfio: vfio: fix crash on rmmod
-rw-r--r--drivers/vfio/vfio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/vfio/vfio.c b/drivers/vfio/vfio.c
index acb7121a9316..6d78736563de 100644
--- a/drivers/vfio/vfio.c
+++ b/drivers/vfio/vfio.c
@@ -1360,7 +1360,7 @@ static const struct file_operations vfio_device_fops = {
*/
static char *vfio_devnode(struct device *dev, umode_t *mode)
{
- if (MINOR(dev->devt) == 0)
+ if (mode && (MINOR(dev->devt) == 0))
*mode = S_IRUGO | S_IWUGO;
return kasprintf(GFP_KERNEL, "vfio/%s", dev_name(dev));