Re: [PATCH net 2/2] net: Warn when overriding referenced dst entry

From: Jakub Kicinski
Date: Wed Jul 23 2025 - 11:24:20 EST


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.