From nobody Tue Feb 07 00:32:13 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 4P9kbd5jzvz3nf9w; Tue, 7 Feb 2023 00:32:13 +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 4P9kbd5BKVz3G5y; Tue, 7 Feb 2023 00:32:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675729933; 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=oTlrs3DsQ48KWAeG1aztkX5cQEZthElWAgBXJ2M0q2w=; b=OucLXxUbh0LfMNGeQm3VUBvn6tUneniHLRxxRIYa59zJT16RmI8JlpJ5cUR1b9dXNanfrL Vtu2jrobB8s6Tmma21hHSAoZ3Z2NkQL4DQqldAteVdBqSlC5hvP58PK6ld1on5rmfctisH pjY7KTZY4gtxtf4Syv0Kb84B4jMTNXRuEB1kv7dgDdH9YyC6211Usk7cq4tDTykSQPWZCV zyZXmTVUDDhh64qvm0Da+vDiemy4RCPfLIWiANNGs2Z/XloYWLPOtU6wykYFVdgDJ00zXn Y6N/I9r59sALOOpgZt/jGdyppIHXSqqjGwnxeVa1OUUlT1KVRMb/Z5eaPzWp9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675729933; 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=oTlrs3DsQ48KWAeG1aztkX5cQEZthElWAgBXJ2M0q2w=; b=r3j7DfFnG9GUdqDORmLMSA3LmxYNsr8IXLOku47MOR8tB8t4wHqYLf1RfyRQGacwRKw8+2 qx14enCuVHe9yPq84f7g6F214gBFCwzTj4o2klvq2jVfZUgy19vBAh5yJFnCAPpVcJT3q8 pxw4BRIo9ahodNaMcyd/uf5AGaBvJlZ2YiW6nNjBDkiAE7nvZAx6Z8z417f86ACtr22I6U PBPfYrO32ba1FvIwX7H2SrJ1KoMAkMpfOf+8qg4PaGEe0NoGiWj9OnGqc4iFfhocHQnYXV pzdKFPNER1hyqippMv026tRAs+xjvw3G3kpEMKUQOZ8YBKMUGTtdvYeVrOTMaw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1675729933; a=rsa-sha256; cv=none; b=Vhnb1S5NI4MQwGzMuqqONaZ0EFM8f9BE+06J6RARrNTWDiviWBjlxuRUTJcbq75r3+s5jq ScSdEl5FeGe4xmhfxnvirkd6kOs3xv+YCpR94nShNPrVvDVXWqlpcvGpvWN6RjGAvkWtdR oj75baTC6Mwcnerrg5FJre7ht40+Eqoo21KfXaCVZ1GNgqcRI/1LTOBO828SH5+QUJUoBy wkaCKjseRg9/WIUDwAwUG8eqBQQy3dmAXH+aKUkt7uiPcfuWXffx39TEe7jiS95EuqUVZO dr00laiiiELBL56hzs4HcM0ISsMO2A9tLIB4zJ+W7jQJWAaPGSgfcK7tFcmd+g== 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 4P9kbd4G8vzwS2; Tue, 7 Feb 2023 00:32:13 +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 3170WDHr050463; Tue, 7 Feb 2023 00:32:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3170WDZi050462; Tue, 7 Feb 2023 00:32:13 GMT (envelope-from git) Date: Tue, 7 Feb 2023 00:32:13 GMT Message-Id: <202302070032.3170WDZi050462@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: c907f13af0e6 - stable/12 - 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/12 X-Git-Reftype: branch X-Git-Commit: c907f13af0e66ea7f3112a06716d4ed6e04da258 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by erj: URL: https://cgit.FreeBSD.org/src/commit/?id=c907f13af0e66ea7f3112a06716d4ed6e04da258 commit c907f13af0e66ea7f3112a06716d4ed6e04da258 Author: Przemyslaw Lewandowski AuthorDate: 2023-01-24 23:41:15 +0000 Commit: Eric Joyner CommitDate: 2023-02-07 00:24:10 +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 869985857e4b..3690be2b2a77 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -2692,8 +2692,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++)