Re: [PATCH net 2/2] net: Warn when overriding referenced dst entry
From: Stanislav Fomichev
Date: Wed Jul 23 2025 - 11:30:25 EST
On 07/23, Jakub Kicinski wrote:
> On Wed, 23 Jul 2025 08:13:25 -0700 Stanislav Fomichev wrote:
> > > > +{
> > > > + DEBUG_NET_WARN_ON_ONCE(skb_dst(skb) &&
> > > > + !(skb->_skb_refdst & SKB_DST_NOREF));
> > >
> > > Why not
> > >
> > > DEBUG_NET_WARN_ON_ONCE(skb->_skb_refdst & SKB_DST_PTRMASK);
> > >
> > > ?
> >
> > That's more precise, agreed!
>
> Just to be clear -- looks like I ate the
>
> !(skb->_skb_refdst & SKB_DST_NOREF)
>
> part part of the condition. I think we still want that.
Ah, so you only want to get rid of those WARN_ONs in skb_dst, makes
sense.