]> git.droids-corp.org - dpdk.git/commit
net/failsafe: fix device freeing
authorYunjian Wang <wangyunjian@huawei.com>
Tue, 7 Jun 2022 06:50:49 +0000 (14:50 +0800)
committerAndrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Wed, 8 Jun 2022 12:38:44 +0000 (14:38 +0200)
commitfd819cad0a266421ca9872570e923c2a7ae68183
treeebf80b6c55648c182b094e14789f21fe3d4f3170
parent68629be3a622ee53cd5b40c8447ae9b083ff3f6c
net/failsafe: fix device freeing

The PMD destroy function was calling the release function, which frees
dev->data->dev_private, and then tries to free PRIV(dev)->intr_handle,
which causes the heap use after free issue.

The free can be moved to before the release function is called.

Fixes: d61138d4f0e ("drivers: remove direct access to interrupt handle")
Cc: stable@dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
drivers/net/failsafe/failsafe.c