diff options
author | Artem Belov <artem.belov@xored.com> | 2019-04-18 07:30:43 +0000 |
---|---|---|
committer | Ed Warnicke <hagbard@gmail.com> | 2019-04-18 14:38:37 +0000 |
commit | 8011ba5869a64ff9244c8340ccf71896ff2ecd93 (patch) | |
tree | d89c4d8bba4753454238760db034f6ec784940ca /src/vlib/unix/input.c | |
parent | e57ae7a0f901e64e6e37db0932816785d03fea7c (diff) |
Fix memory corruption faulting [VPP-1639]
File pool may be reallocated on epoll events processing.
*f* pointer shows to already freed address and corrupting
memory chunk on clib_file_t property change.
Change-Id: I751bddce27325452862b939c1a3eec2ccd9b71bb
Signed-off-by: Artem Belov <artem.belov@xored.com>
Signed-off-by: Ed Warnicke <hagbard@gmail.com>
Diffstat (limited to 'src/vlib/unix/input.c')
-rw-r--r-- | src/vlib/unix/input.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/vlib/unix/input.c b/src/vlib/unix/input.c index 6b519e5ce95..0edc4e4123f 100644 --- a/src/vlib/unix/input.c +++ b/src/vlib/unix/input.c @@ -285,14 +285,14 @@ linux_epoll_input_inline (vlib_main_t * vm, vlib_node_runtime_t * node, { if (e->events & EPOLLIN) { - errors[n_errors] = f->read_function (f); f->read_events++; + errors[n_errors] = f->read_function (f); n_errors += errors[n_errors] != 0; } if (e->events & EPOLLOUT) { - errors[n_errors] = f->write_function (f); f->write_events++; + errors[n_errors] = f->write_function (f); n_errors += errors[n_errors] != 0; } } @@ -300,8 +300,8 @@ linux_epoll_input_inline (vlib_main_t * vm, vlib_node_runtime_t * node, { if (f->error_function) { - errors[n_errors] = f->error_function (f); f->error_events++; + errors[n_errors] = f->error_function (f); n_errors += errors[n_errors] != 0; } else |