소스 검색

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
Linus Torvalds 12 년 전
부모
커밋
5125ed5b54
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      drivers/vfio/vfio.c

+ 1 - 1
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));