** Description changed: [Impact] Linux 6.18 added a "struct file *filp" parameter to v4l2_fh_add() and v4l2_fh_del() (include/media/v4l2-fh.h). v4l2loopback 0.12.7 still calls both with the old single-argument signature, so the DKMS build fails against the noble 7.0 HWE kernel: - v4l2loopback.c:2089: error: too few arguments to function 'v4l2_fh_add' - v4l2loopback.c:2117: error: too few arguments to function 'v4l2_fh_del' + v4l2loopback.c:2089: error: too few arguments to function 'v4l2_fh_add' + v4l2loopback.c:2117: error: too few arguments to function 'v4l2_fh_del' The impact is not limited to the virtual camera. dkms autoinstall runs from /etc/kernel/header_postinst.d/dkms, so the build failure aborts the kernel header postinst with exit status 11 and leaves the kernel meta package unconfigured. Later apt operations then exit non-zero, including security updates, and the kernel package stays unconfigured until v4l2loopback-dkms is removed or a fixed version is installed. linux-hwe-7.0 is published in both noble-updates and noble-security, so affected systems receive the kernel automatically. - 37 users are affected and 25 duplicates were filed within a week. - Fixing only the call signature is not enough. Linux 6.18 also requires the new file_to_v4l2_fh() accessor to reach the file handle, so with only the signature fix the module builds and loads but oopses on the first ioctl a consumer issues against the device: - BUG: unable to handle page fault for address: fffffffffffffffc - RIP: 0010:vidioc_reqbufs+0xa2/0x3b0 [v4l2loopback] + BUG: unable to handle page fault for address: fffffffffffffffc + RIP: 0010:vidioc_reqbufs+0xa2/0x3b0 [v4l2loopback] Both fixes are in this upload. [Test Plan] On a noble system that has v4l2loopback-dkms installed and does not yet have the 7.0 HWE headers: - sudo apt-get install -y linux-headers-7.0.0-28-generic + sudo apt-get install -y linux-headers-7.0.0-28-generic - Without the fix - run-parts: /etc/kernel/header_postinst.d/dkms exited with return code 11 - dpkg: error processing package linux-headers-7.0.0-28-generic (--configure) - E: Sub-process /usr/bin/dpkg returned an error code (1) + run-parts: /etc/kernel/header_postinst.d/dkms exited with return code 11 + dpkg: error processing package linux-headers-7.0.0-28-generic (--configure) + E: Sub-process /usr/bin/dpkg returned an error code (1) - sudo dpkg --audit + sudo dpkg --audit dpkg --audit lists both linux-headers-7.0.0-28-generic and v4l2loopback- dkms as half configured. - With the fix - sudo apt-get install -y -t noble-proposed v4l2loopback-dkms - dkms status v4l2loopback + sudo apt-get install -y -t noble-proposed v4l2loopback-dkms + dkms status v4l2loopback The header package configures cleanly and dkms status reports v4l2loopback installed for 7.0.0-28-generic. "sudo dpkg --audit" now prints nothing, without removing v4l2loopback-dkms. The GA kernel must be unaffected on the same system: - sudo apt-get install -y linux-headers-6.8.0-136-generic - dkms status v4l2loopback + sudo apt-get install -y linux-headers-6.8.0-136-generic + dkms status v4l2loopback The module must also build for the GA kernel, and the streaming check below must pass on it as well. The oops fix, booted into 7.0 and then repeated on the GA kernel. video_nr pins the device so a real webcam cannot take the number: - sudo modprobe v4l2loopback devices=1 video_nr=42 max_buffers=4 - sudo dmesg -C - ffmpeg -loglevel error -re -f lavfi -i testsrc=size=640x480:rate=30 -t 30 \ - -f v4l2 /dev/video42 & - ffmpeg -loglevel error -f v4l2 -i /dev/video42 -t 25 -f null - - dmesg + sudo modprobe v4l2loopback devices=1 video_nr=42 max_buffers=4 + sudo dmesg -C + ffmpeg -loglevel error -re -f lavfi -i testsrc=size=640x480:rate=30 -t 30 \ + -f v4l2 /dev/video42 & + ffmpeg -loglevel error -f v4l2 -i /dev/video42 -t 25 -f null - + dmesg Both ffmpeg commands must exit 0 and dmesg must contain no "Oops", "BUG:" or "page fault" entry. Without the accessor fix the consumer is killed and dmesg shows the vidioc_reqbufs page fault above. [Where problems could occur] If either compat macro is wrong, the module either stops building on one of the two kernels noble supports, leaving apt in the broken state this SRU is fixing, or resolves the opener incorrectly and oopses on the first ioctl a consumer issues. [Other Info] Fixed upstream in v4l2loopback 0.15.2 by https://github.com/v4l2loopback/v4l2loopback/commit/3b09d3c53997f5f05e8d0db9222706585dbbe67a Fix compilation with linux-6.18.0 (with its follow-up ce8474158c6e, which applies the same change to v4l2_fh_del) and in 0.15.3 by https://github.com/v4l2loopback/v4l2loopback/commit/6b33fe1f682881eb268ab9fc85f231acc5564ac8 use linux>=6.18 accessor for v4l2->private_data [ORIGINAL DESCRIPTION] v4l2loopback.c: In function ‘v4l2_loopback_open’: v4l2loopback.c:2089:9: error: too few arguments to function ‘v4l2_fh_add’ - 2089 | v4l2_fh_add(&opener->fh); - | ^~~~~~~~~~~ + 2089 | v4l2_fh_add(&opener->fh); + | ^~~~~~~~~~~ In file included from /usr/src/linux-headers-7.0.0-28-generic/include/media/v4l2-subdev.h:17, - from /usr/src/linux-headers-7.0.0-28-generic/include/media/v4l2-device.h:13, - from v4l2loopback.c:31: + from /usr/src/linux-headers-7.0.0-28-generic/include/media/v4l2-device.h:13, + from v4l2loopback.c:31: /usr/src/linux-headers-7.0.0-28-generic/include/media/v4l2-fh.h:97:6: note: declared here - 97 | void v4l2_fh_add(struct v4l2_fh *fh, struct file *filp); - | ^~~~~~~~~~~ + 97 | void v4l2_fh_add(struct v4l2_fh *fh, struct file *filp); + | ^~~~~~~~~~~ v4l2loopback.c: In function ‘v4l2_loopback_close’: v4l2loopback.c:2117:9: error: too few arguments to function ‘v4l2_fh_del’ - 2117 | v4l2_fh_del(&opener->fh); - | ^~~~~~~~~~~ + 2117 | v4l2_fh_del(&opener->fh); + | ^~~~~~~~~~~ /usr/src/linux-headers-7.0.0-28-generic/include/media/v4l2-fh.h:125:6: note: declared here - 125 | void v4l2_fh_del(struct v4l2_fh *fh, struct file *filp); - | ^~~~~~~~~~~ + 125 | void v4l2_fh_del(struct v4l2_fh *fh, struct file *filp); + | ^~~~~~~~~~~ ProblemType: Package DistroRelease: Ubuntu 24.04 Package: linux-headers-7.0.0-28-generic 7.0.0-28.28~24.04.1 ProcVersionSignature: Ubuntu 6.17.0-35.35~24.04.1-generic 6.17.13 Uname: Linux 6.17.0-35-generic x86_64 NonfreeKernelModules: nvidia_modeset nvidia ApportVersion: 2.28.2-0ubuntu0.1 Architecture: amd64 AudioDevicesInUse: USER PID ACCESS COMMAND /dev/snd/controlC0: tom-brown 2572 F.... wireplumber /dev/snd/controlC1: tom-brown 2572 F.... wireplumber /dev/snd/seq: tom-brown 2567 F.... pipewire CRDA: N/A CasperMD5CheckResult: pass Date: Thu Jul 16 22:52:40 2026 ErrorMessage: installed linux-headers-7.0.0-28-generic package post-installation script subprocess returned error exit status 11 InstallationDate: Installed on 2025-12-20 (209 days ago) InstallationMedia: Ubuntu 24.04.3 LTS "Noble Numbat" - Release amd64 (20250805.1) Lsusb: Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 002: ID 046d:c52b Logitech, Inc. Unifying Receiver Bus 001 Device 003: ID 8087:0a2b Intel Corp. Bluetooth wireless interface Bus 001 Device 004: ID 0bda:57c3 Realtek Semiconductor Corp. Integrated_Webcam_HD Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub MachineType: Dell Inc. Precision 7510 ProcFB: 0 i915drmfb ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-6.17.0-35-generic root=UUID=0cd37cd1-1382-4191-9107-b090419b644e ro quiet splash vt.handoff=7 Python3Details: /usr/bin/python3.12, Python 3.12.3, python3-minimal, 3.12.3-0ubuntu2.1 PythonDetails: N/A RelatedPackageVersions: grub-pc N/A SourcePackage: linux-hwe-7.0 Title: package linux-headers-7.0.0-28-generic 7.0.0-28.28~24.04.1 failed to install/upgrade: installed linux-headers-7.0.0-28-generic package post-installation script subprocess returned error exit status 11 UpgradeStatus: No upgrade log present (probably fresh install) dmi.bios.date: 03/09/2023 dmi.bios.release: 1.31 dmi.bios.vendor: Dell Inc. dmi.bios.version: 1.31.3 dmi.board.name: 0MJ7KG dmi.board.vendor: Dell Inc. dmi.board.version: A00 dmi.chassis.type: 9 dmi.chassis.vendor: Dell Inc. dmi.modalias: dmi:bvnDellInc.:bvr1.31.3:bd03/09/2023:br1.31:svnDellInc.:pnPrecision7510:pvr:rvnDellInc.:rn0MJ7KG:rvrA00:cvnDellInc.:ct9:cvr:sku06D9: dmi.product.family: Precision dmi.product.name: Precision 7510 dmi.product.sku: 06D9 dmi.sys.vendor: Dell Inc.
-- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2161037 Title: v4l2loopback fails to build and then oopses on kernel 7.0 HWE To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/v4l2loopback/+bug/2161037/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
