net/mlx5: fix crash in Rx
authorNélio Laranjeiro <nelio.laranjeiro@6wind.com>
Fri, 8 Jul 2016 12:43:26 +0000 (14:43 +0200)
committerBruce Richardson <bruce.richardson@intel.com>
Fri, 8 Jul 2016 20:51:10 +0000 (22:51 +0200)
commita1bdb71a32da35968e2b70897fd7c381bf3d3a32
treec3aceb42728d393a4eec062c2626ba6164ed8ada
parent0ac64846254aa2ca12de1aaa1ccc292a75181af6
net/mlx5: fix crash in Rx

Fixed issue could occur when Mbuf starvation happens in a middle of
reception of a segmented packet. In such a situation, the PMD has to
release all segments of that packet.  The end condition was wrong
causing it to free an Mbuf still handled by the NIC.

Fixes: 9964b965ad69 ("net/mlx5: re-add Rx scatter support")

Reported-by: Yongseok Koh <yskoh@mellanox.com>
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
drivers/net/mlx5/mlx5_rxtx.c