mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Menglong Dong <menglong8.dong@gmail.com>
To: martin.lau@linux.dev, leon.hwang@linux.dev
Cc: ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org,
	eddyz87@gmail.com, song@kernel.org, yonghong.song@linux.dev,
	john.fastabend@gmail.com, kpsingh@kernel.org, sdf@fomichev.me,
	haoluo@google.com, jolsa@kernel.org, shuah@kernel.org,
	jiang.biao@linux.dev, linux-kernel@vger.kernel.org,
	bpf@vger.kernel.org, linux-kselftest@vger.kernel.org
Subject: [PATCH bpf 0/2] use rqspinlock for bpf lru map
Date: Thu, 30 Oct 2025 11:00:08 +0800	[thread overview]
Message-ID: <20251030030010.95352-1-dongml2@chinatelecom.cn> (raw)

Convert the raw_spinlock to rqspinlock to fix the possible deadlock in
[1] for bpf lru map. Meanwhile, add the testcase for the deadlock.

Link: https://lore.kernel.org/bpf/CAEf4BzbTJCUx0D=zjx6+5m5iiGhwLzaP94hnw36ZMDHAf4-U_w@mail.gmail.com/[1]
Menglong Dong (2):
  bpf: use rqspinlock for lru map
  selftests/bpf: test map deadlock caused by NMI

 kernel/bpf/bpf_lru_list.c                     |  47 +++---
 kernel/bpf/bpf_lru_list.h                     |   5 +-
 .../selftests/bpf/prog_tests/map_deadlock.c   | 134 ++++++++++++++++++
 .../selftests/bpf/progs/map_deadlock.c        |  52 +++++++
 4 files changed, 217 insertions(+), 21 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/prog_tests/map_deadlock.c
 create mode 100644 tools/testing/selftests/bpf/progs/map_deadlock.c

-- 
2.51.2


             reply	other threads:[~2025-10-30  3:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-30  3:00 Menglong Dong [this message]
2025-10-30  3:00 ` [PATCH bpf 1/2] bpf: use rqspinlock for " Menglong Dong
2025-10-30  3:38   ` bot+bpf-ci
2025-10-30 22:38     ` Alexei Starovoitov
2025-10-31  2:12       ` Menglong Dong
2025-10-30  3:00 ` [PATCH bpf 2/2] selftests/bpf: test map deadlock caused by NMI Menglong Dong

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=20251030030010.95352-1-dongml2@chinatelecom.cn \
    --to=menglong8.dong@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=haoluo@google.com \
    --cc=jiang.biao@linux.dev \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=kpsingh@kernel.org \
    --cc=leon.hwang@linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=sdf@fomichev.me \
    --cc=shuah@kernel.org \
    --cc=song@kernel.org \
    --cc=yonghong.song@linux.dev \
    /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

all inboxes | Powered by JetHome®