From nobody Tue Jan 24 23:46:29 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 4P1kBs73tZz3121P; Tue, 24 Jan 2023 23:46: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 4P1kBs6NJxz3kVV; Tue, 24 Jan 2023 23:46:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674603989; 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=lcgqEHvlkzhZ69Ud5gATgpoF5iH7KH9+SUr75/QEnd0=; b=f+cdX9JYiJTWgPG8Bgvajt1XAq7VEWZNkaYCyHeAMrbpK4u1831wkecYY6QUDKcqzrWk8z bzlrSztty7dFX1JDIunTiQuxcbKPW1bCrjY7IIo34Rx1VvR+WPcFDWY+JZGC596LiRfnI4 j7XXKPdG8l0IPNt6RyRumaHy6y7VD3AkA+GO94WVCmaSbD5Vzk4M1FuqBotiOb35rwYFF0 KpNQcHmOmq5wzSTdSUnpdgO2ffSXsvArMNuTQ9uDKW0q78Sqmbi4iHSufBPnCUSKU22ZtW ruSrxkz6EwVA8udImrxpG1h4LLn7YfXzoXubEeSJzOSAj7qJY8QUx+NE/KVz8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674603989; 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=lcgqEHvlkzhZ69Ud5gATgpoF5iH7KH9+SUr75/QEnd0=; b=Yvn5L2faGoFKX1pAP9Jain/Uz0zuDNaAqQnp83IWMoYDG9KMoPEvh0V7GA4nFV5DCEfU6R pbp763tgXkVrvu7oRQs+4zDY5yu8ShQyyKIcmlzgmXuPCzXgdF6M3qWZkcugAgqLkLM2Gy 4zUqz88FCAHRmSs1C/mzFmomrt+HlWP104EN6Kxl163QnfSDKn6P9dQxMay5go3F78dirl n8yoV1UJyw9dMlAj7TKNV4oTZKboiegN8nFy3FxJk+CgHTJZvXYIrfGcIDQQVoq+SBD9WS cJBsdL7eOSAB6Hjl8P1tdTAZFiJYa6B5TMCxMnuz3eDXV0vm8GLT/QpnoYVxIw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674603989; a=rsa-sha256; cv=none; b=ghd8gsEWDMsrJTZ6782EOaQSEJl+iqq9mmSbUOfQRHg6fOxMS/3Cw+zS7/2yRTkN9CaRSd UnEvyfxLqx+XXxm6gk/Mz6LAMVPaTZ5T96t/mWKPfyvXWyxRYbMRHaQ1ElE4zbi5HO1vnH tNLXMgcSAVRDNkoUlby0fugw0U0qMs3+LqHzsmNdRbz6MWBw3TeRPBt8P+GLhiGOqfiLpR 78GbcSfPtu/bcIzVBIMYi2dmCRWGoDo6X1d9FI47kk+VoAVaYbCynWHLT8rk7wlNz7xZwo X4FU3bjBleLVgnLzv36yvZRxpUXLePj8IHskw1CzD4cZZEnYU1LmL1IWIPSnDg== 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 4P1kBs5Qr9zT3D; Tue, 24 Jan 2023 23:46:29 +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 30ONkTAM021172; Tue, 24 Jan 2023 23:46:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30ONkTNP021171; Tue, 24 Jan 2023 23:46:29 GMT (envelope-from git) Date: Tue, 24 Jan 2023 23:46:29 GMT Message-Id: <202301242346.30ONkTNP021171@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: 9147969bc277 - main - 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/main X-Git-Reftype: branch X-Git-Commit: 9147969bc277b389a62373c6a5050a2ebfd39071 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by erj: URL: https://cgit.FreeBSD.org/src/commit/?id=9147969bc277b389a62373c6a5050a2ebfd39071 commit 9147969bc277b389a62373c6a5050a2ebfd39071 Author: Przemyslaw Lewandowski AuthorDate: 2023-01-24 23:41:15 +0000 Commit: Eric Joyner CommitDate: 2023-01-24 23:45:15 +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 --- 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 5f202b120005..0a500f8e2810 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -2644,8 +2644,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++)