lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 16 Dec 2020 12:43:43 -0800
From:   Jakub Kicinski <kuba@...nel.org>
To:     Vincent Stehlé <vincent.stehle@...oste.net>
Cc:     netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        Julian Wiedmann <jwi@...ux.ibm.com>,
        "David S . Miller" <davem@...emloft.net>,
        Florian Fainelli <f.fainelli@...il.com>
Subject: Re: [PATCH v2] net: korina: fix return value

On Mon, 14 Dec 2020 23:09:52 +0100 Vincent Stehlé wrote:
> The ndo_start_xmit() method must not attempt to free the skb to transmit
> when returning NETDEV_TX_BUSY. Therefore, make sure the
> korina_send_packet() function returns NETDEV_TX_OK when it frees a packet.
> 
> Fixes: ef11291bcd5f ("Add support the Korina (IDT RC32434) Ethernet MAC")
> Suggested-by: Jakub Kicinski <kuba@...nel.org>
> Signed-off-by: Vincent Stehlé <vincent.stehle@...oste.net>
> Cc: David S. Miller <davem@...emloft.net>
> Cc: Florian Fainelli <florian.fainelli@...ecomint.eu>

Let me CC Florian's more recent email just in case he wants to review.

> Changes since v1:
> - Keep freeing the packet but return NETDEV_TX_OK, as suggested by Jakub
> 
> 
>  drivers/net/ethernet/korina.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/korina.c b/drivers/net/ethernet/korina.c
> index bf48f0ded9c7d..925161959b9ba 100644
> --- a/drivers/net/ethernet/korina.c
> +++ b/drivers/net/ethernet/korina.c
> @@ -219,7 +219,7 @@ static int korina_send_packet(struct sk_buff *skb, struct net_device *dev)
>  			dev_kfree_skb_any(skb);
>  			spin_unlock_irqrestore(&lp->lock, flags);
>  
> -			return NETDEV_TX_BUSY;
> +			return NETDEV_TX_OK;
>  		}
>  	}
>  

Powered by blists - more mailing lists