mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Manivannan Sadhasivam <mani@kernel.org>
To: Chunkai Deng <chunkai.deng@oss.qualcomm.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	 Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>,
	 Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
	linux-arm-msm@vger.kernel.org,  netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, tao.zhang1@oss.qualcomm.com,
	 peter.chen@oss.qualcomm.com, jeff.johnson@oss.qualcomm.com,
	konrad.dybcio@oss.qualcomm.com
Subject: Re: [PATCH net-next 3/3] net: qrtr: implement shutdown()
Date: Mon, 26 Oct 2026 19:06:03 +0530	[thread overview]
Message-ID: <at9WXQsV6pZzNZuL@debian> (raw)
In-Reply-To: <20261016-qrtr-add-shutdown-v1-3-e1cc01ca5919@oss.qualcomm.com>

On Fri, Oct 16, 2026 at 01:58:20AM -0700, Chunkai Deng wrote:
> QRTR uses sock_no_shutdown(), so shutdown() fails with -EOPNOTSUPP and
> there is no way to wake up a thread blocked in recv() on the socket.
> 
> Implement it the same way as unix_shutdown(): map SHUT_* to the
> *_SHUTDOWN bits, set them in sk_shutdown and call sk_state_change().
> 
> Do not use lock_sock() here. qrtr_sendmsg() holds it while sleeping in
> qrtr_tx_wait() until the remote returns flow control credit, which would
> leave shutdown() stuck in an uninterruptible wait. Take sk_lock.slock to
> serialize concurrent callers instead, and use WRITE_ONCE() for the
> lockless readers. Do the same for the store in qrtr_release().
> 
> A sender already sleeping in qrtr_tx_wait() is not woken by SHUT_WR;
> later sendmsg() calls fail with -EPIPE.
> 
> Signed-off-by: Chunkai Deng <chunkai.deng@oss.qualcomm.com>

Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>

- Mani

-- 
மணிவண்ணன் சதாசிவம்

      parent reply	other threads:[~2026-10-26 13:36 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-16  8:58 [PATCH net-next 0/3] net: qrtr: implement socket shutdown() Chunkai Deng
2026-10-16  8:58 ` [PATCH net-next 1/3] net: qrtr: do not take the sock lock on blocking recv Chunkai Deng
2026-10-20  9:35   ` netdev-bot+sashiko
2026-10-26 12:53   ` Manivannan Sadhasivam
2026-10-16  8:58 ` [PATCH net-next 2/3] net: qrtr: propagate sock_alloc_send_skb() errors from sendmsg() Chunkai Deng
2026-10-20  9:35   ` netdev-bot+sashiko
2026-10-26 12:54   ` Manivannan Sadhasivam
2026-10-16  8:58 ` [PATCH net-next 3/3] net: qrtr: implement shutdown() Chunkai Deng
2026-10-20  9:35   ` netdev-bot+sashiko
2026-10-21 20:35     ` Jakub Kicinski
2026-10-26 10:23       ` Chunkai Deng
2026-10-26 13:53         ` Manivannan Sadhasivam
2026-10-26 13:36   ` Manivannan Sadhasivam [this message]

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=at9WXQsV6pZzNZuL@debian \
    --to=mani@kernel.org \
    --cc=chunkai.deng@oss.qualcomm.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=jeff.johnson@oss.qualcomm.com \
    --cc=konrad.dybcio@oss.qualcomm.com \
    --cc=kuba@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=peter.chen@oss.qualcomm.com \
    --cc=tao.zhang1@oss.qualcomm.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

all inboxes | Powered by JetHome®