From: Paolo Abeni <pabeni@redhat.com>
To: Jonas Suhr Christensen <jsc@umbraculum.org>, netdev@vger.kernel.org
Cc: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>,
Michal Simek <michal.simek@xilinx.com>,
Harini Katakam <harini.katakam@amd.com>,
Haoyue Xu <xuhaoyue1@hisilicon.com>,
huangjunxian <huangjunxian6@hisilicon.com>,
Wang Qing <wangqing@vivo.com>,
Yang Yingliang <yangyingliang@huawei.com>,
Esben Haabendal <esben@geanix.com>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net v2 1/2] net: ll_temac: Fix DMA resources leak
Date: Tue, 07 Feb 2023 12:36:11 +0100 [thread overview]
Message-ID: <135b671b1b76978fb147d5fee1e1b922e2c61f26.camel@redhat.com> (raw)
In-Reply-To: <5314e0ba3a728787299ca46a60b0a2da5e8ab23a.camel@redhat.com>
On Tue, 2023-02-07 at 12:27 +0100, Paolo Abeni wrote:
> Hi,
>
> On Sun, 2023-02-05 at 21:11 +0100, Jonas Suhr Christensen wrote:
> > Add missing conversion of address when unmapping dma region causing
> > unmapping to silently fail. At some point resulting in buffer
> > overrun eg. when releasing device.
> >
> > Fixes: fdd7454ecb29 ("net: ll_temac: Fix support for little-endian platforms")
> >
> > Signed-off-by: Jonas Suhr Christensen <jsc@umbraculum.org>
>
> I'm sorry for nit-picking, but you must avoid empty lines in the tag
> area. Please post a v2 avoiding the empty line between the Fixes and
> sob tags (both here and in the next patch).
>
> You can retain (include in the tag area) the already collected
> reviewed-by/acked-by tags.
I'm sorry, I'm low on coffee. I forgot to mention a more relevant
thing:
> @@ -307,9 +308,14 @@ static void temac_dma_bd_release(struct net_device *ndev)
> for (i = 0; i < lp->rx_bd_num; i++) {
> if (!lp->rx_skb[i])
> break;
> - dma_unmap_single(ndev->dev.parent, lp->rx_bd_v[i].phys,
> +
> + bd = &lp->rx_bd_v[i];
> + dma_unmap_single(ndev->dev.parent, be32_to_cpu(bd->phys),
The above be32_to_cpu() introduces a new build warning. as phys type is
u32. It looks like the existing code generates a lot of similar warns.
You can either try change to phys type to __be32 (likely not suitable
for -net and possibly can introduce even more warnings elsewhere) or
explicitly cast the argument.
Thanks,
Paolo
next prev parent reply other threads:[~2023-02-07 11:37 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-05 20:11 [PATCH net v2 0/2] Fix dma leaking Jonas Suhr Christensen
2023-02-05 20:11 ` [PATCH net v2 1/2] net: ll_temac: Fix DMA resources leak Jonas Suhr Christensen
2023-02-06 10:19 ` Katakam, Harini
2023-02-07 7:59 ` esben
2023-02-07 11:27 ` Paolo Abeni
2023-02-07 11:36 ` Paolo Abeni [this message]
2023-02-07 18:42 ` Jakub Kicinski
2023-03-13 18:37 ` Jonas Suhr Christensen
2023-03-13 18:48 ` Jakub Kicinski
2023-03-14 5:15 ` Katakam, Harini
2023-07-08 13:15 ` Christophe JAILLET
2023-07-10 5:51 ` Katakam, Harini
2023-09-20 11:56 ` Katakam, Harini
2023-02-05 20:11 ` [PATCH net v2 2/2] net: ll_temac: Reset buffer on dma_map_single() errors Jonas Suhr Christensen
2023-02-06 9:59 ` Katakam, Harini
2023-02-07 7:59 ` esben
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=135b671b1b76978fb147d5fee1e1b922e2c61f26.camel@redhat.com \
--to=pabeni@redhat.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=esben@geanix.com \
--cc=harini.katakam@amd.com \
--cc=huangjunxian6@hisilicon.com \
--cc=jsc@umbraculum.org \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.simek@xilinx.com \
--cc=netdev@vger.kernel.org \
--cc=wangqing@vivo.com \
--cc=xuhaoyue1@hisilicon.com \
--cc=yangyingliang@huawei.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;
as well as URLs for NNTP newsgroup(s).