From nobody Thu Aug 24 21:06:39 2023 X-Original-To: dev-commits-src-all@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 4RWwcc0JM2z4rZds; Thu, 24 Aug 2023 21:06:40 +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 4RWwcb6ry8z3TNJ; Thu, 24 Aug 2023 21:06:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1692911200; 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=F09/gADvUj/sEnxKcWpXtPp8BUYDqXc5eHvm6EIXiEA=; b=hwrU1HmPuivVZaxop2xTeOXvjWvEhqapI5HSJJ4u672/8UFEj5n/g8RGfx+zc9lccpaVAP CBmLz35O5ieAp2yCpCbn97AfM+m6JYFy1i3fZHbQXILtK1tf7pTrYIR2FWkoDf6JyxaftT zvALi2uvfSK8ooaSh73OLfMt2Oncjv1wzkZrRXt6jPIb2ZM6DVvEtOD9y2GswfoNmKfz6V B8NDz1Gp5SIgaHvevIlY778aY8gHZrVUKEAnNQOUsVj6q8t14C1dfOPPfi+vkPR8QgIbqT ziuRaBvygfXwTl7oGFl4zbWx6Y6AAzHbjEeK4lsaPhYyXuZm6qGpMCHlNL1w/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1692911200; 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=F09/gADvUj/sEnxKcWpXtPp8BUYDqXc5eHvm6EIXiEA=; b=psSllE1gB8JZVhPArei4JnOOWXxdJmJTcdROLT608sCRKI5mZuJG8R/F6HxKUU3Mior+bu CRaua+/Cc5O8y7/cePbTSlFoyA6JrmkXLKP26gsDrUC6PtM/7zdB9EjXrxY9FqF7sjbPKa bhAb6zO+v+yBa6Dq6AhC/hoMtsEXDA7pT9/GAK2l1h8dNiBrWjTMqXJT75wqX7PTG0tD5t V4lr/3FqoqSUJrhgmx3M3EjcllgkksbP2tNJzInY357hiZ0yFumkD5xBRrxABUxEZVHZlf jwuR5S16KJA8xr4G5Pu4MSuc4ZJ2NDCqN7aYr32Q0loDVdswZyCd+IifcwM2hQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1692911200; a=rsa-sha256; cv=none; b=VBlKxUPDf3SNe9dcOGSVvc6QeB/3I1AYCbSrU6TCSCkkEjorxOCB8xhshV1BdtahFg7z83 zfS3ksNNsRPpdG0U0Aatve3i614KADIsUY8kAOTqyCx2aCmOj1B7TiiRf5jaNUh8Q+YXHK Rgj2H44Fz8LlsoFC8LMcxjr++r3LEmoXh1O01ygQpwTiCI8OUxOELfkgYufvPec0ETxj0M sgXVMiNp2Wr6LEySq7C1RqCyYEQo9mGbHtyTzR0KvZfa4if08GLTfx6JPvDI6O6g6MBfnW YaO/rVJZl1c1Iyff/5k9G7WSLX54tzH8C+fOLkj+xMeCP9BJa2gdMr+8abfSrg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4RWwcb5p9Qzhxp; Thu, 24 Aug 2023 21:06:39 +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 37OL6dKd058638; Thu, 24 Aug 2023 21:06:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37OL6dZ4058635; Thu, 24 Aug 2023 21:06:39 GMT (envelope-from git) Date: Thu, 24 Aug 2023 21:06:39 GMT Message-Id: <202308242106.37OL6dZ4058635@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Eric Joyner Subject: git: cb5152f961bb - stable/13 - iflib: Fix panic during driver reload stress test List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: cb5152f961bbb89b186ee76aaa8eb631f21cf6c4 Auto-Submitted: auto-generated The branch stable/13 has been updated by erj: URL: https://cgit.FreeBSD.org/src/commit/?id=cb5152f961bbb89b186ee76aaa8eb631f21cf6c4 commit cb5152f961bbb89b186ee76aaa8eb631f21cf6c4 Author: Przemyslaw Lewandowski AuthorDate: 2023-07-27 22:47:12 +0000 Commit: Eric Joyner CommitDate: 2023-08-24 21:04:16 +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 Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D39457 (cherry picked from commit 04d4e34538cf8f8ac99b5aa1c6c50b626d976dfd) --- 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 763ce3adf64b..2ee246170211 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -1628,7 +1628,8 @@ iflib_fast_intr_ctx(void *arg) return (result); } - GROUPTASK_ENQUEUE(gtask); + if (gtask->gt_taskqueue != NULL) + GROUPTASK_ENQUEUE(gtask); return (FILTER_HANDLED); }