<div dir="ltr">On Sat, 10 Aug 2019 20:04:01 +0300 =?UTF-8?B?QW5kcmVpIERlbWVraG92?= <<a href="mailto:andrei@ipfran.ru">andrei@ipfran.ru</a>> wrote:<br>> This bug seems to have a known origin:  <a href="https://garajau.com.br/2019/07/compiling-nvidia-418-on-kernel-52">https://garajau.com.br/2019/07/compiling-nvidia-418-on-kernel-52</a><br>> <br>> Best<br>> Andrei<br><div><br></div><div>Based on this I created the following patch, with which I was able to regenerate the package nvidia-kernel-dkms_418.74-1_amd64.deb, and it worked for me:<br></div><div><br></div><div>diff -Naurd nvidia-graphics-drivers-418.74_OLD/debian/module/debian/patches/nvidia-uvm-put_user_pages.patch nvidia-graphics-drivers-418.74_NEW/debian/module/debian/patches/nvidia-uvm-put_user_pages.patch<br>--- nvidia-graphics-drivers-418.74_OLD/debian/module/debian/patches/nvidia-uvm-put_user_pages.patch     1970-01-01 00:00:00.000000000 +0000<br>+++ nvidia-graphics-drivers-418.74_NEW/debian/module/debian/patches/nvidia-uvm-put_user_pages.patch        2019-08-11 03:43:01.517330332 +0000<br>@@ -0,0 +1,19 @@<br>+From linux 5.2.2 put_user_page is now being provided by the kernel and it conflicts with the existing one by NVIDIA drivers.<br>+<br>+--- a/nvidia-uvm/uvm8_tools.c<br>++++ b/nvidia-uvm/uvm8_tools.c<br>+@@ -206,12 +206,14 @@ static bool tracker_is_counter(uvm_tools_event_tracker_t *event_tracker)<br>+     return event_tracker != NULL && !event_tracker->is_queue;<br>+ }<br>+<br>++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 2, 2)<br>+ static void put_user_pages(struct page **pages, NvU64 page_count)<br>+ {<br>+     NvU64 i;<br>+     for (i = 0; i < page_count; i++)<br>+         put_page(pages[i]);<br>+ }<br>++#endif<br>+<br>+ static void unmap_user_pages(struct page **pages, void *addr, NvU64 size)<br>+ {<br>diff -Naurd nvidia-graphics-drivers-418.74_OLD/debian/module/debian/patches/<a href="http://series.in">series.in</a> nvidia-graphics-drivers-418.74_NEW/debian/module/debian/patches/<a href="http://series.in">series.in</a><br>--- nvidia-graphics-drivers-418.74_OLD/debian/module/debian/patches/<a href="http://series.in">series.in</a>    2019-05-11 11:52:38.000000000 +0000<br>+++ nvidia-graphics-drivers-418.74_NEW/debian/module/debian/patches/<a href="http://series.in">series.in</a> 2019-08-11 03:42:26.321398133 +0000<br>@@ -8,3 +8,4 @@<br> cc_version_check-gcc5.patch<br> nvidia-use-ARCH.o_binary.patch<br> nvidia-modeset-use-ARCH.o_binary.patch<br>+nvidia-uvm-put_user_pages.patch<br></div><div><br></div></div>