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] [day] [month] [year] [list]
Date:   Sun, 17 Apr 2022 15:41:40 -0700
From:   Eric Dumazet <edumazet@...gle.com>
To:     Cong Wang <xiyou.wangcong@...il.com>
Cc:     Eric Dumazet <eric.dumazet@...il.com>,
        "David S . Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Jamal Hadi Salim <jhs@...atatu.com>,
        Jiri Pirko <jiri@...nulli.us>, netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next] net_sched: make qdisc_reset() smaller

On Sun, Apr 17, 2022 at 3:30 PM Cong Wang <xiyou.wangcong@...il.com> wrote:
>
> On Wed, Apr 13, 2022 at 6:11 PM Eric Dumazet <eric.dumazet@...il.com> wrote:
> >
> > From: Eric Dumazet <edumazet@...gle.com>
> >
> > For some unknown reason qdisc_reset() is using
> > a convoluted way of freeing two lists of skbs.
> >
> > Use __skb_queue_purge() instead.
> [...]
> >
> > -       skb_queue_walk_safe(&qdisc->gso_skb, skb, tmp) {
> > -               __skb_unlink(skb, &qdisc->gso_skb);
> > -               kfree_skb_list(skb);
>
> Isn't it precisely because of this kfree_skb_list()?

Note the __skb_unlink(skb, &qdisc->gso_skb) which happens at the line above.

__skb_unlink(...)
{
...
skb->next  = skb->prev = NULL;
...
}

This means skb->next is NULL, thus there is no list of skb attached to @skb ?

kfree_skb_list(skb) is thus a convoluted way to call kfree_skb(skb)

It seems to me that this construct had been copy/pasted from elsewhere.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ