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:	Thu, 05 Mar 2015 17:26:13 +0300
From:	Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To:	Cong Wang <xiyou.wangcong@...il.com>, netdev@...r.kernel.org
CC:	Jamal Hadi Salim <jhs@...atatu.com>
Subject: Re: [Patch net-next] net_sched: move tp->root allocation into route4_init()

Hello.

On 3/5/2015 7:11 AM, Cong Wang wrote:

> Cc: Jamal Hadi Salim <jhs@...atatu.com>
> Signed-off-by: Cong Wang <xiyou.wangcong@...il.com>
> ---
>   net/sched/cls_route.c | 14 +++++++-------
>   1 file changed, 7 insertions(+), 7 deletions(-)

> diff --git a/net/sched/cls_route.c b/net/sched/cls_route.c
> index 2ecd246..bb8a602 100644
> --- a/net/sched/cls_route.c
> +++ b/net/sched/cls_route.c
> @@ -258,6 +258,13 @@ static unsigned long route4_get(struct tcf_proto *tp, u32 handle)
>
>   static int route4_init(struct tcf_proto *tp)
>   {
> +	struct route4_head *head;
> +
> +	head = kzalloc(sizeof(struct route4_head), GFP_KERNEL);

    Hm, checkpatch.pl should have suggested using sizeof(*head) instead...

> +	if (head == NULL)

    And using !head instead.

> +		return -ENOBUFS;
> +
> +	rcu_assign_pointer(tp->root, head);
>   	return 0;
>   }

WBR, Sergei

--
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