NetBSD Problem Report #58586
From www@netbsd.org Mon Aug 12 16:22:24 2024
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 "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id D33E61A9242
for <gnats-bugs@gnats.NetBSD.org>; Mon, 12 Aug 2024 16:22:23 +0000 (UTC)
Message-Id: <20240812162222.9D5D31A9243@mollari.NetBSD.org>
Date: Mon, 12 Aug 2024 16:22:22 +0000 (UTC)
From: campbell+netbsd@mumble.net
Reply-To: campbell+netbsd@mumble.net
To: gnats-bugs@NetBSD.org
Subject: vmx(4) locking issues
X-Send-Pr-Version: www-1.0
>Number: 58586
>Category: kern
>Synopsis: vmx(4) locking issues
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Aug 12 16:25:00 +0000 2024
>Originator: Taylor R Campbell
>Release: current, 10, ...
>Organization:
The NetVMX Resetation
>Environment:
>Description:
1. pci interrupt {vmxnet3_legacy_intr, vmxnet3_event_intr} -> vmxnet3_evintr -> vmxnet3_init_locked must be deferred to workqueue, like watchdog reset
2. lock taken in softint context must not be taken across init/stop -- nix `core' lock, replace by mcast lock for SIOCADDMULTI/SIOCDELMULTI and multicast filter updates at IPL_SOFTNET
3. vmx_if_flags is not initialized anywhere, it seems?
4. incoherent locking rule for vmxnet3_if_link_status and access to struct vmxnet3_softc::vmx_link_active (sometimes core lock, sometimes ifnet lock -- should be IPL_NET intr lock)
5. missing lock around access to struct vmxnet3_queue::vxq_wq_enqueued -- should be IPL_NET intr lock (or atomic ops)
>How-To-Repeat:
code inspection
>Fix:
Yes, please!
(Contact us)
$NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2024
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.