summaryrefslogtreecommitdiffstats
path: root/src/plugins/memif/cli.c
diff options
context:
space:
mode:
authorSteven <sluong@cisco.com>2017-09-30 10:50:20 -0700
committerDamjan Marion <dmarion.lists@gmail.com>2017-10-04 09:46:26 +0000
commit9fefa9a697daf0e949ea7a2700ecaf2ba4d1d2cb (patch)
tree578ab9118d7094dc6f223159dabad79e5bad46ab /src/plugins/memif/cli.c
parent62549fec3bb3b466fbca91e995a5dc6e77fe4ce1 (diff)
memif: crash on slave mode
Crash was seen on recent image with this BT on top of the stack (gdb) bt full (mif=0x7fffb6226568) at /vpp/build-data/../src/plugins/memif/memif.c:297 ring = 0x0 <<<<<<<<<< i = 0 j = 0 buffer_offset = 65792 r = 0x7fffb5e59f80 alloc = {flags = 1, name = 0x7fffb449f965 "memif region", size = 4260096, numa_node = 0, addr = 0x7fff41dac000, fd = 11, log2_page_size = 12, n_pages = 1041} err = 0x0 __FUNCTION__ = "memif_init_regions_and_queues" The crash happened at this line. ring = memif_get_ring (mif, MEMIF_RING_S2M, i); ring=>head = ring->tail = 0; <===== Please note that the crash is caused by dereferencing NULL rinng. Put breakpoint into the function. I notice that mif->regions[0].shm is not initialized. (gdb) p mif->regions[0].shm $8 = (void *) 0x0 It looks like we forgot to set shm after clib_mem_vm_ext_alloc(). Add the missing cide and the crash is fixed. Change-Id: Ib722a6c241c77acfa8e33962106b57faa50e1ea7 Signed-off-by: Steven <sluong@cisco.com>
Diffstat (limited to 'src/plugins/memif/cli.c')
0 files changed, 0 insertions, 0 deletions