[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240330002732.3029-1-hdanton@sina.com>
Date: Sat, 30 Mar 2024 08:27:32 +0800
From: Hillf Danton <hdanton@...a.com>
To: syzbot <syzbot+1fa663a2100308ab6eab@...kaller.appspotmail.com>
Cc: linux-kernel@...r.kernel.org,
syzkaller-bugs@...glegroups.com
Subject: Re: [syzbot] [bpf?] possible deadlock in kvfree_call_rcu
On Wed, 27 Mar 2024 16:27:19 -0700
> syzbot has found a reproducer for the following issue on:
>
> HEAD commit: 443574b03387 riscv, bpf: Fix kfunc parameters incompatibil..
> git tree: bpf
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=16ca53c9180000
#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git fe46a7dd189e
--- x/kernel/rcu/tree.c
+++ y/kernel/rcu/tree.c
@@ -5149,6 +5149,8 @@ static void __init rcu_dump_rcu_node_tre
struct workqueue_struct *rcu_gp_wq;
+static DEFINE_PER_CPU(struct lock_class_key, krc_lock_key);
+
static void __init kfree_rcu_batch_init(void)
{
int cpu;
@@ -5169,6 +5171,11 @@ static void __init kfree_rcu_batch_init(
for_each_possible_cpu(cpu) {
struct kfree_rcu_cpu *krcp = per_cpu_ptr(&krc, cpu);
+ struct lock_class_key *key = per_cpu_ptr(&krc_lock_key, cpu);
+ char name[32] = {0};
+
+ sprintf(name, "krc%d", cpu);
+ lockdep_set_class_and_name(&krcp->lock, key, name);
for (i = 0; i < KFREE_N_BATCHES; i++) {
INIT_RCU_WORK(&krcp->krw_arr[i].rcu_work, kfree_rcu_work);
--
Powered by blists - more mailing lists