public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Jakub Sitnicki <jakub@cloudflare•com>
To: Alexei Starovoitov <alexei.starovoitov@gmail•com>,
	Edward Adam Davis <eadavis@qq•com>,
	John Fastabend <john.fastabend@gmail•com>
Cc: syzbot+c4f4d25859c2e5859988@syzkaller•appspotmail.com,
	42.hyeyoo@gmail•com, andrii@kernel•org, ast@kernel•org,
	bpf@vger•kernel.org, daniel@iogearbox•net, davem@davemloft•net,
	edumazet@google•com, kafai@fb•com, kpsingh@kernel•org,
	kuba@kernel•org, linux-kernel@vger•kernel.org,
	namhyung@kernel•org, netdev@vger•kernel.org, pabeni@redhat•com,
	peterz@infradead•org, songliubraving@fb•com,
	syzkaller-bugs@googlegroups•com, yhs@fb•com
Subject: Re: [PATCH] bpf, sockmap: fix deadlock in rcu_report_exp_cpu_mult
Date: Mon, 25 Mar 2024 14:49:19 +0100	[thread overview]
Message-ID: <87ttkuber7.fsf@cloudflare.com> (raw)
In-Reply-To: <87y1a6biie.fsf@cloudflare.com>

On Mon, Mar 25, 2024 at 01:23 PM +01, Jakub Sitnicki wrote:

[...]

> But we also need to cover sock_map_unref->sock_sock_map_del_link called
> from sock_hash_delete_elem. It also grabs a spin lock.

On second look, no need to disable interrupts in
sock_map_unref->sock_sock_map_del_link. Call is enclosed in the critical
section in sock_hash_delete_elem that has been updated.

I have a question, though, why are we patching sock_hash_free? It
doesn't get called unless there are no more existing users of the BPF
map. So nothing can mutate it from interrupt context.

[...]

  reply	other threads:[~2024-03-25 13:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-18 10:07 [syzbot] [bpf?] [net?] possible deadlock in rcu_report_exp_cpu_mult 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 [this message]
2024-03-29  5:29         ` John Fastabend
2024-03-26 22:15       ` Jakub Sitnicki
2024-03-29 15:52         ` Shung-Hsi Yu

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=87ttkuber7.fsf@cloudflare.com \
    --to=jakub@cloudflare$(echo .)com \
    --cc=42.hyeyoo@gmail$(echo .)com \
    --cc=alexei.starovoitov@gmail$(echo .)com \
    --cc=andrii@kernel$(echo .)org \
    --cc=ast@kernel$(echo .)org \
    --cc=bpf@vger$(echo .)kernel.org \
    --cc=daniel@iogearbox$(echo .)net \
    --cc=davem@davemloft$(echo .)net \
    --cc=eadavis@qq$(echo .)com \
    --cc=edumazet@google$(echo .)com \
    --cc=john.fastabend@gmail$(echo .)com \
    --cc=kafai@fb$(echo .)com \
    --cc=kpsingh@kernel$(echo .)org \
    --cc=kuba@kernel$(echo .)org \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=namhyung@kernel$(echo .)org \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=pabeni@redhat$(echo .)com \
    --cc=peterz@infradead$(echo .)org \
    --cc=songliubraving@fb$(echo .)com \
    --cc=syzbot+c4f4d25859c2e5859988@syzkaller$(echo .)appspotmail.com \
    --cc=syzkaller-bugs@googlegroups$(echo .)com \
    --cc=yhs@fb$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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