[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87ilgo8arm.fsf@geanix.com>
Date: Mon, 30 Jan 2023 13:30:53 +0100
From: esben@...nix.com
To: Jakub Kicinski <kuba@...nel.org>,
Jonas Suhr Christensen <jsc@...raculum.org>
Cc: netdev@...r.kernel.org, davem@...emloft.net, edumazet@...gle.com,
pabeni@...hat.com, michal.simek@...inx.com,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] net: ll_temac: fix DMA resources leak
Jakub Kicinski <kuba@...nel.org> writes:
> On Thu, 26 Jan 2023 11:16:06 +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.
>
> Could you add a Fixes tag pointing to the commit which introduced
> the bug? It will help the stable teams backport the patch.
Fixes: fdd7454ecb29 ("net: ll_temac: Fix support for little-endian platforms")
> When reposting please put [PATCH net v2] as the prefix (noting
> the target tree for the benefit of bots/CIs).
>
>> Signed-off-by: Jonas Suhr Christensen <jsc@...raculum.org>
>> ---
>> drivers/net/ethernet/xilinx/ll_temac_main.c | 8 +++++++-
>> 1 file changed, 7 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/ethernet/xilinx/ll_temac_main.c b/drivers/net/ethernet/xilinx/ll_temac_main.c
>> index 1066420d6a83..66c04027f230 100644
>> --- a/drivers/net/ethernet/xilinx/ll_temac_main.c
>> +++ b/drivers/net/ethernet/xilinx/ll_temac_main.c
>> @@ -300,6 +300,7 @@ static void temac_dma_bd_release(struct net_device *ndev)
>> {
>> struct temac_local *lp = netdev_priv(ndev);
>> int i;
>> + struct cdmac_bd *bd;
>
> nit: we like variable declarations longest to shortest in networking
> so before the int i; pls
>
>> /* Reset Local Link (DMA) */
>> lp->dma_out(lp, DMA_CONTROL_REG, DMA_CONTROL_RST);
Powered by blists - more mailing lists