* [PATCH net] net: qrtr: ns: retry service announcements on -EAGAIN
@ 2026-10-16 12:45 Joonhoe Kim
2026-10-16 13:14 ` Konrad Dybcio
0 siblings, 1 reply; 4+ messages in thread
From: Joonhoe Kim @ 2026-10-16 12:45 UTC (permalink / raw)
To: mani, davem, edumazet, kuba, pabeni
Cc: horms, christopher.lew, deepak.singh, pranav.phansalkar,
andersson, linux-arm-msm, netdev, linux-kernel, regressions,
stable
Since commit 544d85de4dc2 ("net: qrtr: Send HELLO message on endpoint
register"), qrtr_node_enqueue() returns -EAGAIN for every packet but
HELLO until our HELLO has gone out to the node. The HELLO is retried,
but the NEW_SERVER announcements sent in reply to the remote's HELLO
are not, so a service registered before the remote came up is never
announced to it.
On Kaanapali the modem sends its HELLO before it accepts ours. With
rmtfs started first, the modem never learns about rmtfs and its
watchdog resets the SoC about 40 s later.
Retry each announcement for up to 10 s while it fails with -EAGAIN.
announce_servers() runs from the name service worker, which can sleep.
Fixes: 544d85de4dc2 ("net: qrtr: Send HELLO message on endpoint register")
Cc: stable@vger.kernel.org
Signed-off-by: Joonhoe Kim <26rote@gmail.com>
---
Tested on a Lenovo Legion Tab Y700 Gen 5 (out-of-tree board support)
with rmtfs started before the modem: without this patch the SoC resets;
with it the announcement goes out on the first retry and the modem
stays up. Starting rmtfs after the modem avoids the problem, but
distribution units start rmtfs first and let it boot the modem.
net/qrtr/ns.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/net/qrtr/ns.c b/net/qrtr/ns.c
index bcb090ee79d4..33a9c4449d6f 100644
--- a/net/qrtr/ns.c
+++ b/net/qrtr/ns.c
@@ -5,6 +5,7 @@
* Copyright (c) 2020, Linaro Ltd.
*/
+#include <linux/delay.h>
#include <linux/module.h>
#include <linux/qrtr.h>
#include <linux/workqueue.h>
@@ -226,7 +227,13 @@ static int announce_servers(struct sockaddr_qrtr *sq)
/* Announce the list of servers registered in this node */
xa_for_each(&node->servers, index, srv) {
+ unsigned long timeout = jiffies + 10 * HZ;
+
ret = service_announce_new(sq, srv);
+ while (ret == -EAGAIN && time_before(jiffies, timeout)) {
+ msleep(100);
+ ret = service_announce_new(sq, srv);
+ }
if (ret < 0) {
if (ret == -ENODEV)
continue;
--
2.43.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH net] net: qrtr: ns: retry service announcements on -EAGAIN
2026-10-16 12:45 [PATCH net] net: qrtr: ns: retry service announcements on -EAGAIN Joonhoe Kim
@ 2026-10-16 13:14 ` Konrad Dybcio
2026-10-16 13:20 ` Joonhoe Kim
0 siblings, 1 reply; 4+ messages in thread
From: Konrad Dybcio @ 2026-10-16 13:14 UTC (permalink / raw)
To: Joonhoe Kim, mani, davem, edumazet, kuba, pabeni
Cc: horms, christopher.lew, deepak.singh, pranav.phansalkar,
andersson, linux-arm-msm, netdev, linux-kernel, regressions,
stable
On 10/16/26 2:45 PM, Joonhoe Kim wrote:
> Since commit 544d85de4dc2 ("net: qrtr: Send HELLO message on endpoint
> register"), qrtr_node_enqueue() returns -EAGAIN for every packet but
> HELLO until our HELLO has gone out to the node. The HELLO is retried,
> but the NEW_SERVER announcements sent in reply to the remote's HELLO
> are not, so a service registered before the remote came up is never
> announced to it.
>
> On Kaanapali the modem sends its HELLO before it accepts ours. With
> rmtfs started first, the modem never learns about rmtfs and its
> watchdog resets the SoC about 40 s later.
Please remember about Assisted-by tags if they apply in your case
Konrad
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH net] net: qrtr: ns: retry service announcements on -EAGAIN
2026-10-16 13:14 ` Konrad Dybcio
@ 2026-10-16 13:20 ` Joonhoe Kim
2026-10-16 13:22 ` Konrad Dybcio
0 siblings, 1 reply; 4+ messages in thread
From: Joonhoe Kim @ 2026-10-16 13:20 UTC (permalink / raw)
To: Konrad Dybcio
Cc: mani, davem, edumazet, kuba, pabeni, horms, christopher.lew,
deepak.singh, pranav.phansalkar, andersson, linux-arm-msm, netdev,
linux-kernel, regressions, stable
On 10/16/26 3:14 PM, Konrad Dybcio wrote:
> Please remember about Assisted-by tags if they apply in your case
It does apply: I used an LLM for the analysis and for writing the
patch. I left the tag off after "docs: remove Assisted-by references"
was queued in docs-next, but I can add it back in v2 or note it below
the "---", whichever you prefer.
Thanks,
Joonhoe Kim
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net] net: qrtr: ns: retry service announcements on -EAGAIN
2026-10-16 13:20 ` Joonhoe Kim
@ 2026-10-16 13:22 ` Konrad Dybcio
0 siblings, 0 replies; 4+ messages in thread
From: Konrad Dybcio @ 2026-10-16 13:22 UTC (permalink / raw)
To: Joonhoe Kim
Cc: mani, davem, edumazet, kuba, pabeni, horms, christopher.lew,
deepak.singh, pranav.phansalkar, andersson, linux-arm-msm, netdev,
linux-kernel, regressions, stable
On 10/16/26 3:20 PM, Joonhoe Kim wrote:
> On 10/16/26 3:14 PM, Konrad Dybcio wrote:
>> Please remember about Assisted-by tags if they apply in your case
>
> It does apply: I used an LLM for the analysis and for writing the
> patch. I left the tag off after "docs: remove Assisted-by references"
> was queued in docs-next, but I can add it back in v2 or note it below
> the "---", whichever you prefer.
OK so we went through with removing that, didn't notice. No worries then!
Konrad
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-10-16 13:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-16 12:45 [PATCH net] net: qrtr: ns: retry service announcements on -EAGAIN Joonhoe Kim
2026-10-16 13:14 ` Konrad Dybcio
2026-10-16 13:20 ` Joonhoe Kim
2026-10-16 13:22 ` Konrad Dybcio
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox