All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Fastabend <john.fastabend@gmail.com>
To: Xin Liu <liuxin350@huawei.com>,
	andrii@kernel.org, ast@kernel.org, daniel@iogearbox.net,
	martin.lau@linux.dev, song@kernel.org, yhs@fb.com,
	john.fastabend@gmail.com, kpsingh@kernel.org, sdf@google.com,
	haoluo@google.com, jolsa@kernel.org
Cc: bpf@vger.kernel.org, hsinweih@uci.edu,
	linux-kernel@vger.kernel.org, yanan@huawei.com,
	wuchangye@huawei.com, xiesongyang@huawei.com,
	kongweibin2@huawei.com, liuxin350@huawei.com,
	zhangmingyi5@huawei.com
Subject: RE: [PATCH bpf-next] bpf, sockmap: fix deadlocks in the sockhash and sockmap
Date: Thu, 06 Apr 2023 14:13:23 -0700	[thread overview]
Message-ID: <642f35f3881ee_6e3a2085@john.notmuch> (raw)
In-Reply-To: <20230406122622.109978-1-liuxin350@huawei.com>

Xin Liu wrote:
> When huang uses sched_switch tracepoint, the tracepoint
> does only one thing in the mounted ebpf program, which
> deletes the fixed elements in sockhash ([0])
> 
> It seems that elements in sockhash are rarely actively
> deleted by users or ebpf program. Therefore, we do not
> pay much attention to their deletion. Compared with hash
> maps, sockhash only provides spin_lock_bh protection.
> This causes it to appear to have self-locking behavior
> in the interrupt context.
> 
>   [0]:https://lore.kernel.org/all/CABcoxUayum5oOqFMMqAeWuS8+EzojquSOSyDA3J_2omY=2EeAg@mail.gmail.com/
> 
> Reported-by: Hsin-Wei Hung <hsinweih@uci.edu>
> Fixes: 604326b41a6f ("bpf, sockmap: convert to generic sk_msg interface")
> Signed-off-by: Xin Liu <liuxin350@huawei.com>

Yeah even if we delete entries we do it from a sockops. Thanks for the
fix.

Acked-by: John Fastabend <john.fastabend@gmail.com>

  reply	other threads:[~2023-04-06 21:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-06 12:26 [PATCH bpf-next] bpf, sockmap: fix deadlocks in the sockhash and sockmap Xin Liu
2023-04-06 21:13 ` John Fastabend [this message]
2023-04-12 23:40 ` patchwork-bot+netdevbpf

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=642f35f3881ee_6e3a2085@john.notmuch \
    --to=john.fastabend@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=haoluo@google.com \
    --cc=hsinweih@uci.edu \
    --cc=jolsa@kernel.org \
    --cc=kongweibin2@huawei.com \
    --cc=kpsingh@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liuxin350@huawei.com \
    --cc=martin.lau@linux.dev \
    --cc=sdf@google.com \
    --cc=song@kernel.org \
    --cc=wuchangye@huawei.com \
    --cc=xiesongyang@huawei.com \
    --cc=yanan@huawei.com \
    --cc=yhs@fb.com \
    --cc=zhangmingyi5@huawei.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.