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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAM_iQpUJJ02hSkTfw328D8QW_4iuWcZode0JGpguecx5GUf5Jw@mail.gmail.com>
Date:	Sun, 27 Jul 2014 12:15:12 -0700
From:	Cong Wang <xiyou.wangcong@...il.com>
To:	John Fastabend <john.fastabend@...il.com>
Cc:	Jamal Hadi Salim <jhs@...atatu.com>,
	Eric Dumazet <eric.dumazet@...il.com>,
	Linux Kernel Network Developers <netdev@...r.kernel.org>,
	Paul McKenney <paulmck@...ux.vnet.ibm.com>, brouer@...hat.com
Subject: Re: [net-next PATCH v1 08/15] net: sched: RCU cls_tcindex

On Fri, Jul 25, 2014 at 9:29 PM, John Fastabend
<john.fastabend@...il.com> wrote:
> +
> +       if (p->perfect) {
> +               cp->perfect = kcalloc(cp->hash, sizeof(*r), GFP_KERNEL);
> +               memcpy(cp->perfect, p->perfect, sizeof(*r) * cp->hash);
> +       }

a) You forget to check the return value of kcalloc()
b) You can use kmemdup()
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ