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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250613075507.2b857743@kernel.org>
Date: Fri, 13 Jun 2025 07:55:07 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Breno Leitao <leitao@...ian.org>
Cc: Andrew Lunn <andrew+netdev@...n.ch>, "David S. Miller"
 <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Paolo Abeni
 <pabeni@...hat.com>, David Wei <dw@...idwei.uk>, Shuah Khan
 <shuah@...nel.org>, Simon Horman <horms@...nel.org>, joe@...a.to,
 netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
 linux-kselftest@...r.kernel.org, kernel-team@...a.com
Subject: Re: [PATCH net-next v2 4/4] netdevsim: account dropped packet
 length in stats on queue free

On Fri, 13 Jun 2025 07:47:11 -0700 Breno Leitao wrote:
> >  static void nsim_queue_free(struct nsim_rq *rq)
> >  {
> > +	struct net_device *dev = rq->napi.dev;
> > +
> >  	hrtimer_cancel(&rq->napi_timer);
> > +	dev_dstats_rx_dropped_add(dev, rq->skb_queue.qlen);  
> 
> This is wrong and it will cause the kernel to crash in some cases, given
> we can get here with dev == NULL, in the following path:

It's probably because NAPI wasn't registered yet in some paths.
You can pass dev in from the callers, it always exists, and all 
callers have it.
-- 
pw-bot: cr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ