From nobody Thu Feb 24 10:04:23 2022 X-Original-To: dev-commits-src-branches@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 488E019E02E5; Thu, 24 Feb 2022 10:04:24 +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 4K47mR4mR3z3QMZ; Thu, 24 Feb 2022 10:04:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645697064; 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=8/kO7MkV02zqmAJ8aQlF9a96m//g+ca+hWFdTqPD7CI=; b=Z2T4M73mOQyXQE7xDV0pCJ6ATEUb0q951PamUPSrqi5i84K93yvpy77gwGpvi6cNqs4SYy Yl/WmcsnL4P+G3njtN+CkF3CmLBN5n5uFwyA+p3eRu1qLGv3FloRtuI7ZuTbK4lZxiDWLN 03Rk/mXfX2r7LuExccUwcobyMS1bIV6Pw2FXaTMyieDJq8KdBLZm0m9RwI00dNutC5LvrE mQb3OTDfEExYH2XbcqW9ByDH0pL9uORaYIEr4dTnto+UYGPaZTDY76KZkavAGU8bM86ZFt B9H+uEX2Pfn7c2/Is4GiyzA15HH3sb2nLjwhDlyRytqBZNf0MsGtQqZ7qR1j5g== 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 2A9D717EF; Thu, 24 Feb 2022 10:04:23 +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 21OA4N09003619; Thu, 24 Feb 2022 10:04:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 21OA4Nl6003618; Thu, 24 Feb 2022 10:04:23 GMT (envelope-from git) Date: Thu, 24 Feb 2022 10:04:23 GMT Message-Id: <202202241004.21OA4Nl6003618@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: bafce48d55d8 - stable/13 - mlx5en: Add missing refcount decrement on link-down. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: bafce48d55d8d62160bc810fe34b08b94b6ba3c6 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645697064; 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=8/kO7MkV02zqmAJ8aQlF9a96m//g+ca+hWFdTqPD7CI=; b=UgX0+a4c/hJVik7I1qCsQ87abVufKi8KykcgF/bZ5ixUVuhM372afFobIH8QipLGdfWDUp FbR1p8aRciokLPJAPRkmiZL7w1npljYbxzlO99ux5/5XTvqb+hPzbN8VGVw6r7vDq7fEty kmFqDD8TVRoRbAatVJL8rVTUCitzDuKQGU8vyaH1C33hYjPUtVCsrg/YEQFYFto+qW/rP1 ynqTY7QGW3LDX3DcSNXxKBdp/8Fzvlk8aABmNTwX/L7iy/CgzQF2ddYJKAla0oJXBGhdZx WxdsYbMZc/TKqkT2EIop6572UMJnMDCIcRzQ2O2EgmDhSEr3cLRbhryNQzBzKw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1645697064; a=rsa-sha256; cv=none; b=GINnoh/u6KfKE8qf/tiYItahpezalluqrGKYg4Onqc0EHvvCC7CHKJs+ai7ewUqIfsrEsK fvBUouFgK+wgZMV0Oj1kpTYz8WsxDjEqcIykpVYMNUiUOtYVHCwbMKodPPHwdAfGrfUZsr sMftCXL0HhMcSOfaGyXtPNTWO1CsVUWLhgFty20QR+Td7EZ18Fd/YHEPlwBMUky/viCOxp f1/Ceqc/8k0kvlHvCAy9fp7EhRttARU5qrJM1ozls9RJHAn9qJowjSwGS3jngnEQAqgAe7 +PKhkd8BXUF1I+fB3HG66tDPhhzbRcSE/eWT5LszL+RkMYPoQZQLuWtrBfgv8Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=bafce48d55d8d62160bc810fe34b08b94b6ba3c6 commit bafce48d55d8d62160bc810fe34b08b94b6ba3c6 Author: Hans Petter Selasky AuthorDate: 2022-02-24 09:59:01 +0000 Commit: Hans Petter Selasky CommitDate: 2022-02-24 09:59:01 +0000 mlx5en: Add missing refcount decrement on link-down. Sponsored by: NVIDIA Networking (cherry picked from commit d2a788a522f78f7c4b014df9097348419d90fae4) --- sys/dev/mlx5/mlx5_en/mlx5_en_iq.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_iq.c b/sys/dev/mlx5/mlx5_en/mlx5_en_iq.c index e375864dc85f..6553b002aa1b 100644 --- a/sys/dev/mlx5/mlx5_en/mlx5_en_iq.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_iq.c @@ -141,6 +141,10 @@ mlx5e_iq_free_db(struct mlx5e_iq *iq) iq->data[x].callback(iq->data[x].arg); iq->data[x].callback = NULL; } + if (unlikely(iq->data[x].p_refcount != NULL)) { + atomic_add_int(iq->data[x].p_refcount, -1); + iq->data[x].p_refcount = NULL; + } bus_dmamap_destroy(iq->dma_tag, iq->data[x].dma_map); } free(iq->data, M_MLX5EN);