“fd35fbcdd1b2579a6e00a1545f7124e4005d0474”上不存在“arch/x86/include/asm/fpu-internal.h”
提交 7bb91c7f 编写于 作者: D Di Zhu 提交者: Zheng Zengkai

pktgen: fix misuse of BUG_ON() in pktgen_thread_worker()

stable inclusion
from stable-5.10.21
commit aee0cc0d7a3476dbb8e90591726d8362ff2cc0ba
bugzilla: 50609

--------------------------------

[ Upstream commit 275b1e88 ]

pktgen create threads for all online cpus and bond these threads to
relevant cpu repecivtily. when this thread firstly be woken up, it
will compare cpu currently running with the cpu specified at the time
of creation and if the two cpus are not equal, BUG_ON() will take effect
causing panic on the system.
Notice that these threads could be migrated to other cpus before start
running because of the cpu hotplug after these threads have created. so the
BUG_ON() used here seems unreasonable and we can replace it with WARN_ON()
to just printf a warning other than panic the system.
Signed-off-by: NDi Zhu <zhudi21@huawei.com>
Link: https://lore.kernel.org/r/20210125124229.19334-1-zhudi21@huawei.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 f9393f04
...@@ -3464,7 +3464,7 @@ static int pktgen_thread_worker(void *arg) ...@@ -3464,7 +3464,7 @@ static int pktgen_thread_worker(void *arg)
struct pktgen_dev *pkt_dev = NULL; struct pktgen_dev *pkt_dev = NULL;
int cpu = t->cpu; int cpu = t->cpu;
BUG_ON(smp_processor_id() != cpu); WARN_ON(smp_processor_id() != cpu);
init_waitqueue_head(&t->queue); init_waitqueue_head(&t->queue);
complete(&t->start_done); complete(&t->start_done);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册