From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Taehee Yoo <ap420073@gmail.com>,
Mina Almasry <almasrymina@google.com>,
Jakub Kicinski <kuba@kernel.org>, Sasha Levin <sashal@kernel.org>,
davem@davemloft.net, edumazet@google.com, pabeni@redhat.com,
asml.silence@gmail.com, kaiyuanz@google.com, willemb@google.com,
skhawaja@google.com, netdev@vger.kernel.org
Subject: [PATCH AUTOSEL 6.13 13/16] net: devmem: do not WARN conditionally after netdev_rx_queue_restart()
Date: Mon, 17 Mar 2025 12:37:22 -0400 [thread overview]
Message-ID: <20250317163725.1892824-13-sashal@kernel.org> (raw)
In-Reply-To: <20250317163725.1892824-1-sashal@kernel.org>
From: Taehee Yoo <ap420073@gmail.com>
[ Upstream commit a70f891e0fa0435379ad4950e156a15a4ef88b4d ]
When devmem socket is closed, netdev_rx_queue_restart() is called to
reset queue by the net_devmem_unbind_dmabuf(). But callback may return
-ENETDOWN if the interface is down because queues are already freed
when the interface is down so queue reset is not needed.
So, it should not warn if the return value is -ENETDOWN.
Signed-off-by: Taehee Yoo <ap420073@gmail.com>
Reviewed-by: Mina Almasry <almasrymina@google.com>
Link: https://patch.msgid.link/20250309134219.91670-8-ap420073@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/core/devmem.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/net/core/devmem.c b/net/core/devmem.c
index 11b91c12ee113..17f8a83a5ee74 100644
--- a/net/core/devmem.c
+++ b/net/core/devmem.c
@@ -108,6 +108,7 @@ void net_devmem_unbind_dmabuf(struct net_devmem_dmabuf_binding *binding)
struct netdev_rx_queue *rxq;
unsigned long xa_idx;
unsigned int rxq_idx;
+ int err;
if (binding->list.next)
list_del(&binding->list);
@@ -119,7 +120,8 @@ void net_devmem_unbind_dmabuf(struct net_devmem_dmabuf_binding *binding)
rxq_idx = get_netdev_rx_queue_index(rxq);
- WARN_ON(netdev_rx_queue_restart(binding->dev, rxq_idx));
+ err = netdev_rx_queue_restart(binding->dev, rxq_idx);
+ WARN_ON(err && err != -ENETDOWN);
}
xa_erase(&net_devmem_dmabuf_bindings, binding->id);
--
2.39.5
next prev parent reply other threads:[~2025-03-17 16:38 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-17 16:37 [PATCH AUTOSEL 6.13 01/16] x86/hyperv/vtl: Stop kernel from probing VTL0 low memory Sasha Levin
2025-03-17 16:37 ` [PATCH AUTOSEL 6.13 02/16] ASoC: codecs: wsa884x: report temps to hwmon in millidegree of Celsius Sasha Levin
2025-03-17 16:37 ` [PATCH AUTOSEL 6.13 03/16] ASoC: cs42l43: Add jack delay debounce after suspend Sasha Levin
2025-03-17 16:37 ` [PATCH AUTOSEL 6.13 04/16] ASoC: rt1320: set wake_capable = 0 explicitly Sasha Levin
2025-03-17 16:37 ` [PATCH AUTOSEL 6.13 05/16] wifi: mac80211: flush the station before moving it to UN-AUTHORIZED state Sasha Levin
2025-03-17 16:37 ` [PATCH AUTOSEL 6.13 06/16] wifi: mac80211: fix SA Query processing in MLO Sasha Levin
2025-03-17 16:37 ` [PATCH AUTOSEL 6.13 07/16] locking/semaphore: Use wake_q to wake up processes outside lock critical section Sasha Levin
2025-03-17 16:37 ` [PATCH AUTOSEL 6.13 08/16] x86/hyperv: Fix output argument to hypercall that changes page visibility Sasha Levin
2025-03-17 16:37 ` [PATCH AUTOSEL 6.13 09/16] x86/sgx: Warn explicitly if X86_FEATURE_SGX_LC is not enabled Sasha Levin
2025-03-17 16:37 ` [PATCH AUTOSEL 6.13 10/16] drm/xe/guc_pc: Retry and wait longer for GuC PC start Sasha Levin
2025-03-17 16:37 ` [PATCH AUTOSEL 6.13 11/16] nvme-pci: fix stuck reset on concurrent DPC and HP Sasha Levin
2025-03-17 16:37 ` [PATCH AUTOSEL 6.13 12/16] drm/amd: Keep display off while going into S4 Sasha Levin
2025-03-17 16:37 ` Sasha Levin [this message]
2025-03-17 16:37 ` [PATCH AUTOSEL 6.13 14/16] platform/surface: aggregator_registry: Add Support for Surface Pro 11 Sasha Levin
2025-03-17 16:37 ` [PATCH AUTOSEL 6.13 15/16] selftests: netfilter: skip br_netfilter queue tests if kernel is tainted Sasha Levin
2025-03-17 16:37 ` [PATCH AUTOSEL 6.13 16/16] ALSA: hda/realtek: Add mute LED quirk for HP Pavilion x360 14-dy1xxx Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250317163725.1892824-13-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=almasrymina@google.com \
--cc=ap420073@gmail.com \
--cc=asml.silence@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kaiyuanz@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=skhawaja@google.com \
--cc=stable@vger.kernel.org \
--cc=willemb@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.