[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1423161437.31870.88.camel@edumazet-glaptop2.roam.corp.google.com>
Date: Thu, 05 Feb 2015 10:37:17 -0800
From: Eric Dumazet <eric.dumazet@...il.com>
To: Pravin B Shelar <pshelar@...ira.com>
Cc: netdev@...r.kernel.org, ogerlitz@...lanox.com,
Joe Stringer <joestringer@...ira.com>
Subject: Re: [PATCH net-next] openvswitch: Initialize unmasked key and uid
len
On Thu, 2015-02-05 at 09:56 -0800, Pravin B Shelar wrote:
> Flow alloc needs to initialize unmasked key pointer. Otherwise
> it can crash kernel trying to free random unmasked-key pointer.
> CC: Joe Stringer <joestringer@...ira.com>
> Reported-by: Or Gerlitz <ogerlitz@...lanox.com>
> Signed-off-by: Pravin B Shelar <pshelar@...ira.com>
> ---
> net/openvswitch/flow_table.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/net/openvswitch/flow_table.c b/net/openvswitch/flow_table.c
> index 5e57628..d58447d 100644
> --- a/net/openvswitch/flow_table.c
> +++ b/net/openvswitch/flow_table.c
> @@ -85,6 +85,8 @@ struct sw_flow *ovs_flow_alloc(void)
>
> flow->sf_acts = NULL;
> flow->mask = NULL;
> + flow->id.unmasked_key = NULL;
> + flow->id.ufid_len = 0;
> flow->stats_last_writer = NUMA_NO_NODE;
At this stage, one has to wonder why not using kmem_cache_zalloc()
and reduce icache pressure right ?
And please please add :
Fixes: e64457191a259 ("openvswitch: Restructure datapath.c and flow.c")
or whatever commit was the bug origin.
Thanks
--
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