From: Edward Adam Davis <eadavis@qq.com>
To: syzbot+c4f4d25859c2e5859988@syzkaller.appspotmail.com
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [bpf?] [net?] possible deadlock in rcu_report_exp_cpu_mult
Date: Thu, 21 Mar 2024 08:25:21 +0800 [thread overview]
Message-ID: <tencent_C086D8D2CB0650C9932EECAECC0CBFE7EB06@qq.com> (raw)
In-Reply-To: <000000000000dc9aca0613ec855c@google.com>
please test dl in rcu_report_exp_cpu_mult
#syz test https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git master
diff --git a/net/core/sock_map.c b/net/core/sock_map.c
index 27d733c0f65e..8a21a59eb599 100644
--- a/net/core/sock_map.c
+++ b/net/core/sock_map.c
@@ -932,11 +932,12 @@ static long sock_hash_delete_elem(struct bpf_map *map, void *key)
struct bpf_shtab_bucket *bucket;
struct bpf_shtab_elem *elem;
int ret = -ENOENT;
+ unsigned long flags;
hash = sock_hash_bucket_hash(key, key_size);
bucket = sock_hash_select_bucket(htab, hash);
- spin_lock_bh(&bucket->lock);
+ spin_lock_irqsave(&bucket->lock, flags);
elem = sock_hash_lookup_elem_raw(&bucket->head, hash, key, key_size);
if (elem) {
hlist_del_rcu(&elem->node);
@@ -944,7 +945,7 @@ static long sock_hash_delete_elem(struct bpf_map *map, void *key)
sock_hash_free_elem(htab, elem);
ret = 0;
}
- spin_unlock_bh(&bucket->lock);
+ spin_unlock_irqrestore(&bucket->lock, flags);
return ret;
}
next prev parent reply other threads:[~2024-03-21 0:33 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-18 10:07 syzbot
2024-03-21 0:25 ` Edward Adam Davis [this message]
2024-03-21 15:04 ` syzbot
2024-03-22 0:17 ` Edward Adam Davis
2024-03-22 10:56 ` syzbot
2024-03-23 5:42 ` [PATCH] bpf, sockmap: fix " Edward Adam Davis
2024-03-23 7:08 ` Alexei Starovoitov
2024-03-25 12:23 ` Jakub Sitnicki
2024-03-25 13:49 ` Jakub Sitnicki
2024-03-29 5:29 ` John Fastabend
2024-03-26 22:15 ` Jakub Sitnicki
2024-03-29 15:52 ` Shung-Hsi Yu
2024-04-20 14:51 ` [syzbot] [bpf?] [net?] possible " Tetsuo Handa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tencent_C086D8D2CB0650C9932EECAECC0CBFE7EB06@qq.com \
--to=eadavis@qq.com \
--cc=linux-kernel@vger.kernel.org \
--cc=syzbot+c4f4d25859c2e5859988@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome