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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 12 Jun 2016 20:45:11 -0700
From:	Cong Wang <xiyou.wangcong@...il.com>
To:	Eric Dumazet <eric.dumazet@...il.com>
Cc:	David Miller <davem@...emloft.net>, netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH net] net_sched: prio: properly report out of memory errors

On Sun, Jun 12, 2016 at 4:21 PM, Eric Dumazet <eric.dumazet@...il.com> wrote:
> +               struct Qdisc *child;
> +
> +               if (q->queues[i] != &noop_qdisc)
> +                       continue;
> +
> +               child = qdisc_create_dflt(sch->dev_queue, &pfifo_qdisc_ops,
> +                                         TC_H_MAKE(sch->handle, i + 1));
> +               if (!child)
> +                       return -ENOMEM;

Since this is inside a loop, shouldn't we kfree the previous child
creations when we fail?



> +               sch_tree_lock(sch);
> +               q->queues[i] = child;
> +               sch_tree_unlock(sch);
>         }
>         return 0;
>  }
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ