NetBSD Problem Report #60785

From www@netbsd.org  Thu Sep 24 21:39:41 2026
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256
	 client-signature RSA-PSS (2048 bits) client-digest SHA256)
	(Client CN "mail.netbsd.org", Issuer "YR1" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 93B8E1A923B
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 24 Sep 2026 21:39:40 +0000 (UTC)
Message-Id: <20260924213938.E7B3A1A923C@mollari.NetBSD.org>
Date: Thu, 24 Sep 2026 21:39:38 +0000 (UTC)
From: campbell+netbsd@mumble.net
Reply-To: campbell+netbsd@mumble.net
To: gnats-bugs@NetBSD.org
Subject: fifo delivers SIGIO with wrong si_fd
X-Send-Pr-Version: www-1.0
X-From4GNATS: "campbell+netbsd@mumble.net via gnats" <gnats-admin@NetBSD.org>

>Number:         60785
>Category:       kern
>Synopsis:       fifo delivers SIGIO with wrong si_fd
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Sep 24 21:40:00 +0000 2026
>Originator:     Taylor R Campbell
>Release:        current, 11, 10, ...
>Organization:
The Fee Fifo Fio Fumdation, Inc.
>Environment:
>Description:

	SIGIO for a named fifo is always delivered with si_fd=-1
	instead of the fifo fd itself, because it passes the underlying
	socket object to fownsignal as the putative struct file::f_data
	value to look up, instead of the vnode pointer that is actually
	there.

>How-To-Repeat:

	1. code inspection
	2. try using SIGIO with fifos

>Fix:

	Pass the vnode through to fownsignal, I guess?  Or, better,
	invent a better abstraction for managing SIGIO subscriptions so
	it doesn't involve a reverse lookup in the fd table...

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.