Bug#822645: nvidia-legacy-340xx-kernel-dkms: fails to build with kernel 4.6-rc5

Luca Boccassi luca.boccassi at gmail.com
Mon Apr 25 22:35:53 UTC 2016


On 25 April 2016 at 23:14, Adam Borowski <kilobyte at angband.pl> wrote:
> Package: nvidia-legacy-340xx-kernel-dkms
> Version: 340.96-5
> Severity: normal
>
> Hi!
> The nvidia module fails to build against current -rc kernel.  The following
> patch makes it work:
>
> --- os-mlock.c~ 2016-04-22 21:19:09.000000000 +0200
> +++ os-mlock.c  2016-04-25 23:47:41.529790073 +0200
> @@ -45,7 +45,7 @@
>      }
>
>      down_read(&mm->mmap_sem);
> -    ret = get_user_pages(current, mm, (unsigned long)address,
> +    ret = get_user_pages((unsigned long)address,
>              page_count, write, force, user_pages, NULL);
>      up_read(&mm->mmap_sem);
>      pinned = ret;
>
>
> You'd of course need #ifdefs to keep it working on older kernels.  And
> here's a problem -- the upstream commit that removes compat macros for
> get_user_pages() is v4.6-rc2-1-gc12d2da, yet somehow Debian's -rc3 from
> experimental does work with the unmodified nvidia source.  Thus, I'm not
> certain which versions need the old and which the new code.

Hi,

Yes we are aware there are many breakages with 4.6 unfortunately, we
are working through them on our various branches.

That change to that API is not in rc3, it appeared in rc4:
https://github.com/torvalds/linux/commit/c12d2da56d0e07d230968ee2305aaa86b93a6832

And rc4 is not in Debian, so I've not fixed it yet. It also doesn't
have a backward-compatible solution, so I'll have to if-def it and I
would like to avoid having to fish for RC values so I have to wait
until rc4 is in experimental, otherwise right now rc3 would break.

If you are in need of a quick solution you can pick the patches from
SVN and apply them in the /usr/src/nvidia-legacy-340xx directory and
trigger a DKMS rebuild, that will get you going until we do an upload.

Kind regards,
Luca Boccassi



More information about the pkg-nvidia-devel mailing list