[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CALnjE+rQALWbr+a0+d9r0RbD17Z0HYa-esYJjce=AWmXDZdESQ@mail.gmail.com>
Date: Fri, 6 Feb 2015 10:21:37 -0800
From: Pravin Shelar <pshelar@...ira.com>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: netdev <netdev@...r.kernel.org>,
Or Gerlitz <ogerlitz@...lanox.com>,
Joe Stringer <joestringer@...ira.com>
Subject: Re: [PATCH net-next] openvswitch: Initialize unmasked key and uid len
On Thu, Feb 5, 2015 at 10:37 AM, Eric Dumazet <eric.dumazet@...il.com> wrote:
> 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 ?
>
struct flow is still big struct, about 536 bytes. Most of the struct
is still not cleared. I do not want to clear it then initialize it
again. This helps in OVS flow setup performance.
> And please please add :
>
> Fixes: e64457191a259 ("openvswitch: Restructure datapath.c and flow.c")
>
> or whatever commit was the bug origin.
>
ok, I will send updated patch.
> 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