nvidia vgaarb bug (was: Re: Static inline DRM functions calling into GPL-only code)

Lukas Wunner lukas at wunner.de
Tue Apr 11 07:24:33 UTC 2017


Hi Nikhil,

On Tue, Apr 11, 2017 at 09:44:35AM +0530, Nikhil Mahale wrote:
> There is not interest in relaxing the export of refcount_inc, and 
> changing the license of nvidia-drm.ko isn't viable right now.

Why not dual-license as MIT+GPL?


> * Make these static inline DRM functions EXPORT_SYMBOL instead of 
> inline.

Intuitively, I'd say wrapping a function declared EXPORT_SYMBOL_GPL
in another function declared EXPORT_SYMBOL doesn't seem like a legal
way to solve this issue.


> My name is Nikhil Mahale, and I work at NVIDIA in the Linux drivers 
> team.
> 
> I have been working on adding DRM KMS support to our driver. The NVIDIA 
> GPU driver package (364.12 and higher) provides a kernel module, 
> nvidia-drm.ko, which is licensed as "MIT". This module registers a DRM 
> driver with the DRM subsystem of the Linux kernel and advertises KMS 
> capability on Linux kernel v4.1 or higher, with CONFIG_DRM and 
> CONFIG_DRM_KMS_HELPER enabled.

Sorry to hijack this thread, but there's an egregious, long-standing bug
in your driver with regards to vgaarb usage:  nvidia/nv.c calls
vga_tryget() but never calls vga_put(), in other words your driver locks
legacy VGA I/O but never unlocks it.  This is in the proprietary, non-MIT
licensed portion of your driver.

The bug was already reported to Nvidia four years ago:
https://devtalk.nvidia.com/default/topic/545560

It causes issues such as deadlocks or inability to control backlight
on MacBook Pros, commit 4eebd5a4e726 tried to work around it but
introduced more problems.

Could you please look into fixing that bug? Thanks!

Lukas


More information about the dri-devel mailing list