From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Shitalkumar Gandhi <shital.gandhi45@gmail.com>
Cc: Alexander Aring <alex.aring@gmail.com>,
Stefan Schmidt <stefan@datenfreihafen.org>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>,
Paolo Abeni <pabeni@redhat.com>,
linux-wpan@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, stable@vger.kernel.org,
Shitalkumar Gandhi <shitalkumar.gandhi@cambiumnetworks.com>
Subject: Re: [PATCH wpan] ieee802154: ca8210: fix pointer truncation in kfifo on 64-bit
Date: Mon, 18 May 2026 13:56:33 +0200 [thread overview]
Message-ID: <87qzn9szgu.fsf@bootlin.com> (raw)
In-Reply-To: <20260513153412.1284549-1-shitalkumar.gandhi@cambiumnetworks.com> (Shitalkumar Gandhi's message of "Wed, 13 May 2026 21:04:12 +0530")
Hi Shitalkumar,
Thanks for the patch!
[...]
> Found via a custom Coccinelle semantic patch hunting for short-byte
> kfifo I/O on byte-mode kfifos used to shuttle pointers.
>
> Fixes: ded845a781a5 ("ieee802154: Add CA8210 IEEE 802.15.4 device
> driver")
I don't remember what the net rules are exactly, but this definitely
should be backported:
Cc: stable@vger.kernel.org
[...]
> - if (kfifo_out(&priv->test.up_fifo, &fifo_buffer, 4) != 4) {
> + if (kfifo_out(&priv->test.up_fifo, &fifo_buffer, sizeof(fifo_buffer))
> + != sizeof(fifo_buffer)) {
This line becomes unreadable. Can you please use an intermediate
variable? Something like:
ret = kfifo_out(...);
if (ret != sizeof(...)) {
Thanks,
Miquèl
prev parent reply other threads:[~2026-05-18 11:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-13 15:34 [PATCH wpan] ieee802154: ca8210: fix pointer truncation in kfifo on 64-bit Shitalkumar Gandhi
2026-05-18 10:39 ` Simon Horman
2026-05-18 11:56 ` Miquel Raynal [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=87qzn9szgu.fsf@bootlin.com \
--to=miquel.raynal@bootlin.com \
--cc=alex.aring@gmail.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wpan@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=shital.gandhi45@gmail.com \
--cc=shitalkumar.gandhi@cambiumnetworks.com \
--cc=stable@vger.kernel.org \
--cc=stefan@datenfreihafen.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.