Subject: Re: r8169: Crash with TX segmentation offload on RTL8125

From: Breno Leitao <[email-masked]>
Date: Thu, 18 Jul 2024 13:02:27 -0700

Hello Jakub,

On Wed, May 22, 2024 at 06:55:50AM -0700, Jakub Kicinski wrote:
> On Fri, 17 May 2024 15:21:00 -0700 Florian Fainelli wrote:
> > > The patch below fixes the problem, by simply reading nr_frags a bit later, after the checksum stage.  
> > 
> > Yeah, that's an excellent catch and one that is bitten us before, too:
> > 
> > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=20d1f2d1b024f6be199a3bedf1578a1d21592bc5
> > 
> > unclear what we would do in skb_shinfo() to help driver writers, rather 
> > than rely upon code inspection to find such bugs.
> 
> I wonder if we should add a "error injection" hook under DEBUG_NET
> to force re-allocation of skbs in any helper which may cause it?

Would you mind detailing a bit more how would see see it implemented?

Are you talking about something as the Fault-injection framework
(CONFIG_FAULT_INJECTION) ?

Thanks
--breno