common/mlx5: fix netlink buffer allocation from stack
authorViacheslav Ovsiienko <viacheslavo@mellanox.com>
Thu, 14 May 2020 07:11:12 +0000 (07:11 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 18 May 2020 18:35:57 +0000 (20:35 +0200)
commit3acf1071958185d2a299b9765e0c5c82e67ff416
tree8a2bf562b38dcc0d1ebd9f2d52614eeac17d076f
parente9a8ac59b6e279a29455eade7578b1d953bd5282
common/mlx5: fix netlink buffer allocation from stack

The buffer size to receive netlink reply messages is relatively
large (32K), and it is allocated on the stack and it might
break in application is using smaller per-thread stacks.
This patch allocates temporary buffer from heap.

Fixes: ccdcba53a3f4 ("net/mlx5: use Netlink to add/remove MAC addresses")
Cc: stable@dpdk.org
Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
drivers/common/mlx5/mlx5_nl.c