Kernel 3.18 warning: No drm_driver.set_busid() implementation provided by nvidia_frontend_exit_modu

Hi NVIDIA,

Please, fix this warning message on boot:

------------[ cut here ]------------
 WARNING: CPU: 1 PID: 1550 at drivers/gpu/drm/drm_ioctl.c:143 drm_setversion+0x185/0x190 [drm]()
 No drm_driver.set_busid() implementation provided by nvidia_frontend_exit_module [nvidia]. Use drm_dev_set_unique() to set the unique name explicitly.
 Modules linked in: w83627ehf adt7475 hwmon_vid coretemp vboxpci(O) vboxnetadp(O) vboxnetflt(O) vboxdrv(O) binfmt_misc fuse hid_generic usbhid hid snd_usb_audio snd_usbmidi_lib snd_rawmidi uvcvideo videobuf2_core v4l2_common videodev videobuf2_vmalloc videobuf2_memops snd_hda_codec_realtek snd_hda_codec_generic microcode pcspkr i2c_i801 sr_mod cdrom fan snd_hda_codec_hdmi 8250 serial_core sg xhci_pci xhci_hcd nvidia(PO) drm agpgart snd_hda_intel snd_hda_controller snd_hda_codec snd_hwdep snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device snd_pcm_oss snd_mixer_oss snd_pcm snd_timer snd ehci_pci ehci_hcd e1000e ptp pps_core evdev
 CPU: 1 PID: 1550 Comm: X Tainted: P           O   3.18.0-ic #1
 Hardware name: System manufacturer System Product Name/P8P67 PRO, BIOS 3602 11/01/2012
  00000000 00000000 edd49dcc ca3743ac edd49e0c edd49dfc ca03dc0a f89590c4
  edd49e28 0000060e f8957927 0000008f f89366d5 f89366d5 edd49e80 edcb2000
  ffffffea edd49e14 ca03dcae 00000009 edd49e0c f89590c4 edd49e28 edd49e3c
 Call Trace:
  [<ca3743ac>] dump_stack+0x48/0x69
  [<ca03dc0a>] warn_slowpath_common+0x7a/0xa0
  [<f89366d5>] ? drm_setversion+0x185/0x190 [drm]
  [<f89366d5>] ? drm_setversion+0x185/0x190 [drm]
  [<ca03dcae>] warn_slowpath_fmt+0x2e/0x30
  [<f89366d5>] drm_setversion+0x185/0x190 [drm]
  [<f8936550>] ? drm_noop+0x30/0x30 [drm]
  [<f89360ec>] drm_ioctl+0x2bc/0x530 [drm]
  [<ca0e8761>] ? inode_permission+0x11/0x50
  [<ca0e90d5>] ? link_path_walk+0x1d5/0x720
  [<f8936550>] ? drm_noop+0x30/0x30 [drm]
  [<ca0ebcb2>] ? path_openat+0xa2/0x560
  [<ca0ec950>] ? do_filp_open+0x30/0x80
  [<f8935e30>] ? drm_copy_field+0x80/0x80 [drm]
  [<ca0ee9da>] do_vfs_ioctl+0x6a/0x540
  [<ca0ec188>] ? final_putname+0x18/0x40
  [<ca0ec188>] ? final_putname+0x18/0x40
  [<ca0deac4>] ? do_sys_open+0x194/0x210
  [<ca0eeeee>] SyS_ioctl+0x3e/0x80
  [<ca378630>] sysenter_do_call+0x12/0x12
 ---[ end trace 990d74af2caa5ce8 ]---
 ------------[ cut here ]------------
 WARNING: CPU: 1 PID: 1550 at drivers/gpu/drm/drm_ioctl.c:143 drm_setversion+0x185/0x190 [drm]()
 No drm_driver.set_busid() implementation provided by nvidia_frontend_exit_module [nvidia]. Use drm_dev_set_unique() to set the unique name explicitly.
 Modules linked in: w83627ehf adt7475 hwmon_vid coretemp vboxpci(O) vboxnetadp(O) vboxnetflt(O) vboxdrv(O) binfmt_misc fuse hid_generic usbhid hid snd_usb_audio snd_usbmidi_lib snd_rawmidi uvcvideo videobuf2_core v4l2_common videodev videobuf2_vmalloc videobuf2_memops snd_hda_codec_realtek snd_hda_codec_generic microcode pcspkr i2c_i801 sr_mod cdrom fan snd_hda_codec_hdmi 8250 serial_core sg xhci_pci xhci_hcd nvidia(PO) drm agpgart snd_hda_intel snd_hda_controller snd_hda_codec snd_hwdep snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device snd_pcm_oss snd_mixer_oss snd_pcm snd_timer snd ehci_pci ehci_hcd e1000e ptp pps_core evdev
 CPU: 1 PID: 1550 Comm: X Tainted: P        W  O   3.18.0-ic #1
 Hardware name: System manufacturer System Product Name/P8P67 PRO, BIOS 3602 11/01/2012
  00000000 00000000 edd49dcc ca3743ac edd49e0c edd49dfc ca03dc0a f89590c4
  edd49e28 0000060e f8957927 0000008f f89366d5 f89366d5 edd49e80 edcb2000
  ffffffea edd49e14 ca03dcae 00000009 edd49e0c f89590c4 edd49e28 edd49e3c
 Call Trace:
  [<ca3743ac>] dump_stack+0x48/0x69
  [<ca03dc0a>] warn_slowpath_common+0x7a/0xa0
  [<f89366d5>] ? drm_setversion+0x185/0x190 [drm]
  [<f89366d5>] ? drm_setversion+0x185/0x190 [drm]
  [<ca03dcae>] warn_slowpath_fmt+0x2e/0x30
  [<f89366d5>] drm_setversion+0x185/0x190 [drm]
  [<f8936550>] ? drm_noop+0x30/0x30 [drm]
  [<f89360ec>] drm_ioctl+0x2bc/0x530 [drm]
  [<f8936550>] ? drm_noop+0x30/0x30 [drm]
  [<ca05d355>] ? __update_cpu_load+0xa5/0xe0
  [<ca07af0c>] ? hrtimer_forward+0x9c/0x190
  [<ca08027b>] ? ktime_get+0x4b/0x100
  [<f8935e30>] ? drm_copy_field+0x80/0x80 [drm]
  [<ca0ee9da>] do_vfs_ioctl+0x6a/0x540
  [<ca087b75>] ? clockevents_program_event+0xa5/0x160
  [<ca0895e4>] ? tick_program_event+0x24/0x30
  [<ca07b9cf>] ? hrtimer_interrupt+0x14f/0x2a0
  [<ca0eeeee>] SyS_ioctl+0x3e/0x80
  [<ca378630>] sysenter_do_call+0x12/0x12
 ---[ end trace 990d74af2caa5ce9 ]---

You need this patch:

--- kernel/nv-drm.c~    2014-11-08 00:57:53.000000000 +0100
+++ kernel/nv-drm.c     2014-11-13 21:03:37.589650873 +0100
@@ -128,6 +128,10 @@ static struct drm_driver nv_drm_driver =
     .gem_prime_vmap = nv_gem_prime_vmap,
     .gem_prime_vunmap = nv_gem_prime_vunmap,
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 18, 0)
+    .set_busid = drm_pci_set_busid,
+#endif
+
     .name = "nvidia-drm",
     .desc = "NVIDIA DRM driver",
     .date = "20130102",
diff --git a/nv-frontend.c~ b/nv-frontend.c
index c8c8af1..00f0973 100644
--- kernel/nv-frontend.c~
+++ kernel/nv-frontend.c
@@ -327,7 +327,7 @@ long nvidia_frontend_unlocked_ioctl(
     unsigned long i_arg
 )
 {
-    return nvidia_frontend_ioctl(file->f_dentry->d_inode, file, cmd, i_arg);
+    return nvidia_frontend_ioctl(file->f_path.dentry->d_inode, file, cmd, i_arg);
 }
 
 long nvidia_frontend_compat_ioctl(
@@ -336,7 +336,7 @@ long nvidia_frontend_compat_ioctl(
     unsigned long i_arg
 )
 {
-    return nvidia_frontend_ioctl(file->f_dentry->d_inode, file, cmd, i_arg);
+    return nvidia_frontend_ioctl(file->f_path.dentry->d_inode, file, cmd, i_arg);
 }
 
 int nvidia_frontend_mmap(
diff --git a/nv.c~ b/nv.c
index 6b31000..3db114e 100644
--- kernel/nv.c~
+++ kernel/nv.c
@@ -1796,7 +1796,7 @@ nvidia_unlocked_ioctl(
     unsigned long i_arg
 )
 {
-    return nvidia_ioctl(file->f_dentry->d_inode, file, cmd, i_arg);
+    return nvidia_ioctl(file->f_path.dentry->d_inode, file, cmd, i_arg);
 }
 
 /*

Thanks, but I still want NVIDIA to publish fixed official drivers that have this apparent nuisance fixed.

thank you very much!

I’m quite confident nv will have this fixed in the next release(s) since 3.18 has been released.

Thank you mlau for providing this patch. I have just upgraded my OpenSUSE Tumbleweed to the latest Linux kernel 3.18.1 and I couldn’t use the NVIDIA driver because of this error.

It took me some time to figure it out how to patch and compile the driver, so I wrote it down for others. The patch you have provided doesn’t keep the indentation when copied to the clipboard and the patch program has a problem with that. Therefore I had to reformat it manually.

It would be great if you could next time include the patch file as an attachment or if you could use the raw “code tag”, which keeps the formatting after copying to the clipboard.

How to patch the NVIDIA driver :

  1. Download the latest NVIDIA driver from the NVIDIA Unix Driver website

  2. Download the patch file with the proper formatting from the attachment or this pastebin and call it “p.patch”.

  3. Run (change the file name of the driver installer accordingly) :

sh ./NVIDIA-Linux-x86-340.65.run --apply-patch p.patch
  1. This will generate a new installer with “-custom” at the end of the filename. You have to run it again to install the patched driver :
sh ./NVIDIA-Linux-x86-340.65-custom.run

Good luck !

EDIT: After submitting this comment, the “Add file” button appeared, so I included the patch file in the attachment as well. I couldn’t use the “.patch” extension, so I used “.txt” instead.

It would be great if the admins of this forum would add the “.patch” extension to the allowed list of extensions and also, if they could fix the problem with the “code tag”.
p.txt (1.48 KB)

Aaron, please, fix this in all current releases. 346.35 drivers have this issue.

Hi,

unfortunately the patch above don’t work with 346.35. :(

yes, it has to be manually adapted.
they changed the code a little bit.
but it is the same.

patch for 346.35 on kernel 3.18.6-100 Fedora 20

$ diff -Nuar NVIDIA-Linux-x86_64-346.35/kernel/ nvidiapkg-x86_64/kernel/
diff -Nuar NVIDIA-Linux-x86_64-346.35/kernel/nv-drm.c nvidiapkg-x86_64/kernel/nv-drm.c
--- NVIDIA-Linux-x86_64-346.35/kernel/nv-drm.c	2015-01-10 23:30:46.000000000 -0500
+++ nvidiapkg-x86_64/kernel/nv-drm.c	2015-02-12 01:58:46.180272419 -0500
@@ -128,6 +128,10 @@
     .gem_prime_vmap = nv_gem_prime_vmap,
     .gem_prime_vunmap = nv_gem_prime_vunmap,
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 18, 0)
+    .set_busid = drm_pci_set_busid,
+#endif
+
     .name = "nvidia-drm",
     .desc = "NVIDIA DRM driver",
     .date = "20130102",
diff -Nuar NVIDIA-Linux-x86_64-346.35/kernel/nv-linux.h nvidiapkg-x86_64/kernel/nv-linux.h
--- NVIDIA-Linux-x86_64-346.35/kernel/nv-linux.h	2015-01-10 23:30:46.000000000 -0500
+++ nvidiapkg-x86_64/kernel/nv-linux.h	2015-02-12 01:51:02.970903382 -0500
@@ -2000,7 +2000,7 @@
 #if defined(NV_FILE_HAS_INODE)
 #define NV_FILE_INODE(file) (file)->f_inode
 #else
-#define NV_FILE_INODE(file) (file)->f_dentry->d_inode
+#define NV_FILE_INODE(file) (file)->f_path.f_dentry->d_inode
 #endif
 
 /* Stub out UVM in multi-RM builds */