From nobody Thu Jun 20 03:07:26 2024 X-Original-To: net@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W4QQR2CQ5z5Nw8N for ; Thu, 20 Jun 2024 03:07:27 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W4QQR1CmMz4QW0 for ; Thu, 20 Jun 2024 03:07:27 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718852847; a=rsa-sha256; cv=none; b=GccmsuLmNeBymhwgmUDmnfDrx2UmvmxRRoS0rVL+daOXmfiNwhVr5AQGrziq1CxSs9vQng V7K2R9jKgjiL0k4WrXqwaXxGuJf/i9Zkk1BeScSFHzweHHowTAcskY/cDtzMZOrS0eMiln tHTnIdyY4lGYzEZ4EQDtPoTn2c78l0RHTCgN41VtMBccW1MX+FvHCRweUi7xwuUJmCQY9w uS5zPl6CXzE9xYQfQljM2Ni65I6ouVjrQh+bXeuwmFoE10v94HK24MBZmRecOHcXKpE2pM /5LsCgju4Lu2g8Lbu6GjiDpbebNy0kTZsvRO4CjKqpYOFElWBNF/ejxjFP/nng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718852847; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vrpnOriRF9UuLSA4VxpfKOLFY58Id0hTpU2THn3sBHw=; b=hfoH/HlGz6XK+aAhUovsAkvcfIeU0PM6KZbUgKCf4Dekm4oAWntkiEOxF9N2WGWGT5MwG1 TyfbzxNVcwshFgSF2WlITzDIOm/kIGO7xhJs9kkRBWaHOHkcKwlj5k+HfuVz8HTbhKyzVV Wn8qUuX2enyc5QasDKAAYMbPiq0FQXQHjISeMNcm+Hx0+xuWGhtJXduUdriG8i5F7B7BWX o/jzR5vn/N9K40f8O4XJv1oWGY1+sQpWPe7p59rkFNrhvbOP5JSpsKzFAOb4kSGQ6b3u2V 7ICf8oqQ3XRrPT8nMuTW5hnkOR4ugpuyNXR4mBdTZVG0bBaxgHequMrKlT3dQQ== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W4QQR0lywz17bf for ; Thu, 20 Jun 2024 03:07:27 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 45K37RaR068843 for ; Thu, 20 Jun 2024 03:07:27 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 45K37RJn068841 for net@FreeBSD.org; Thu, 20 Jun 2024 03:07:27 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: net@FreeBSD.org Subject: [Bug 279653] Page fault in in6_selecthlim Date: Thu, 20 Jun 2024 03:07:26 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 14.0-STABLE X-Bugzilla-Keywords: crash X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: takahiro.kurosawa@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: net@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Networking and TCP/IP with FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-net List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-net@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D279653 --- Comment #12 from takahiro.kurosawa@gmail.com --- I have not reproduced the crash but I guess the following patch for if_detach_internal() would fix the problem: ---- --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1235,6 +1235,8 @@ if_detach_internal(struct ifnet *ifp, bool vmove) #ifdef VIMAGE finish_vnet_shutdown: #endif + epoch_wait_preempt(net_epoch_preempt); + NET_EPOCH_DRAIN_CALLBACKS(); /* * We cannot hold the lock over dom_ifdetach calls as they might * sleep, for example trying to drain a callout, thus open up the ---- The routing entries that are related with the detaching ifnet are removed in if_purgeaddrs() and rt_flushifroutes(). It seems that the transport layer protects itself from freeing objects with NET_EPOCH_ENTER/EXIT. So there should be no threads that still reference nhop_objects related to the ifnet after rt_flushifroutes() + epoch_wait_preempt(). I am not sure that NET_EPOCH_DRAIN_CALLBACKS() is required but it is probably harmless. --=20 You are receiving this mail because: You are the assignee for the bug.=