casaroli commented on code in PR #20630:
URL: https://github.com/apache/nuttx/pull/20630#discussion_r4263662999
##########
fs/v9fs/client.c:
##########
@@ -632,7 +634,18 @@ static int v9fs_client_rpc(FAR struct v9fs_transport_s
*transport,
return ret;
}
- nxsem_wait(&payload.resp);
+ /* The transport writes the reply into payload and into the buffers of
+ * the caller, all on the stack: wait for it even if a signal or a
+ * cancellation wakes this thread.
+ */
+
+ do
+ {
+ ret = nxsem_wait(&payload.resp);
Review Comment:
nxsem_wait_uninterruptible() retries only on EINTR. The RPC can also be
woken with ECANCELED, because read() is a cancellation point
(nxnotify_cancellation() calls nxsem_wait_irq(tcb, ECANCELED)). The transport
then still writes into the buffers on the stack.
Should nxsem_wait_uninterruptible() also retry on ECANCELED? Then I use it
here. Otherwise I keep the loop.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]