#1135762 nvidia-legacy-390xx-kernel-dkms: dkms module does not build against kernel 7.0.3 (VMA_LOCK_OFFSET undeclared in nv-mmap.c)

#1135762#5
Date:
2026-05-05 15:59:29 UTC
From:
To:
dkms module does not build against kernel 7.0.3:

nvidia/nv-mmap.c: In function ‘nv_vma_enter_locked’:
nvidia/nv-mmap.c:587:24: error: ‘VMA_LOCK_OFFSET’ undeclared (first use in this function); did you mean ‘VGA_CRTC_OFFSET’?
  587 |     NvU32 tgt_refcnt = VMA_LOCK_OFFSET;
      |                        ^~~~~~~~~~~~~~~
      |                        VGA_CRTC_OFFSET
nvidia/nv-mmap.c:587:24: note: each undeclared identifier is reported only once for each function it appears in
nvidia/nv-mmap.c: In function ‘nv_vma_start_write’:
nvidia/nv-mmap.c:639:9: error: too many arguments to function ‘__is_vma_write_locked’; expected 1, have 2
  639 |     if (__is_vma_write_locked(vma, &mm_lock_seq))
      |         ^~~~~~~~~~~~~~~~~~~~~      ~~~~~~~~~~~~
In file included from /usr/src/linux-headers-7.0.3+deb14-common/include/linux/mm.h:18,
                 from ././common/inc/nv-pgprot.h:17,
                 from ././common/inc/nv-linux.h:20,
                 from nvidia/nv-mmap.c:15:
/usr/src/linux-headers-7.0.3+deb14-common/include/linux/mmap_lock.h:282:20: note: declared here
  282 | static inline bool __is_vma_write_locked(struct vm_area_struct *vma)
      |                    ^~~~~~~~~~~~~~~~~~~~~

See attached make.log file.

#1135762#10
Date:
2026-05-24 07:13:38 UTC
From:
To:
Hello,

please find the patch attached.
--------------------
Sincerely yours,
*Damir Islamov*
Rzhanov Institute of Semiconductor Physics SB RAS

#1135762#15
Date:
2026-05-24 13:00:16 UTC
From:
To:
Control: tags -1 patch

Really tagged patch above.

But I can't test the patch right now.

#1135762#22
Date:
2026-06-20 18:19:58 UTC
From:
To:
Hello,

0084 alone isn't enough — two more build errors remain afterwards
(screen_info undeclared, dma_fence_signal return type). Attached
patch fixes both, applied on top of 0084.

Tested the driver on kernel 7.0.6-2-pve.

#1135762#27
Date:
2026-07-10 19:31:22 UTC
From:
To:
I applied patches 0084 and 0085 running kernel 7.0.13.
nvidia-legacy-390xx-kernel-dkms compiled successfully.

Running the driver on 7.0.13+deb14-amd64.

Recommend updating the package.