From bafceab388c3e8a674b5e00c02a337e51d48142a Mon Sep 17 00:00:00 2001 From: Alex Williamson Date: Tue, 30 Apr 2013 15:42:28 -0600 Subject: [PATCH] --- yaml --- r: 370922 b: refs/heads/master c: 664e9386bd05dbdfecfb28d6cf2fde983aabc65c h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/vfio/vfio.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 520e7bdcb969..3afcc3e065f9 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0b43c082338b857c27d2f87c886eb78812ccd236 +refs/heads/master: 664e9386bd05dbdfecfb28d6cf2fde983aabc65c diff --git a/trunk/drivers/vfio/vfio.c b/trunk/drivers/vfio/vfio.c index ac7423bfaa7d..acb7121a9316 100644 --- a/trunk/drivers/vfio/vfio.c +++ b/trunk/drivers/vfio/vfio.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -1359,6 +1360,9 @@ static const struct file_operations vfio_device_fops = { */ static char *vfio_devnode(struct device *dev, umode_t *mode) { + if (MINOR(dev->devt) == 0) + *mode = S_IRUGO | S_IWUGO; + return kasprintf(GFP_KERNEL, "vfio/%s", dev_name(dev)); }