ipc: fix use-after-free in asynchronous requests
authorAnatoly Burakov <anatoly.burakov@intel.com>
Fri, 13 Apr 2018 11:55:00 +0000 (12:55 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Mon, 16 Apr 2018 23:27:27 +0000 (01:27 +0200)
commit35ae44d1e25e2c3556956e2bc78a0e1c63cc9a11
tree4e7d6217e970a810cb88fd4cbfbc61126a42c42c
parentfe98e52a52f0989c299883bf7c231b64ae1cd242
ipc: fix use-after-free in asynchronous requests

Previously, we were removing request from the list only if we
have succeeded to send it. This resulted in leaving an invalid
pointer in the request list.

Fix this by only adding new requests to the request list if we
have succeeded in sending them.

Fixes: f05e26051c15 ("eal: add IPC asynchronous request")

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Jianfeng Tan <jianfeng.tan@intel.com>
lib/librte_eal/common/eal_common_proc.c