linux/drivers/net/ethernet/netronome/nfp/flower
Pieter Jansen van Vuuren d309ae5c6a nfp: refuse offloading filters that redirects to upper devices
Previously we did not ensure that a netdev is a representative netdev
before dereferencing its private data. This can occur when an upper netdev
is created on a representative netdev. This patch corrects this by first
ensuring that the netdev is a representative netdev before using it.
Checking only switchdev_port_same_parent_id is not sufficient to ensure
that we can safely use the netdev. Failing to check that the netdev is also
a representative netdev would result in incorrect dereferencing.

Fixes: 1a1e586f54 ("nfp: add basic action capabilities to flower offloads")
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Pieter Jansen van Vuuren <pieter.jansenvanvuuren@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-10-26 10:07:14 +09:00
..
action.c nfp: refuse offloading filters that redirects to upper devices 2017-10-26 10:07:14 +09:00
cmsg.c nfp: flower: restore RTNL locking around representor updates 2017-09-03 21:22:05 -07:00
cmsg.h nfp: process control messages in workqueue in flower app 2017-08-16 11:36:44 -07:00
main.c nfp: flower: base lifetime of representors on existence of lower vNIC 2017-09-03 21:22:05 -07:00
main.h nfp: separate app vNIC init/clean from alloc/free 2017-09-03 21:22:04 -07:00
match.c nfp: remove incorrect mask check for vlan matching 2017-08-28 15:20:24 -07:00
metadata.c nfp: freeing the wrong variable 2017-07-12 08:18:14 -07:00
offload.c nfp: add whitelist of supported flow dissector 2017-09-13 13:29:13 -07:00