lkml.org 
[lkml]   [2024]   [Feb]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] dl2k: Fix potential NULL pointer dereference in receive_packet()
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

\
 
 \ /
  Last update: 2024-05-27 15:04    [W:1.302 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site