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  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250911170815.006b3a31@kernel.org>
Date: Thu, 11 Sep 2025 17:08:15 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Yeounsu Moon <yyyynoom@...il.com>
Cc: Andrew Lunn <andrew+netdev@...n.ch>, "David S. Miller"
 <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Paolo Abeni
 <pabeni@...hat.com>, netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next] net: dlink: count dropped packets on skb
 allocation failure

On Wed, 10 Sep 2025 14:48:37 +0900 Yeounsu Moon wrote:
> Track dropped packet statistics when skb allocation fails
> in the receive path.

I'm not sure that failing to allocate a buffer results in dropping
one packet in this driver. The statistics have specific meaning, if
you're just trying to use dropped to mean "buffer allocation failures"
that's not allowed. If I'm misreading the code please explain in more
detail in the commit message and repost.

> diff --git a/drivers/net/ethernet/dlink/dl2k.c b/drivers/net/ethernet/dlink/dl2k.c
> index 6bbf6e5584e5..47d9eef2e725 100644
> --- a/drivers/net/ethernet/dlink/dl2k.c
> +++ b/drivers/net/ethernet/dlink/dl2k.c
> @@ -1009,6 +1009,7 @@ receive_packet (struct net_device *dev)
>  			skb = netdev_alloc_skb_ip_align(dev, np->rx_buf_sz);
>  			if (skb == NULL) {
>  				np->rx_ring[entry].fraginfo = 0;
> +				dev->stats.rx_dropped++;
>  				printk (KERN_INFO
>  					"%s: receive_packet: "
>  					"Unable to re-allocate Rx skbuff.#%d\n",

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ