Netdev List
 help / color / mirror / Atom feed
From: David Westen <davidlwesten@gmail.com>
To: netdev@vger.kernel.org
Cc: Loic Poulain <loic.poulain@oss.qualcomm.com>,
	Sergey Ryazanov <ryazanov.s.a@gmail.com>,
	Johannes Berg <johannes@sipsolutions.net>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	M Chetan Kumar <m.chetan.kumar@intel.com>,
	David Westen <davidlwesten@gmail.com>
Subject: [PATCH net] net: wwan: iosm: return the callback result of synchronous tasks
Date: Thu, 26 Nov 2026 19:48:49 -0800	[thread overview]
Message-ID: <20261127034849.11770-1-davidlwesten@gmail.com> (raw)

ipc_task_queue_send_task() is documented to return the callback's
result, but returns 0 whenever the callback succeeds.
ipc_protocol_msg_send() uses that result as the message ring slot that
points to its on-stack response, so a timeout clears slot 0 and leaves
the real slot pointing to the returned stack frame. A late reply then
calls complete() on it:

  BUG: unable to handle page fault for address: fffffffffffffff8
  RIP: 0010:complete+0x9c/0x2b0
  Call Trace:
   <IRQ>
   ipc_protocol_msg_process
   ipc_imem_tq_irq_cb
   ipc_task_queue_handler

Return the callback result. The other callers see the same values as
before.

Reproduced on an XMM7360 by forcing pipe open and close timeouts.

Fixes: 3b575260cb86 ("net: iosm: bottom half")
Signed-off-by: David Westen <davidlwesten@gmail.com>
---

Notes:
    The bug was found in an AI-assisted review of the driver. The
    investigation, the test changes, the patch and this changelog were done
    with an AI coding assistant (Claude Opus 5.5). I ran the tests and
    reviewed the result.

 drivers/net/wwan/iosm/iosm_ipc_task_queue.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/wwan/iosm/iosm_ipc_task_queue.c b/drivers/net/wwan/iosm/iosm_ipc_task_queue.c
index 7cb2f6a506d9..069075481825 100644
--- a/drivers/net/wwan/iosm/iosm_ipc_task_queue.c
+++ b/drivers/net/wwan/iosm/iosm_ipc_task_queue.c
@@ -162,10 +162,8 @@ int ipc_task_queue_send_task(struct iosm_imem *imem,
 			copy, size, is_copy);
 		if (is_copy)
 			kfree(copy);
-		goto out;
 	}
 
-	ret = 0;
 out:
 	return ret;
 }
-- 
2.56.0


                 reply	other threads:[~2026-11-27  3:49 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20261127034849.11770-1-davidlwesten@gmail.com \
    --to=davidlwesten@gmail.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=johannes@sipsolutions.net \
    --cc=kuba@kernel.org \
    --cc=loic.poulain@oss.qualcomm.com \
    --cc=m.chetan.kumar@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=ryazanov.s.a@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox