From nobody Tue Feb 07 00:16:16 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 4P9kFD2yW0z3ncqv; Tue, 7 Feb 2023 00:16:16 +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 4P9kFD2PdXz3DrF; Tue, 7 Feb 2023 00:16:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675728976; 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=FBFoD/TyFWGUGBEszyDrG9rfCJFiR1Aw6CVe3q7977M=; b=pkqXIKKKuuQCGs7RrUh/ohYtdyzltKBAjuJ1AuntRs/UuaRY/T5SpPwgPTsyzwM7VDMCqS lwxRSibkCSUXUk8cKWhX/25tsycHhU6wE2TP5sRqfqbzA3MwcRMSW/gVSdEstzwaPiChgJ yCQwvL1Rwg6iuafLVxImtIHk6npn8UtbnDynIA7gRXZ8kK/o6IN/1D2c4CwPmNFwUu3YAF wg88VEC5hGDqVGU2ISOCYYarBU4PCaWLh6j03nfj1jTPp1Sm4c9DXhhiCgA+D71SvVqxUc OQaQN+MhOMK7pxGpZ28GXy6bOdbELQlGgKsGStKLOGo6cnfrbE2QX8na/VDCTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675728976; 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=FBFoD/TyFWGUGBEszyDrG9rfCJFiR1Aw6CVe3q7977M=; b=kKe4T/TEtFNGCF/8fB5sNRa7J4s2cyPr+5cCW0nz+Zw8I/Pnbq8F3FuXnEvOAXgv3xjgIs aCopg19ac87ZFrMf6ZppMdhHgktHMgPauD67f2OR6sUNYLXgI8Ys8Fh9mElTN1QrJFWNRk BKnaUBUecZywT1wNlVsohI9YVBH0iPCxQGL56l8vihDgCQgS/wirlvX+58/VK0L97tmL2f NxHMZ9I53UPNyUS+qa6HLJNi2M5x44Sxc8apAqlnELMFNN/EQj7WNWGjVZK8AaOFq31HiO i29vX+RqCBFsgZQ145+qLPbnkiH+hemW1hlazgdbwURpf+WgQ66HFGPmQbwd5w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1675728976; a=rsa-sha256; cv=none; b=tjXjbuddTZezp2cvXv/2YZjNqhY4CWjQHaN3O16FB5U83HpGWe3eCYLL97+r+CTJHsjmhL 1amwzAyJiYsoLvGPiQlSlc/tqg4N07x50Yo4tkkPQ2iO6MIFNYvN8LXDUVdsUxBGfQPOv7 HM2+JMxeTDDCnfI+gtq+lQfkDm7udrCRrfit4ylggrZae6bHFtYTfn4vEgwLZA6+eot3BO yZag2byfXAadj0W/AVsu+4A2ygGpQptKLPZa288wjEe5vMGRIh4QNminkBq2XYcLWsVX46 KdL3eVGJhRuWk6/lxHmKBdX4CIy3Q2/wof8kDL9GPboH1BL7sbZIACz+OzLEwQ== 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 4P9kFD1QQlzwCc; Tue, 7 Feb 2023 00:16:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3170GGQc022253; Tue, 7 Feb 2023 00:16:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3170GGC4022252; Tue, 7 Feb 2023 00:16:16 GMT (envelope-from git) Date: Tue, 7 Feb 2023 00:16:16 GMT Message-Id: <202302070016.3170GGC4022252@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: 4ad47cfc1458 - stable/13 - iflib: Add null check to iflib_stop() 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: 4ad47cfc1458263564dfecf483c5dfc253008b6f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by erj: URL: https://cgit.FreeBSD.org/src/commit/?id=4ad47cfc1458263564dfecf483c5dfc253008b6f commit 4ad47cfc1458263564dfecf483c5dfc253008b6f Author: Przemyslaw Lewandowski AuthorDate: 2023-01-24 23:41:15 +0000 Commit: Eric Joyner CommitDate: 2023-02-07 00:16:02 +0000 iflib: Add null check to iflib_stop() Ever since gtaskqueue_drain() was added to iflib_stop(), a kernel panic occurs when the ice(4) driver is in recovery mode. Queues are not initialized in this mode, so gt_taskqueue is not initialized, and gtaskqueue_drain() will panic. Fix this by only doing a drain if an RX queue's gt_taskqueue is initialized. Signed-off-by: Eric Joyner Reviewed by: erj@ MFC after: 1 week Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D37892 (cherry picked from commit 9147969bc277b389a62373c6a5050a2ebfd39071) --- sys/net/iflib.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/net/iflib.c b/sys/net/iflib.c index 39072eedc0bb..748970a58f3f 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -2613,8 +2613,9 @@ iflib_stop(if_ctx_t ctx) bzero((void *)di->idi_vaddr, di->idi_size); } for (i = 0; i < scctx->isc_nrxqsets; i++, rxq++) { - gtaskqueue_drain(rxq->ifr_task.gt_taskqueue, - &rxq->ifr_task.gt_task); + if (rxq->ifr_task.gt_taskqueue != NULL) + gtaskqueue_drain(rxq->ifr_task.gt_taskqueue, + &rxq->ifr_task.gt_task); rxq->ifr_cq_cidx = 0; for (j = 0, di = rxq->ifr_ifdi; j < sctx->isc_nrxqs; j++, di++)