From nobody Thu Jul 27 22:53:29 2023 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 4RBmJn4fSvz4pgVh; Thu, 27 Jul 2023 22:53:29 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RBmJn45sZz3nvs; Thu, 27 Jul 2023 22:53:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690498409; 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=C0g5JgffWbPtBwjD61F3/QvdFYM+1gYCDnmYWdu59aY=; b=W0BuUAjJ6ukdOqX5NxhDJE1I1UIXYLz1xIe6aDGEwl72gD52W2mKEiOLEvVfzIXUwQczBk i4nRO1R+eET2mfrT/1++AMk4R5V5rMSPFIC0iCZIM/dpoCXj3mVN90FOnLOGV9VD4yXdYg tMJE8OORCVz4wUfM3k64vD5I6foVEEXKgB7LVjcZXRrIc67CdPFrBVT9OLMczp0pZUbTw+ ZpQEPr7bqrh6N558DLbkGr7YsXy9BMFhG9aHeJ+kpJVOu4DSOKXiTNlD+8xLY5TGgRBQnq pGc4U37l6XFAdrLq1q01d5bLFrOnQyx51PVCDR2xmZbmC8+Fft/BAPRdiA5dIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690498409; 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=C0g5JgffWbPtBwjD61F3/QvdFYM+1gYCDnmYWdu59aY=; b=pua/pf1UClP1gSspiq+HWHJMjDp7B4zbvf6gigRr6cs/o/hHIJQDYrCIJsXlwAdJimwvPt anfaLzdowTVhe3OnBdNsJ76GFZQ6ard8otEW2OZB8pePsvGNHGDKEaaOqeYGg1NMJ94Rzu nSa3ENvipVCOCEXaESROS3VYrQz75E2AvA8fAKENInMQD5xycJVzxihOrXlJ/FzcwYdpPx WizesE9YopVDRqTlkID801F+tuFQ7XAV84C4wAlC/TUpffh1L14GnZ/zVe1HTLoY7zp+Lh Kykc/k5ZzEdfWP1PhmyHh43F3TpD4RhF+V4LjZlpwR7kW1PaQQsXrTgR4iORBQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690498409; a=rsa-sha256; cv=none; b=v+bHRfUjXFDnZKdlVWNTKpN6506w91XIGb07c7WnucRwciF+ZSz7yrnKdSvhtPa4kKJSqf RbY+AM2L6fScCJUe8eWW+nF0w/9cjNF+vxqyouqFP2559enuHEqPagLvHmBnPj9OKVCz8i 4Daig0SPwhUKGO/7OAbKuma+2qVIUxzkrbTApxoYAVpMjpFD9LZKsc6jMdoGROyHUV+B6X EXF8hjY9jfFnk0yjqpoE4fTRWgELpMHT+rOoT3dDh74SQpYIU8WF9kxo2pin0FmI+i2nGr z4eOesXMqg+WL3VaqYysWpWSKZvxERQkorcLiQTvo2Siw878u57aPrC3FZRMSg== 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 4RBmJn35ZjzSHh; Thu, 27 Jul 2023 22:53:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 36RMrTAP051517; Thu, 27 Jul 2023 22:53:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 36RMrTt4051516; Thu, 27 Jul 2023 22:53:29 GMT (envelope-from git) Date: Thu, 27 Jul 2023 22:53:29 GMT Message-Id: <202307272253.36RMrTt4051516@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Eric Joyner Subject: git: 04d4e34538cf - main - iflib: Fix panic during driver reload stress test 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: erj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 04d4e34538cf8f8ac99b5aa1c6c50b626d976dfd Auto-Submitted: auto-generated The branch main has been updated by erj: URL: https://cgit.FreeBSD.org/src/commit/?id=04d4e34538cf8f8ac99b5aa1c6c50b626d976dfd commit 04d4e34538cf8f8ac99b5aa1c6c50b626d976dfd Author: Przemyslaw Lewandowski AuthorDate: 2023-07-27 22:47:12 +0000 Commit: Eric Joyner CommitDate: 2023-07-27 22:47:12 +0000 iflib: Fix panic during driver reload stress test During a driver reload stress test, after 50-300 reloads a panic occurs. After adding sleeps in between loading and unloading the driver, the issue does not occur. It's possible that loading/unloading too fast may cause the gt_taskqueue pointer to be freed earlier than expected; checking for a null pointer first fixes it. Signed-off-by: Eric Joyner Reviewed by: erj@ Tested by: jeffrey.e.pieper@intel.com MFC after: 3 days Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D39457 --- sys/net/iflib.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/net/iflib.c b/sys/net/iflib.c index 9f433481afda..4dd6349f6be1 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -1650,7 +1650,8 @@ iflib_fast_intr_ctx(void *arg) return (result); } - GROUPTASK_ENQUEUE(gtask); + if (gtask->gt_taskqueue != NULL) + GROUPTASK_ENQUEUE(gtask); return (FILTER_HANDLED); }