Message ID | 1464865456-29702-2-git-send-email-yi.he@linaro.org |
---|---|
State | Accepted |
Commit | e215a34ff64dcb26a7d071bf9eeb7516d20e6fda |
Headers | show |
diff --git a/platform/linux-generic/pktio/ipc.c b/platform/linux-generic/pktio/ipc.c index 8508824..e11da86 100644 --- a/platform/linux-generic/pktio/ipc.c +++ b/platform/linux-generic/pktio/ipc.c @@ -737,10 +737,16 @@ static int ipc_close(pktio_entry_t *pktio_entry) return 0; } +static int ipc_pktio_init_global(void) +{ + _ring_tailq_init(); + return 0; +} + const pktio_if_ops_t ipc_pktio_ops = { .name = "ipc", .print = NULL, - .init_global = NULL, + .init_global = ipc_pktio_init_global, .init_local = NULL, .term = NULL, .open = ipc_pktio_open,
Fix the uninitialized Q and RW lock which may cause occasional segmentation fault in _ring_create() etc. Signed-off-by: Yi He <yi.he@linaro.org> --- platform/linux-generic/pktio/ipc.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)