On Mon, Nov 16, 2026 at 12:53:59PM +0100, [email protected] wrote:
> hi,
>
> opened https://www.alycat.xyz/blog/2026-11-15_river_netbsd.html in
> firefox triggered a panic, KASSERT at
> https://github.com/openbsd/src/blob/master/sys/dev/pci/drm/drm_linux.c#L3357
>
> inteldrm0 at pci0 dev 2 function 0 "Intel HD Graphics 620" rev 0x02
> drm0 at inteldrm0
> inteldrm0: msi, KABYLAKE, gen 9
> inteldrm0: 1920x1080, 32bpp
>
> not reproducible at next boot, sadly.
I would still like to see a trace as I can't find a caller that doesn't
have O_CLOEXEC in flags.
Still, I guess it should change. The test is here as fd_install() uses
UF_EXCLOSE.
Index: sys/dev/pci/drm/drm_linux.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/drm/drm_linux.c,v
diff -u -p -r1.149 drm_linux.c
--- sys/dev/pci/drm/drm_linux.c 20 Oct 2026 11:59:12 -0000 1.149
+++ sys/dev/pci/drm/drm_linux.c 16 Nov 2026 12:23:20 -0000
@@ -3354,7 +3354,8 @@ get_unused_fd_flags(unsigned int flags)
struct filedesc *fdp = p->p_fd;
int error, fd;
- KASSERT((flags & O_CLOEXEC) != 0);
+ if ((flags & O_CLOEXEC) != O_CLOEXEC)
+ return -1;
fdplock(fdp);
retryalloc: