Yang Shi
ac00881f92
bpf: convert hashtab lock to raw lock
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
CPU: 3 PID: 477 Comm: ping Not tainted 4.1.10-rt8 #4
Hardware name: Freescale Layerscape 2085a RDB Board (DT)
Call trace:
[<ffff80000008a5b0>] dump_backtrace+0x0/0x128
[<ffff80000008a6f8>] show_stack+0x20/0x30
[<ffff8000007da90c>] dump_stack+0x7c/0xa0
[<ffff8000000e4830>] ___might_sleep+0x188/0x1a0
[<ffff8000007e2200>] rt_spin_lock+0x28/0x40
[<ffff80000018bf9c>] htab_map_update_elem+0x124/0x320
[<ffff80000018c718>] bpf_map_update_elem+0x40/0x58
[<ffff800000187658>] __bpf_prog_run+0xd48/0x1640
[<ffff80000017ca6c>] trace_call_bpf+0x8c/0x100
[<ffff80000017db58>] kprobe_perf_func+0x30/0x228
[<ffff80000017dd84>] kprobe_dispatcher+0x34/0x58
[<ffff8000007e399c>] kprobe_handler+0x114/0x250
[<ffff8000007e3bf4>] kprobe_breakpoint_handler+0x1c/0x30
[<ffff800000085b80>] brk_handler+0x88/0x98
[<ffff8000000822f0>] do_debug_exception+0x50/0xb8
Exception stack(0xffff808349687460 to 0xffff808349687580)
7460: 4ca2b600 ffff8083 4a3a7000 ffff8083 49687620 ffff8083 0069c5f8 ffff8000
7480: 00000001 00000000 007e0628 ffff8000 496874b0 ffff8083 007e1de8 ffff8000
74a0: 496874d0 ffff8083 0008e04c ffff8000 00000001 00000000 4ca2b600 ffff8083
74c0: 00ba2e80 ffff8000 49687528 ffff8083 49687510 ffff8083 000e5c70 ffff8000
74e0: 00c22348 ffff8000 00000000 ffff8083 49687510 ffff8083 000e5c74 ffff8000
7500: 4ca2b600 ffff8083 49401800 ffff8083 00000001 00000000 00000000 00000000
7520: 496874d0 ffff8083 00000000 00000000 00000000 00000000 00000000 00000000
7540: 2f2e2d2c 33323130 00000000 00000000 4c944500 ffff8083 00000000 00000000
7560: 00000000 00000000 008751e0 ffff8000 00000001 00000000 124e2d1d 00107b77
Convert hashtab lock to raw lock to avoid such warning.
Signed-off-by: Yang Shi <yang.shi@linaro.org>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-11-02 15:45:43 -05:00
..
2015-11-02 15:45:43 -05:00
2015-06-16 11:04:29 +01:00
2015-02-19 12:39:03 -06:00
2015-10-22 06:42:13 -07:00
2015-06-30 19:44:57 -07:00
2015-10-20 06:08:27 -07:00
2015-07-14 22:48:06 +02:00
2015-09-23 09:48:53 +02:00
2015-09-02 13:10:25 -07:00
2015-09-10 13:29:01 -07:00
2015-09-20 21:01:22 -07:00
2015-10-23 12:02:10 +02:00
2015-10-16 15:50:22 +02:00
2015-11-01 00:15:30 -04:00
2015-04-11 22:27:55 -04:00
2014-10-09 22:26:04 -04:00
2015-08-06 16:14:53 -04:00
2015-09-08 13:34:59 -07:00
2015-09-08 13:34:59 -07:00
2015-09-08 13:34:59 -07:00
2015-09-08 13:34:59 -07:00
2015-08-06 16:17:25 -04:00
2015-09-08 13:34:59 -07:00
2014-08-08 15:57:18 -07:00
2015-04-15 16:35:22 -07:00
2015-07-14 17:29:23 -04:00
2015-08-25 14:19:25 -04:00
2015-09-16 11:51:12 -04:00
2015-06-04 23:57:18 +02:00
2015-05-07 12:02:51 +02:00
2015-09-03 02:42:20 +02:00
2015-08-31 20:26:22 -07:00
2015-08-10 11:18:41 -04:00
2014-08-25 15:42:19 -07:00
2015-09-10 13:29:01 -07:00
2015-04-12 21:03:31 +02:00
2015-08-07 13:59:49 +02:00
2015-09-10 13:29:01 -07:00
2015-09-16 11:51:12 -04:00
2014-10-21 23:44:20 +02:00
2015-07-20 21:43:54 +02:00
2015-04-15 16:35:22 -07:00
2015-04-15 16:35:22 -07:00
2014-10-29 11:18:18 -04:00
2015-08-03 11:34:16 +02:00
2014-10-14 02:18:16 +02:00
2014-09-10 15:42:12 -07:00
2015-05-12 09:46:00 +02:00
2015-09-10 13:29:01 -07:00
2015-09-10 13:29:01 -07:00
2015-09-10 13:29:01 -07:00
2015-09-10 13:29:01 -07:00
2015-10-23 17:55:10 +09:00
2015-08-04 10:16:54 +02:00
2015-09-10 13:29:01 -07:00
2015-09-04 16:54:41 -07:00
2015-09-11 15:21:34 -07:00
2015-09-11 15:21:34 -07:00
2015-08-27 19:40:58 -04:00
2015-08-12 17:01:01 +01:00
2015-08-24 10:37:01 +09:30
2015-09-01 08:40:25 -07:00
2014-12-04 14:34:54 -05:00
2015-02-13 21:21:38 -08:00
2015-06-30 19:44:57 -07:00
2015-07-01 10:49:25 -07:00
2014-12-16 15:53:03 -08:00
2015-07-22 15:27:32 -07:00
2015-09-08 15:35:28 -07:00
2015-10-27 19:55:13 -07:00
2015-01-17 10:02:23 +13:00
2015-09-10 13:29:01 -07:00
2015-06-30 19:44:59 -07:00
2015-08-10 23:07:05 -04:00
2015-10-27 19:55:13 -07:00
2015-08-07 04:39:40 +03:00
2015-04-19 13:19:23 -07:00
2015-09-04 16:54:41 -07:00
2015-02-09 15:24:03 -08:00
2014-12-13 12:42:48 -08:00
2015-08-03 12:21:28 +02:00
2015-09-11 15:21:34 -07:00
2015-07-10 10:39:25 -05:00
2014-12-10 17:41:10 -08:00
2015-10-12 19:13:35 -07:00
2015-09-05 13:46:58 -07:00
2015-01-18 01:03:45 -05:00
2014-08-08 15:57:18 -07:00
2015-05-27 12:56:15 -07:00
2014-12-05 17:19:27 -06:00
2015-09-04 16:54:41 -07:00
2014-08-26 13:45:45 -04:00
2014-12-17 12:31:40 -08:00
2014-12-04 14:34:47 -05:00
2015-09-04 16:54:41 -07:00
2015-09-30 13:06:46 -04:00