Comment 3 for bug 1573508

Revision history for this message
Christian Lachner (gladiac) wrote : Re: nvidia-361 361.42-0ubuntu2: nvidia-361 kernel module failed to build [error: too many arguments to function ‘get_user_pages’]

Hey there,

I created a patch which updates os-mlock.c to adjust for the changes made on the kernel-side in get_user_pages() (include/linux/mm.h). However, I do not have a deep understanding of why the first 2 parameters of get_user_pages() were removed which is why this solution needs to be tested thoroughly. The patch was done for nvidia-driver v340.96 as this is the version I use on my system. However, the patch might also be applicable for newer releases of the nvidia driver. After applying the patch an additional "sudo dpkg-reconfigure nvidia-legacy-340xx-kernel-dkms" was enough to get the kernel module to work. The patch must me applied inside /usr/src/nvidia-legacy-340xx-340.96 (I am on debian - the actual path on ubuntu could be different). I hope I could help.

Cheers, chris