Netdev List
 help / color / mirror / Atom feed
From: Andrey Derkach <gabin278@gmail.com>
To: netdev-bot+sashiko@kernel.org
Cc: Manivannan Sadhasivam <mani@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Willem de Bruijn <willemb@google.com>,
	Simon Horman <horms@kernel.org>,
	Bjorn Andersson <andersson@kernel.org>,
	netdev@vger.kernel.org, linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH net v2] net: qrtr: smd: hold packets that arrive before probe has finished
Date: Sun,  6 Dec 2026 02:22:36 +0200	[thread overview]
Message-ID: <20261206002236.1635529-1-gabin278@gmail.com> (raw)
In-Reply-To: <179650769062.3148.8280707500727880191@kernel.org>

On Sat, 05 Dec 2026 21:54:50 +0000, netdev-bot+sashiko@kernel.org wrote:
> - [Medium] On SMD, this patch adds a way to lose a packet permanently,
>   and that packet can be the remote's HELLO.

Agreed. In v3, probe passes the held packets on one at a time, with
interrupts enabled, and sets the driver data only when none is left.
If qrtr_endpoint_post() fails with -ENOMEM, probe calls msleep(10)
and tries the same packet again, 10 tries in all, as SMD would have
tried it again from its FIFO. Only then is it dropped, with a warning.

> - [Low] The posted/dropped counts that qcom_smd_qrtr_post_held()
>   reports are wrong.

Agreed. In v3 the drain calls qrtr_endpoint_post() directly, so every
error counts as dropped, and the warning prints the last error. The
-EINVAL to 0 conversion stays only on the callback path, where it
tells SMD to drop the packet.

> - [High] This problem wasn't introduced by this patch, but there is a
>   NULL dereference or use-after-free in the unbind window.

Yes, this is older than this patch. It is the remove() problem the
notes mention, and the fix will come as its own patch after this one.
Clearing the driver data under the lock is not enough on its own: once
probe is done, the callback reads the driver data without the lock.

pw-bot: cr

      reply	other threads:[~2026-12-06  0:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-04 21:06 [PATCH net v2] net: qrtr: smd: hold packets that arrive before probe has finished Andrey Derkach
2026-12-05 21:54 ` netdev-bot+sashiko
2026-12-06  0:22   ` Andrey Derkach [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=20261206002236.1635529-1-gabin278@gmail.com \
    --to=gabin278@gmail.com \
    --cc=andersson@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=mani@kernel.org \
    --cc=netdev-bot+sashiko@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox