Re: WARNING in sk_stream_kill_queues (5)

Marco Elver
2021-01-11T08:56:07Z

On Mon, 14 Dec 2020 at 11:47, Eric Dumazet <edumazet@google.com> wrote:
> On Mon, Dec 14, 2020 at 11:09 AM Marco Elver <elver@google.com> wrote:
> > On Thu, 10 Dec 2020 at 20:01, Marco Elver <elver@google.com> wrote:
> > > On Thu, 10 Dec 2020 at 18:14, Eric Dumazet <edumazet@google.com> wrote:
> > > > On Thu, Dec 10, 2020 at 5:51 PM Marco Elver <elver@google.com> wrote:
[...]
> > > Either option is fine, as long as it avoids this problem in future.
> > > Hopefully it can be fixed for 5.11.
> > >
> > > > (All TCP skbs in output path have the same allocation size for skb->head)
> > > >
> > > > diff --git a/net/core/skbuff.c b/net/core/skbuff.c
> > > > index e578544b2cc7110ec2f6bcf4c29d93e4b4b1ad14..798b51eeeaa4fbed65d41d9eab207dbbf438dab3
> > > > 100644
> > > > --- a/net/core/skbuff.c
> > > > +++ b/net/core/skbuff.c
> > > > @@ -3270,7 +3270,14 @@ EXPORT_SYMBOL(skb_split);
> > > > */
> > > > static int skb_prepare_for_shift(struct sk_buff *skb)
> > > > {
> > > > - return skb_cloned(skb) && pskb_expand_head(skb, 0, 0, GFP_ATOMIC);
> > > > + unsigned int ret = 0, save;
> > > > +
> > > > + if (skb_cloned(skb)) {
> > > > + save = skb->truesize;
> > > > + ret = pskb_expand_head(skb, 0, 0, GFP_ATOMIC);
> > > > + skb->truesize = save;
> > > > + }
> > > > + return ret;
> > > > }
> > >
> > > FWIW,
> > >
> > > Tested-by: Marco Elver <elver@google.com>
> >
> > Has this patch, or similar, already been sent?
>
>
> Not yet, we have few weeks left before 5.11 is released ;)

Ping. Though KFENCE has been dropped from 5.11, just a reminder so we
get this fixed for 5.12.

Thanks,
-- Marco