projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d683b96
)
vfio: fix crash on rmmod
author
Alexey Kardashevskiy
<aik@ozlabs.ru>
Wed, 5 Jun 2013 14:54:16 +0000
(08:54 -0600)
committer
Alex Williamson
<alex.williamson@redhat.com>
Wed, 5 Jun 2013 14:54:16 +0000
(08:54 -0600)
devtmpfs_delete_node() calls devnode() callback with mode==NULL but
vfio still tries to write there.
The patch fixes this.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
drivers/vfio/vfio.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/vfio/vfio.c
b/drivers/vfio/vfio.c
index acb7121a9316dd146a7cec60af798ecbe42b7681..6d78736563de748c319ade5c0ff5cf210028fc23 100644
(file)
--- 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));