Alexei Starovoitov
c7c68a1b9a
bpf: fix lockdep false positive in stackmap
[ Upstream commit 3defaf2f15 ]
Lockdep warns about false positive:
[ 11.211460] ------------[ cut here ]------------
[ 11.211936] DEBUG_LOCKS_WARN_ON(depth <= 0)
[ 11.211985] WARNING: CPU: 0 PID: 141 at ../kernel/locking/lockdep.c:3592 lock_release+0x1ad/0x280
[ 11.213134] Modules linked in:
[ 11.214954] RIP: 0010:lock_release+0x1ad/0x280
[ 11.223508] Call Trace:
[ 11.223705] <IRQ>
[ 11.223874] ? __local_bh_enable+0x7a/0x80
[ 11.224199] up_read+0x1c/0xa0
[ 11.224446] do_up_read+0x12/0x20
[ 11.224713] irq_work_run_list+0x43/0x70
[ 11.225030] irq_work_run+0x26/0x50
[ 11.225310] smp_irq_work_interrupt+0x57/0x1f0
[ 11.225662] irq_work_interrupt+0xf/0x20
since rw_semaphore is released in a different task vs task that locked the sema.
It is expected behavior.
Fix the warning with up_read_non_owner() and rwsem_release() annotation.
Fixes: bae77c5eb5 ("bpf: enable stackmap with build_id in nmi context")
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-03-23 20:09:48 +01:00
..
2019-03-23 20:09:48 +01:00
2019-02-12 19:47:17 +01:00
2018-06-15 07:15:28 +09:00
2019-02-12 19:47:19 +01:00
2019-01-13 09:51:05 +01:00
2019-03-13 14:02:26 -07:00
2018-06-08 18:56:02 +09:00
2019-03-05 17:58:47 +01:00
2018-08-20 18:33:50 +02:00
2019-03-05 17:58:49 +01:00
2018-10-12 12:35:02 +02:00
2018-11-13 11:08:48 -08:00
2019-01-13 09:51:06 +01:00
2019-03-05 17:58:49 +01:00
2019-02-12 19:47:05 +01:00
2019-03-13 14:02:36 -07:00
2018-02-06 18:32:44 -08:00
2018-05-18 14:58:22 +02:00
2018-08-17 09:41:28 -07:00
2018-07-18 11:43:36 -04:00
2018-07-17 14:45:08 -04:00
2018-02-23 11:22:22 -05:00
2018-06-19 10:39:54 -04:00
2018-08-15 10:46:54 -07:00
2018-11-13 11:08:47 -08:00
2018-06-24 14:39:47 +02:00
2019-02-12 19:47:25 +01:00
2018-08-22 10:52:47 -07:00
2018-04-27 14:34:51 +02:00
2018-05-16 07:23:35 +02:00
2018-05-16 07:23:35 +02:00
2019-03-05 17:58:49 +01:00
2018-02-21 16:54:06 +01:00
2018-06-21 12:33:19 +02:00
2019-01-13 09:51:04 +01:00
2018-08-06 12:35:20 +02:00
2019-03-05 17:58:49 +01:00
2019-02-12 19:47:19 +01:00
2018-05-15 23:08:33 -07:00
2018-09-10 10:15:48 +02:00
2018-08-14 19:12:29 -03:00
2018-08-02 08:06:54 +09:00
2019-02-12 19:47:20 +01:00
2018-06-15 07:55:24 +09:00
2018-06-12 16:19:22 -07:00
2018-07-16 12:31:57 -07:00
2018-11-13 11:08:28 -08:00
2018-08-13 11:25:07 -07:00
2018-07-18 01:18:05 +09:00
2019-01-13 09:51:04 +01:00
2018-07-02 11:36:17 +02:00
2018-07-02 11:36:17 +02:00
2019-02-12 19:47:06 +01:00
2018-12-29 13:37:57 +01:00
2018-04-11 10:28:37 -07:00
2018-04-03 19:15:32 -07:00
2019-01-13 09:51:06 +01:00
2018-12-05 19:32:03 +01:00
2018-08-06 12:35:20 +02:00
2019-03-13 14:02:35 -07:00
2018-06-08 17:21:52 -07:00
2018-07-10 22:18:52 +02:00
2018-06-06 16:34:00 -07:00
2019-02-20 10:25:48 +01:00
2019-02-12 19:47:25 +01:00
2018-07-03 09:20:44 +02:00
2018-08-03 15:52:10 +02:00
2018-08-13 11:25:07 -07:00
2018-06-10 10:17:09 -07:00
2018-09-20 22:01:11 +02:00
2018-04-16 11:26:49 +02:00
2019-02-12 19:47:19 +01:00
2018-02-06 18:32:46 -08:00
2018-06-21 12:33:05 +02:00
2018-06-25 11:30:10 -07:00
2018-10-17 15:35:29 -04:00
2018-04-05 21:36:27 -07:00
2018-04-02 20:15:59 +02:00
2018-04-02 20:15:30 +02:00
2018-06-07 16:56:28 -04:00
2018-11-13 11:09:00 -08:00
2018-08-22 10:52:47 -07:00
2018-08-11 02:05:53 -05:00
2018-04-11 10:28:35 -07:00
2018-08-30 12:56:40 +02:00
2018-08-30 12:56:40 +02:00
2018-05-18 08:47:13 -07:00
2018-08-30 12:56:40 +02:00