** 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'
+ 
+ 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.
+ 
+ Every subsequent apt operation, including security updates, then fails
+ until the user removes v4l2loopback-dkms by hand.
+ 
+ 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.
+ 
+ 0.12.7 walks and reorders dev->outbufs_list in vidioc_dqbuf() without holding 
a lock, which panics with "list_del corruption" while streaming once the module 
builds again (LP: #2161239).
+ Both fixes are in this upload.
+ 
+ [Test Plan]
+ 
+ On a noble system with v4l2loopback-dkms installed:
+     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)
+ 
+ apt stays broken until v4l2loopback-dkms is removed.
+ 
+ - With the fix
+     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.
+ 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
+ 
+ The module must also build for 6.8.0-136-generic.
+ The locking fix, on a machine running 7.0:
+ 
+     sudo modprobe v4l2loopback devices=1
+     ffmpeg -re -f lavfi -i testsrc=size=640x480:rate=30 -t 60 -f v4l2 
/dev/video0 &
+     ffplay -f v4l2 -i /dev/video0
+ 
+ Streaming must run to completion with the machine responsive.
+ Without the locking fix this panics and requires a hard power cycle.
+ 
+ [Where problems could occur]
+ 
+ If the compat macro guard or the new list_lock 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 stalls every consumer of
+ the loopback device during output streaming.
+ 
+ [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)
+ 
+ [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);
        |         ^~~~~~~~~~~
  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:
  /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);
        |      ^~~~~~~~~~~
  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);
        |         ^~~~~~~~~~~
  /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);
        |      ^~~~~~~~~~~
  
  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 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

Reply via email to