Skip to content

Commit

Permalink
Merge tag 'vfio-v3.10-rc5' of git://github.com/awilliam/linux-vfio
Browse files Browse the repository at this point in the history
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
  • Loading branch information
torvalds committed Jun 7, 2013
2 parents b8e9dba + 9a6aa27 commit 5125ed5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/vfio/vfio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 5125ed5

Please sign in to comment.