[PATCH v2] net: korina: fix return value

2020-12-14 Thread Vincent Stehlé
-by: Jakub Kicinski Signed-off-by: Vincent Stehlé Cc: David S. Miller Cc: Florian Fainelli --- 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/d

Re: [PATCH] net: korina: remove busy skb free

2020-12-14 Thread Vincent Stehlé
On Mon, Dec 14, 2020 at 01:08:32PM -0800, Jakub Kicinski wrote: > On Mon, 14 Dec 2020 11:03:12 +0100 Julian Wiedmann wrote: > > > diff --git a/drivers/net/ethernet/korina.c b/drivers/net/ethernet/korina.c > > > index bf48f0ded9c7d..9d84191de6824 100644 > > > --- a/drivers/net/ethernet/korina.c > >

Re: [PATCH] net: korina: remove busy skb free

2020-12-14 Thread Vincent Stehlé
On Mon, Dec 14, 2020 at 11:03:12AM +0100, Julian Wiedmann wrote: > On 13.12.20 18:20, Vincent Stehlé wrote: ... > > @@ -216,7 +216,6 @@ static int korina_send_packet(struct sk_buff *skb, > > struct net_device *dev) > > netif_stop_queue(dev);

[PATCH] net: korina: remove busy skb free

2020-12-13 Thread Vincent Stehlé
The ndo_start_xmit() method must not attempt to free the skb to transmit when returning NETDEV_TX_BUSY. Fix the korina_send_packet() function accordingly. Fixes: ef11291bcd5f ("Add support the Korina (IDT RC32434) Ethernet MAC") Signed-off-by: Vincent Stehlé Cc: David S. Miller

[PATCH] net: ethernet: mtk-star-emac: return ok when xmit drops

2020-11-12 Thread Vincent Stehlé
The ndo_start_xmit() method must return NETDEV_TX_OK if the DMA mapping fails, after freeing the socket buffer. Fix the mtk_star_netdev_start_xmit() function accordingly. Fixes: 8c7bd5a454ff ("net: ethernet: mtk-star-emac: new driver") Signed-off-by: Vincent Stehlé Cc: David S.

[PATCH] net: thunderx: avoid dereferencing xcv when NULL

2017-01-30 Thread Vincent Stehlé
NULL but dereferenced. [coccinelle] Fixes: 6465859aba1e66a5 ("net: thunderx: Add RGMII interface type support") Signed-off-by: Vincent Stehlé Cc: Sunil Goutham --- drivers/net/ethernet/cavium/thunder/thunder_xcv.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers

[PATCH] mlxsw: spectrum_router: Fix use after free

2016-08-14 Thread Vincent Stehlé
In mlxsw_sp_router_fib4_add_info_destroy(), the fib_entry pointer is used after it has been freed by mlxsw_sp_fib_entry_destroy(). Use a temporary variable to fix this. Fixes: 61c503f976b5449e ("mlxsw: spectrum_router: Implement fib4 add/del switchdev obj ops") Signed-off-by: Vincent

[PATCH] nfc: netlink: avoid NULL pointer dereference on error

2015-10-07 Thread Vincent Stehlé
The function nfc_genl_llc_sdreq() can dereference the dev pointer while it is NULL on its error path. Create a new error handling label to avoid that. This fixes the following coccinelle error: ./net/nfc/netlink.c:1175:21-24: ERROR: dev is NULL but dereferenced. Signed-off-by: Vincent Stehlé