From nobody Wed Jul 10 19:40:50 2024 X-Original-To: dev-commits-src-main@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 4WK7WQ3K1tz5R2ZR; Wed, 10 Jul 2024 19:40:50 +0000 (UTC) (envelope-from git@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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WK7WQ2qC6z42ST; Wed, 10 Jul 2024 19:40:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720640450; 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; bh=qgH+kmH8iQQwc5aaldvdkmpPALiSTw52H9Kc2GieyKI=; b=ZPGJnNHOoQw1Dklf1NR4/mIfc71yIqUH0Amo7LTQBS3+WEdI1DnDjJh5adssz6q7fClBXI 1mNA7pL6p2JVBzhqiTNgh+MnxBLFY0sPmqZ0zM5+QWNTCzKzll0EwlhhmKlHOS2oIbDBTV 91rSud/U895o4L53zqINowS+MaBBNaiDmw1tvBkN6KSliu73wR2W6aAD807gzhv7W3h6Zd kTN9RFeMoRGm56IbAkEeD5l2Q1Okl9YCHgWEd4eh21obJ1imsdlmuYxqGh8h9OVER/vzGp uO8HjoTdKFTIDhJ3eHjl83Rylv2H9stlPNvbQ3MLuXJdjZLK+h+KlF/RgVE+pA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720640450; a=rsa-sha256; cv=none; b=aE7ctpUjgWg6fMQYshmTPB43KyT/gQglsTNmnhlofyW7C9uqnlCwwGdxXu5DP4lj2TADSt Kra2UnOu3rBgJvhCIAzgZCHiVmkTImOrmt8VxzCPZEmoY3Mg8TJxibFE52o9IT9pTJliiu NeLl+nEUo24+o/Nqg/6v8aqaHfYITXYuLElLVdX8emDya8ix2cf3vxadlM0R3zXEh7DY2i 8c8vV/sOx9BUlgCFiHo9k+QwRiRZ9B62wf9vG9JWbBKcnIU2/FTCZPg3o2KBnAsmW3Ez2W 17px30UqRGoOQurCTk8/UQRaDDpM+UPsZmBwz9zO8QxhroBg71hyjEwdTkbWaQ== 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=1720640450; 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; bh=qgH+kmH8iQQwc5aaldvdkmpPALiSTw52H9Kc2GieyKI=; b=buKr5yc8zLpNCp1LyQTUkOSbeE1PtLFpKEkGi2fV9N4q7X/szS1/fjwioJW0IwKPCjOw8y safUOjWz6cy3XQb5No6NKNFKkWgn2/rNYCHVHeAioM4Fa1lXDknm9GzcB6blh0BMd17V+7 LoNLvSEiitjUPjxZeaANIbp9m6+z6yJkKPj4WykRTtObgyUVZAe6gRfeZ7w8Ghc2Af+Eax o9mviwAF2jGyxSRPYzetAPEXUJBF7uXfvlrU/6dS+P9AyFKlpONffXL2KlfUdZlMGOd6JP uQP5nIE8NcKa7BaYs5KUIiYLb9nqH+6dTFJA2EHfXARsx9lRiSPHdtrwmSevzA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4WK7WQ2QKFzVvR; Wed, 10 Jul 2024 19:40:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46AJeo7Z033925; Wed, 10 Jul 2024 19:40:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46AJeogj033922; Wed, 10 Jul 2024 19:40:50 GMT (envelope-from git) Date: Wed, 10 Jul 2024 19:40:50 GMT Message-Id: <202407101940.46AJeogj033922@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: dc20d49aa939 - main - cxgbe(4): Do not report link state change during interface detach. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dc20d49aa939caea365cbdf0341b00de69253be4 Auto-Submitted: auto-generated The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=dc20d49aa939caea365cbdf0341b00de69253be4 commit dc20d49aa939caea365cbdf0341b00de69253be4 Author: Navdeep Parhar AuthorDate: 2024-07-03 19:01:33 +0000 Commit: Navdeep Parhar CommitDate: 2024-07-10 19:05:48 +0000 cxgbe(4): Do not report link state change during interface detach. This fixes a panic when multiple VIs are configured on an interface and only the non-primary VI is up at the time of driver detach. The problem was that the driver would queue a link state change notification for an interface about to be freed. To reproduce the panic, add "hw.cxgbe.num_vis=2" to loader.conf and # kldload if_cxgbe # ifconfig vcc0 up # devctl detach t6nex0 trap 0x9, rip = 0xffffffff8107db70, rsp = 0xfffffe0055263d60, rbp = 0xfffffe0055263dd0 taskqueue_run_locked() at taskqueue_run_locked+0x2a0/frame 0xfffffe0055263dd0 taskqueue_run() at taskqueue_run+0x72/frame 0xfffffe0055263df0 taskqueue_swi_run() at taskqueue_swi_run+0x18/frame 0xfffffe0055263e10 intr_event_execute_handlers() at intr_event_execute_handlers+0x249/frame 0xfffffe0055263e50 ithread_execute_handlers() at ithread_execute_handlers+0x9e/frame 0xfffffe0055263e70 Reviewed by: jhb MFC after: 1 week Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D45864 --- sys/dev/cxgbe/t4_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index c142fa93166d..99400dc9aadb 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -12112,7 +12112,7 @@ t4_os_link_changed(struct port_info *pi) for_each_vi(pi, v, vi) { ifp = vi->ifp; - if (ifp == NULL) + if (ifp == NULL || IS_DETACHING(vi)) continue; if (lc->link_ok) {