From nobody Wed Jul 17 14:24:48 2024 X-Original-To: dev-commits-src-branches@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 4WPJ9X6tNDz5RPxH; Wed, 17 Jul 2024 14:24:48 +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 4WPJ9X4Q0mz412Z; Wed, 17 Jul 2024 14:24:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721226288; 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=CZ77FX1vSx9gn/TpvIHvQZ6MSj7PNBzB7owXjhc44Ss=; b=GjgJEuA3Hf2wRb2vOBzmWpxy6xlUDRZoEAyW3XaUvxytYeUd2qztVpgxq67G+8lEFB6Ffq qAmTHQoXSp8lp2s3qDeljsdb4DGqeFOSyzAK7Ve5oYv9OklKsMQXI99uBEbWZTRPfolvFZ Z9PBTJhyFI6ve7CaVg20EkrUQnplHNXmUht1nTo/AbAK7ewotdWVk0noZL9i6eeqZtAL0t LdCFuVEyXCtq/cRYdIUkL0mgo198eqXqWaO9fk48cCh3yDRBTWALV5FWuEaPvb7MU6QYdu f9eWlmXm1K4VkkYhZqmw39ZQ1IpLh1AmBwwj28CV7AWWDRzTl2hxwYKTYEJZsg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721226288; a=rsa-sha256; cv=none; b=gVrMvtCoSeRvdEjmvwKHtvd0ErOp8ZT67A6OvZ5whOPaCvh7GZUvlQEKuOKhTKpArJdZTj 5TMuHgKiK75txYK+DjSS7Vn9Vv0ctqBw05PtH4mXx3qhY7EQ+L2qVmKN1a9r1yy+o/QST8 9oaGB4k5GaMrzl0xIxsnwfiV6U6nmPhi86KiBmoGkE+ANfeT8G9XtvIhcKf/ms/TrVLQHM a6q3e9Ev2wBqprNZfedmSlFmuiX/OCxADn2seOv04Fbl/+BQ3oY5sIPhYKwYaHK9aTzUro tF3w3ISVYqK+Rcs3gOxzc7f314wKthGVhCmLN8V/6ZrRCLxZavr9UlCGpZeFkw== 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=1721226288; 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=CZ77FX1vSx9gn/TpvIHvQZ6MSj7PNBzB7owXjhc44Ss=; b=rApdG0ZDhU/xQpIjR0N2wDDAhWPeTz+lp7AiDh+9LvqU2EDJ34RW4fUT6Eh7vhBtltsSK7 JbFrH4+KV3EY5qnzCHFoPOom6Z+y3bgwfmHasB0MbRDDyUdhps8r1CGlXEWZO5xi/+RzVU Zc5t2S6SFl4lRJfok2fGjE4HzobqDXE384OS9ybc6nfN9xNJGKTC3GOzub7HmafcTE+OCG Kpfh3CsDmkLC2R05jcfI3w8ihw9RNG6RErp7XKJ8rXyUtxt+fWSP6soYFSgUGNGJo/xR5u kkSsDJclYHo5x2ZE/Zr5Fkz2A/z3KFoXrTYaofNTwbq5HQK1uvHxUYCTH/hu1g== 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 4WPJ9X42NTz1Mb3; Wed, 17 Jul 2024 14:24:48 +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 46HEOmiG033619; Wed, 17 Jul 2024 14:24:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46HEOmaq033616; Wed, 17 Jul 2024 14:24:48 GMT (envelope-from git) Date: Wed, 17 Jul 2024 14:24:48 GMT Message-Id: <202407171424.46HEOmaq033616@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Navdeep Parhar Subject: git: dd0bb5ba4257 - stable/13 - cxgbe(4): Do not report link state change during interface detach. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: dd0bb5ba4257e814ff39b9d7e0321af4b0f82fc5 Auto-Submitted: auto-generated The branch stable/13 has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=dd0bb5ba4257e814ff39b9d7e0321af4b0f82fc5 commit dd0bb5ba4257e814ff39b9d7e0321af4b0f82fc5 Author: Navdeep Parhar AuthorDate: 2024-07-03 19:01:33 +0000 Commit: Navdeep Parhar CommitDate: 2024-07-17 07:18:27 +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 Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D45864 (cherry picked from commit dc20d49aa939caea365cbdf0341b00de69253be4) --- 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 842eb87e9126..7f949ad8e66c 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -12399,7 +12399,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) {