OpenCloudOS-Kernel/net/switchdev
Jiri Pirko da4ed55165 switchdev: pass pointer to fib_info instead of copy
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 operations and therefore it does
not need copy, just pass the pointer down to drivers as it was done
before.

Fixes: 850d0cbc91 ("switchdev: remove pointers from switchdev objects")
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-05-17 13:58:49 -04:00
..
Kconfig net: switchdev: Drop EXPERIMENTAL from description 2016-05-14 17:06:37 -04:00
Makefile net: introduce generic switch devices support 2014-12-02 20:01:20 -08:00
switchdev.c switchdev: pass pointer to fib_info instead of copy 2016-05-17 13:58:49 -04:00