[lvc-project] [PATCH] dl2k: Fix potential NULL pointer dereference in receive_packet()

Jakub Kicinski kuba at kernel.org
Thu Feb 15 04:02:03 MSK 2024


On Tue, 13 Feb 2024 23:09:00 +0300 Rand Deeb wrote:
> +			if (skb == NULL) {

if (!skb) is more common

> +				np->rx_ring[entry].fraginfo = 0;
> +				printk (KERN_INFO
> +				       "%s: receive_packet: "
> +				       "Unable to re-allocate Rx skbuff.#%d\n",
> +				       dev->name, entry);

no prints on allocation failure, please, there logs will include OOM
splats already. A counter as suggested by Jake would be better.
-- 
pw-bot: cr



More information about the lvc-project mailing list