[PATCH] sun/niu: fix wrong RXMAC_BC_FRM_CNT_COUNT count

2021-03-05 Thread Denis Efremov
RXMAC_BC_FRM_CNT_COUNT added to mp->rx_bcasts twice in a row in niu_xmac_interrupt(). Remove the second addition. Signed-off-by: Denis Efremov --- I don't know the code of the dirver, but this looks like a real bug. Otherwise, it's more readable as: mp->rx_bcasts += RXMAC_BC_F

[PATCH] net/hamradio/6pack: remove redundant check in sp_encaps()

2021-03-05 Thread Denis Efremov
"len > sp->mtu" checked twice in a row in sp_encaps(). Remove the second check. Signed-off-by: Denis Efremov --- drivers/net/hamradio/6pack.c | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/net/hamradio/6pack.c b/drivers/net/hamradio/6pack.c index 71d6629e65

[PATCH 1/2] net/mlx5e: IPsec: Use kvfree() for memory allocated with kvzalloc()

2020-09-21 Thread Denis Efremov
Variables flow_group_in, spec in rx_fs_create() are allocated with kvzalloc(). It's incorrect to free them with kfree(). Use kvfree() instead. Fixes: 5e466345291a ("net/mlx5e: IPsec: Add IPsec steering in local NIC RX") Signed-off-by: Denis Efremov --- drivers/net/ethernet/mel

[PATCH 2/2] net/mlx5e: Use kfree() to free fd->g in accel_fs_tcp_create_groups()

2020-09-21 Thread Denis Efremov
Memory ft->g in accel_fs_tcp_create_groups() is allocaed with kcalloc(). It's excessive to free ft->g with kvfree(). Use kfree() instead. Signed-off-by: Denis Efremov --- drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH] net: bcmgenet: fix mask check in bcmgenet_validate_flow()

2020-09-02 Thread Denis Efremov
VALIDATE_MASK(eth_mask->h_source) is checked twice in a row in bcmgenet_validate_flow(). Add VALIDATE_MASK(eth_mask->h_dest) instead. Fixes: 3e370952287c ("net: bcmgenet: add support for ethtool rxnfc flows") Cc: sta...@vger.kernel.org Signed-off-by: Denis Efremov --- I'm

Re: sysfs output without newlines

2020-08-29 Thread Denis Efremov
Hi, On 8/29/20 9:23 PM, Joe Perches wrote: > While doing an investigation for a possible treewide conversion of > sysfs output using sprintf/snprintf/scnprintf, I discovered > several instances of sysfs output without terminating newlines. > > It seems likely all of these should have newline term

Re: [PATCH v4 0/3] mm, treewide: Rename kzfree() to kfree_sensitive()

2020-06-17 Thread Denis Efremov
On 6/16/20 9:53 PM, Joe Perches wrote: > On Mon, 2020-06-15 at 21:57 -0400, Waiman Long wrote: >> v4: >> - Break out the memzero_explicit() change as suggested by Dan Carpenter >> so that it can be backported to stable. >> - Drop the "crypto: Remove unnecessary memzero_explicit()" patch

[PATCH] net/mlx5: Use kfree(ft->g) in arfs_create_groups()

2020-06-05 Thread Denis Efremov
Use kfree() instead of kvfree() on ft->g in arfs_create_groups() because the memory is allocated with kcalloc(). Signed-off-by: Denis Efremov --- drivers/net/ethernet/mellanox/mlx5/core/en_arfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mella

[PATCH] cxgb4: Use kfree() instead kvfree() where appropriate

2020-06-05 Thread Denis Efremov
Use kfree(buf) in blocked_fl_read() because the memory is allocated with kzalloc(). Use kfree(t) in blocked_fl_write() because the memory is allocated with kcalloc(). Signed-off-by: Denis Efremov --- drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c | 6 +++--- 1 file changed, 3 insertions

[PATCH] net/mlx5: DR, Fix freeing in dr_create_rc_qp()

2020-06-01 Thread Denis Efremov
Variable "in" in dr_create_rc_qp() is allocated with kvzalloc() and should be freed with kvfree(). Fixes: 297cccebdc5a ("net/mlx5: DR, Expose an internal API to issue RDMA operations") Cc: sta...@vger.kernel.org Signed-off-by: Denis Efremov --- drivers/net/ethernet/mellano