Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1259871
| From | Alexei Starovoitov <alexei.starovoitov@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] bpf: convert hashtab lock to raw lock |
| Date | 2015-10-31 01:10 +0100 |
| Message-ID | <qprU5-482-15@gated-at.bofh.it> (permalink) |
| References | <qpquZ-39c-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Fri, Oct 30, 2015 at 03:16:26PM -0700, Yang Shi wrote:
> When running bpf samples on rt kernel, it reports the below warning:
>
> BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:917
> in_atomic(): 1, irqs_disabled(): 128, pid: 477, name: ping
> Preemption disabled at:[<ffff80000017db58>] kprobe_perf_func+0x30/0x228
...
> diff --git a/kernel/bpf/hashtab.c b/kernel/bpf/hashtab.c
> index 83c209d..972b76b 100644
> --- a/kernel/bpf/hashtab.c
> +++ b/kernel/bpf/hashtab.c
> @@ -17,7 +17,7 @@
> struct bpf_htab {
> struct bpf_map map;
> struct hlist_head *buckets;
> - spinlock_t lock;
> + raw_spinlock_t lock;
How do we address such things in general?
I bet there are tons of places around the kernel that
call spin_lock from atomic.
I'd hate to lose the benefits of lockdep of non-raw spin_lock
just to make rt happy.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] bpf: convert hashtab lock to raw lock Yang Shi <yang.shi@linaro.org> - 2015-10-30 23:40 +0100
Re: [PATCH] bpf: convert hashtab lock to raw lock Alexei Starovoitov <alexei.starovoitov@gmail.com> - 2015-10-31 01:10 +0100
Re: [PATCH] bpf: convert hashtab lock to raw lock Steven Rostedt <rostedt@goodmis.org> - 2015-10-31 14:50 +0100
Re: [PATCH] bpf: convert hashtab lock to raw lock Daniel Borkmann <daniel@iogearbox.net> - 2015-10-31 20:10 +0100
Re: [PATCH] bpf: convert hashtab lock to raw lock "Shi, Yang" <yang.shi@linaro.org> - 2015-11-02 18:20 +0100
Re: [PATCH] bpf: convert hashtab lock to raw lock Steven Rostedt <rostedt@goodmis.org> - 2015-11-02 18:30 +0100
Re: [PATCH] bpf: convert hashtab lock to raw lock "Shi, Yang" <yang.shi@linaro.org> - 2015-11-02 18:40 +0100
Re: [PATCH] bpf: convert hashtab lock to raw lock Daniel Borkmann <daniel@iogearbox.net> - 2015-11-02 18:30 +0100
Re: [PATCH] bpf: convert hashtab lock to raw lock Alexei Starovoitov <alexei.starovoitov@gmail.com> - 2015-11-02 00:00 +0100
Re: [PATCH] bpf: convert hashtab lock to raw lock Thomas Gleixner <tglx@linutronix.de> - 2015-11-02 10:10 +0100
Re: [PATCH] bpf: convert hashtab lock to raw lock "Shi, Yang" <yang.shi@linaro.org> - 2015-11-02 18:10 +0100
Re: [PATCH] bpf: convert hashtab lock to raw lock David Miller <davem@davemloft.net> - 2015-11-02 21:50 +0100
csiph-web