linux/drivers/net/ethernet/netronome/nfp
Jakub Kicinski 1691a4c0f4 nfp: avoid buffer leak when representor is missing
When driver receives a muxed frame, but it can't find the representor
netdev it is destined to it will try to "drop" that frame, i.e. reuse
the buffer.  The issue is that the replacement buffer has already been
allocated at this point, and reusing the buffer from received frame
will leak it.  Change the code to put the new buffer on the ring
earlier and not reuse the old buffer (make the buffer parameter
to nfp_net_rx_drop() a NULL).

Fixes: 91bf82ca9e ("nfp: add support for tx/rx with metadata portid")
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-08-23 20:39:44 -07:00
..
bpf nfp: move basic eBPF stats to app-specific code 2017-05-31 17:58:13 -04:00
flower nfp: do not update MTU from BH in flower app 2017-08-11 14:50:09 -07:00
nfpcore nfp: remove unused nfp_cpp_area_check_range() 2017-06-27 15:48:47 -04:00
nic nfp: report app name in ethtool -i 2017-05-31 17:58:13 -04:00
Makefile nfp: add metadata to each flow offload 2017-07-01 08:51:32 -07:00
nfp_app_nic.c nfp: remove legacy MAC address lookup 2017-07-05 09:13:07 +01:00
nfp_app.c nfp: flower: add Kconfig for flower app 2017-06-27 15:48:50 -04:00
nfp_app.h nfp: move representors' struct net_device_ops to shared code 2017-06-27 15:48:48 -04:00
nfp_asm.h nfp: move eBPF offload files to BPF app directory 2017-05-31 17:58:13 -04:00
nfp_devlink.c nfp: devlink add support for getting eswitch mode 2017-06-25 11:42:01 -04:00
nfp_hwmon.c nfp: add hwmon support 2017-05-30 11:27:06 -04:00
nfp_main.c nfp: don't hold PF lock while enabling SR-IOV 2017-08-23 20:39:44 -07:00
nfp_main.h nfp: remove legacy MAC address lookup 2017-07-05 09:13:07 +01:00
nfp_net_common.c nfp: avoid buffer leak when representor is missing 2017-08-23 20:39:44 -07:00
nfp_net_ctrl.h nfp: add VLAN filtering support 2017-06-19 00:11:49 -04:00
nfp_net_debugfs.c nfp: make sure debug accesses don't depend on netdevs 2017-06-07 12:51:39 -04:00
nfp_net_ethtool.c nfp: report application FW build name in ethtool -i 2017-06-09 12:52:09 -04:00
nfp_net_main.c nfp: make sure representors are destroyed before their lower netdev 2017-08-23 20:39:44 -07:00
nfp_net_repr.c nfp: provide infrastructure for offloading flower based TC filters 2017-07-01 08:51:32 -07:00
nfp_net_repr.h nfp: extend flower matching capabilities 2017-07-01 08:51:32 -07:00
nfp_net.h nfp: add support for tx/rx with metadata portid 2017-06-25 11:42:01 -04:00
nfp_netvf_main.c nfp: advertise support for NFD ABI 0.5 2017-06-07 12:51:42 -04:00
nfp_port.c nfp: improve order of interfaces in breakout mode 2017-07-05 09:13:07 +01:00
nfp_port.h nfp: provide infrastructure for offloading flower based TC filters 2017-07-01 08:51:32 -07:00