diff options
author | Steven Luong <sluong@cisco.com> | 2021-09-14 07:07:17 -0700 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2021-09-17 14:57:33 +0000 |
commit | d26a582759a0e5cf36375479727c5d97ea4147ec (patch) | |
tree | 7713c1631f3729d2ca6f1485e2bec3090a5c6fcf /src/plugins/vmxnet3/input.c | |
parent | 91db3538c923063f9ddc8e7bde8c8481372fe14a (diff) |
memif: avoid double pool_put on a clib_file
When memif CP processes the socket connection error, it may go through
the following code paths which may eventually cause double pool_put on a
clib_file
memif_master_conn_fd_error:633 -> memif_disconnect ->
memif_socket_close -> memif_file_del_by_index ->
clib_file_del_by_index -> clib_file_del -> pool_put
After memif_master_conn_fd_error:633, the code continues on
memif_maser_conn_fd_error:651 -> memif_file_del -> clib_file_del ->
pool_put
The fix is to skip calling memif_file_del in
memif_master_conn_fd_error:651 if uf->file_descriptor == ~0 to catch
problem from all possible paths in memif_master_conn_fd_error
Type: fix
Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: I0960998db1ff358a8ddd4a5e22188a244eccd270
Diffstat (limited to 'src/plugins/vmxnet3/input.c')
0 files changed, 0 insertions, 0 deletions