[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZA4owxvldelZ6x9h@pop-os.localdomain>
Date: Sun, 12 Mar 2023 12:32:19 -0700
From: Cong Wang <xiyou.wangcong@...il.com>
To: Hsin-Wei Hung <hsinweih@....edu>
Cc: John Fastabend <john.fastabend@...il.com>,
Jakub Sitnicki <jakub@...udflare.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>, netdev@...r.kernel.org,
bpf@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: A potential deadlock in sockhash map
On Mon, Feb 20, 2023 at 07:39:59AM -0600, Hsin-Wei Hung wrote:
> DEFINE_BPF_MAP(map_0, BPF_MAP_TYPE_SOCKHASH, 0, uint32_t, uint32_t, 1005);
> SEC("tp/sched/sched_switch")
> int func(__u64 *ctx) {
> uint32_t v0 = 0;
> uint64_t v1 = 0;
> v1 = bpf_map_delete_elem(&map_0, &v0);
> return 0;
> }
It looks like we have to disable hardirq (instead of just softirq) in order to use
sockmap safely in interrupt context like sched/sched_switch.
Thanks.
Powered by blists - more mailing lists