Re: [patch net] switchdev: pass pointer to fib_info instead of copy

2016-05-17 Thread David Miller
From: Jiri Pirko Date: Tue, 17 May 2016 18:58:08 +0200 > From: Jiri Pirko > > The problem is that fib_info->nh is [0] so the struct fib_info > allocation size depends on number of nexthops. If we just copy fib_info, > we do not copy the nexthops info and

[patch net] switchdev: pass pointer to fib_info instead of copy

2016-05-17 Thread Jiri Pirko
From: Jiri Pirko The problem is that fib_info->nh is [0] so the struct fib_info allocation size depends on number of nexthops. If we just copy fib_info, we do not copy the nexthops info and driver accesses memory which is not ours. Given the fact that fib4 does not defer