numam-dpdk/drivers
Hongbo Zheng a3bc973a04 net/hns3: fix crash when closing port
Currently there is a certain probability of segment error in concurrent
reset when the port is closing.
The calltrace info:

This GDB was configured as "aarch64-redhat-linux-gnu".
Reading symbols from /usr/app/testpmd...(no debugging symbols found)...
 done.
[New LWP 98204]
[New LWP 98203]
[New LWP 98206]
[New LWP 98205]
[New LWP 98207]
[New LWP 98208]
Missing separate debuginfo for /root/lib/libnuma.so.1
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `/usr/app/testpmd --log-level=6 --socket-mem 16'.
Program terminated with signal 11, Segmentation fault.
Missing separate debuginfos, use:
 debuginfo-install glibc-2.17-260.el7.aarch64
(gdb) bt
in hns3vf_service_handler ()
1  0x00000000006988b8 in eal_alarm_callback ()
2  0x00000000006969b4 in eal_intr_thread_main ()
3  0x0000ffffb08d6c48 in start_thread () from /lib64/libpthread.so.0
4  0x0000ffffb0828600 in thread_start () from /lib64/libc.so.6
(gdb)

Reset process may turn on the cancelled link state timer whether the
current port status is on or off, in order to solve this problem, this
patch add judge the current network port state before starting the
timer, only the port in the running state can start the link state
timer, so as to solve the problem that the link state timer accesses the
null pointer and causes the segment error.

Fixes: 2790c64647 ("net/hns3: support device reset")
Cc: stable@dpdk.org

Signed-off-by: Hongbo Zheng <zhenghongbo3@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
2020-01-17 19:46:26 +01:00
..
baseband build: align symbols with global ABI version 2019-11-20 23:05:39 +01:00
bus bus/fslmc: remove conflicting memory barrier macro 2020-01-17 12:02:15 +01:00
common net/iavf/base: move to drivers common directory 2020-01-17 19:46:02 +01:00
compress crypto/qat: add minimum enqueue threshold 2020-01-15 16:45:04 +01:00
crypto crypto/qat: support Chacha Poly 2020-01-16 17:10:36 +01:00
event event/opdl: use new API to save cycles on aarch64 2020-01-17 12:02:21 +01:00
mempool drivers: update copyright for NXP files 2019-11-28 16:03:54 +01:00
net net/hns3: fix crash when closing port 2020-01-17 19:46:26 +01:00
raw net/ipn3ke: fix meson build 2020-01-17 19:45:23 +01:00
vdpa drivers: move ifc to vDPA directory 2020-01-14 00:09:33 +01:00
Makefile drivers: introduce vDPA class 2020-01-13 23:28:00 +01:00
meson.build net/ipn3ke: fix meson build 2020-01-17 19:45:23 +01:00