Alexei Starovoitov
abf2e7d6e2
bpf: add missing rcu protection when releasing programs from prog_array
...
Normally the program attachment place (like sockets, qdiscs) takes
care of rcu protection and calls bpf_prog_put() after a grace period.
The programs stored inside prog_array may not be attached anywhere,
so prog_array needs to take care of preserving rcu protection.
Otherwise bpf_tail_call() will race with bpf_prog_put().
To solve that introduce bpf_prog_put_rcu() helper function and use
it in 3 places where unattached program can decrement refcnt:
closing program fd, deleting/replacing program in prog_array.
Fixes: 04fd61ab36ec ("bpf: allow bpf programs to tail-call other bpf programs")
Reported-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Alexei Starovoitov <ast@plumgrid.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-05-31 00:27:51 -07:00
..
2015-03-17 16:23:21 +05:30
2015-03-13 16:25:50 +02:00
2014-08-06 18:01:23 -07:00
2015-03-22 23:50:11 +01:00
2015-04-22 18:33:48 +03:00
2015-04-22 09:24:55 -07:00
2015-04-22 18:33:43 +03:00
2014-08-08 15:57:26 -07:00
2015-04-24 09:49:37 -07:00
2014-09-22 16:48:47 +09:00
2015-03-19 09:45:54 +01:00
2015-02-27 14:56:57 -07:00
2014-12-14 14:57:16 -08:00
2015-03-29 16:17:10 +01:00
2015-02-01 11:50:35 -08:00
2015-05-09 14:59:05 -07:00
2014-11-24 17:24:08 -05:00
2015-04-26 13:36:02 -07:00
2015-05-30 23:35:34 -07:00
2015-05-30 18:24:51 -07:00
2015-04-24 09:49:37 -07:00
2015-03-27 10:37:38 -07:00
2015-05-15 20:14:07 +02:00
2015-04-04 13:26:52 -04:00
2015-04-13 20:08:38 +02:00
2015-04-04 12:47:04 -04:00
2015-04-04 12:52:06 -04:00
2015-02-11 10:28:45 -08:00
2015-03-05 10:08:14 +01:00
2015-05-08 11:22:30 -07:00
2015-04-06 17:46:27 +02:00
2015-04-22 08:00:41 +10:00
2015-04-10 19:16:03 +01:00
2015-02-16 17:56:05 -08:00
2015-05-08 11:53:55 +02:00
2014-09-24 11:53:39 -07:00
2015-04-15 09:00:47 -07:00
2015-01-29 10:49:28 +02:00
2015-04-23 15:16:37 -04:00
2015-04-07 11:17:34 +02:00
2015-03-18 17:27:03 +01:00
2015-04-15 16:35:22 -07:00
2014-08-07 14:40:09 -04:00
2015-03-26 15:13:07 +00:00
2015-04-24 08:23:45 -07:00
2014-09-16 16:28:34 -06:00
2015-01-28 18:45:23 -05:00
2015-03-25 20:28:11 -04:00
2015-03-27 13:44:43 +00:00
2015-04-22 08:00:42 +10:00
2015-01-28 18:45:23 -05:00
2015-03-27 11:59:22 -04:00
2014-10-27 14:16:19 -04:00
2014-09-08 10:54:03 +02:00
2014-11-10 12:40:48 +01:00
2014-08-13 10:31:57 +02:00
2015-02-17 15:27:47 -08:00
2015-02-17 16:12:34 -08:00
2014-10-09 22:26:01 -04:00
2015-04-01 17:22:00 +02:00
2015-02-17 21:33:27 +01:00
2014-12-13 12:42:51 -08:00
2015-02-05 09:30:43 -07:00
2015-04-17 09:03:56 -04:00
2015-04-17 09:03:53 -04:00
2014-12-22 16:43:06 +00:00
2015-05-04 13:09:55 -06:00
2015-04-17 08:31:12 -06:00
2015-05-12 17:21:22 -04:00
2014-11-13 16:17:06 -08:00
2015-05-31 00:27:51 -07:00
2015-04-14 15:44:14 -04:00
2014-09-04 22:04:42 -04:00
2014-11-07 11:45:00 -08:00
2015-04-15 16:35:22 -07:00
2014-09-24 14:23:34 +08:00
2015-01-20 14:02:58 -07:00
2015-01-06 12:02:46 -05:00
2015-01-06 12:02:46 -05:00
2015-04-14 16:49:03 -07:00
2015-04-10 17:45:30 -07:00
2015-03-11 15:56:59 -07:00
2014-11-20 10:43:16 -04:00
2015-04-03 08:44:37 +02:00
2015-04-24 08:23:45 -07:00
2015-04-14 16:49:04 -07:00
2014-09-29 14:36:26 -04:00
2015-04-15 16:35:17 -07:00
2015-01-27 09:37:53 +00:00
2015-02-13 21:21:42 -08:00
2015-02-13 21:21:42 -08:00
2015-05-04 17:49:51 +08:00
2015-05-04 17:49:51 +08:00
2015-05-04 17:49:51 +08:00
2015-03-26 16:16:20 +01:00
2015-03-09 15:43:03 +01:00
2015-03-09 15:43:03 +01:00
2015-02-04 10:42:55 -08:00
2014-12-17 09:00:04 -04:00
2015-04-13 10:19:30 +02:00
2014-10-21 00:51:01 +02:00
2015-01-23 23:06:44 +01:00
2015-04-03 13:15:50 +02:00
2015-04-16 12:33:51 +09:30
2014-10-27 11:15:27 -04:00
2014-10-22 16:14:04 -06:00
2014-09-27 09:14:59 -06:00
2015-04-15 16:35:22 -07:00
2015-03-31 21:21:03 +08:00
2015-02-12 18:54:15 -08:00
2015-04-15 15:05:28 -04:00
2015-03-23 16:52:26 -04:00
2015-02-17 12:21:51 -05:00
2014-09-23 22:53:15 -07:00
2015-03-30 17:09:41 +09:00
2014-12-19 22:55:06 +01:00
2015-03-31 12:03:49 -04:00
2015-04-14 20:21:54 -07:00
2015-04-21 14:47:16 +05:30
2014-08-06 18:01:16 -07:00
2015-03-09 13:05:47 +01:00
2015-03-16 22:28:15 +05:30
2015-04-17 23:18:53 +05:30
2014-11-18 11:18:35 +01:00
2015-01-21 19:21:30 +01:00
2014-11-10 09:27:30 -07:00
2014-10-03 14:55:48 -07:00
2014-09-29 00:04:55 -04:00
2014-10-20 14:22:22 +02:00
2014-11-25 15:42:53 +01:00
2015-04-01 12:46:22 +01:00
2015-04-14 16:49:05 -07:00
2014-11-24 07:45:02 +01:00
2015-01-09 15:44:19 +01:00
2015-05-05 19:24:42 -04:00
2014-12-08 21:07:10 -05:00
2015-02-05 14:35:17 +01:00
2015-04-10 15:08:57 -07:00
2015-03-25 15:07:05 +11:00
2014-12-13 12:42:52 -08:00
2015-01-15 13:33:41 +02:00
2014-12-31 13:06:50 -05:00
2014-11-03 11:53:34 -05:00
2014-12-10 17:41:10 -08:00
2015-05-21 17:07:59 -04:00
2015-03-02 14:50:06 -03:00
2014-09-08 09:51:30 +09:00
2014-10-09 11:35:48 +03:00
2014-11-04 07:17:46 +01:00
2014-10-08 16:01:41 -04:00
2015-04-09 11:39:55 -05:00
2015-04-26 17:22:07 -07:00
2014-11-05 14:45:53 -08:00
2014-10-15 21:31:27 +05:30
2014-12-13 12:42:53 -08:00
2015-02-10 14:30:28 -08:00
2015-05-06 23:03:23 -04:00
2014-12-15 10:17:38 -05:00
2015-04-03 23:23:51 +02:00
2014-10-09 22:25:52 -04:00
2015-01-16 17:04:25 -05:00
2014-10-14 17:03:53 -04:00
2015-05-23 01:22:35 -04:00
2014-08-06 18:01:24 -07:00
2014-11-04 21:58:23 +01:00
2014-10-28 17:30:59 +01:00
2015-02-18 15:08:33 +01:00
2014-12-10 15:17:46 -05:00
2015-01-27 10:19:12 -02:00
2015-05-12 14:13:20 +02:00
2015-02-23 15:11:52 +01:00
2015-04-14 09:25:26 -07:00
2014-08-06 18:01:22 -07:00
2015-04-02 18:46:20 +02:00
2015-01-23 12:13:20 +01:00
2015-02-12 18:54:08 -08:00
2014-12-10 17:41:04 -08:00
2015-04-15 16:35:19 -07:00
2015-03-16 21:45:54 +11:00
2015-04-03 16:18:02 +02:00
2015-04-14 20:21:54 -07:00
2015-01-27 11:09:13 +01:00
2015-03-14 17:11:30 +01:00
2015-03-05 14:52:23 -05:00
2015-04-10 21:57:22 -07:00
2014-09-29 15:37:01 -04:00
2015-05-11 10:50:17 -04:00
2015-05-30 17:52:28 -07:00
2015-05-04 14:49:23 -04:00
2014-09-09 10:28:43 -04:00
2015-03-10 13:45:28 -04:00
2014-11-14 17:08:58 -05:00
2015-02-13 21:21:41 -08:00
2015-03-05 09:23:12 +01:00
2014-11-17 23:12:01 -05:00
2015-03-25 15:43:39 +00:00
2015-04-08 23:28:28 +02:00
2015-04-21 09:42:58 -07:00
2015-04-18 12:32:59 -07:00
2015-03-31 15:32:16 +02:00
2015-01-19 16:11:59 +00:00
2015-04-15 16:35:22 -07:00
2015-01-19 14:55:22 +01:00
2014-09-23 23:13:13 -07:00
2014-12-16 15:53:03 -08:00
2014-12-11 15:04:11 -06:00
2014-12-11 15:04:06 -06:00
2015-03-23 22:12:08 -04:00
2015-03-23 10:55:21 +01:00
2015-04-11 11:17:28 +02:00
2015-03-04 21:42:19 +01:00
2014-11-23 13:01:46 +01:00
2015-02-19 01:08:42 +01:00
2014-11-23 13:01:46 +01:00
2014-08-02 15:03:58 -07:00
2015-01-15 10:34:54 +01:00
2015-01-15 10:34:54 +01:00
2015-04-03 12:52:29 -04:00
2014-09-12 13:59:03 -07:00
2015-04-09 09:40:24 +02:00
2015-03-26 23:51:36 +01:00
2015-04-15 16:35:20 -07:00
2015-04-21 09:44:55 -03:00
2015-02-19 12:39:02 -06:00
2014-12-10 17:41:11 -08:00
2014-12-13 13:33:07 +01:00
2015-04-17 09:03:55 -04:00
2014-10-14 15:05:34 -04:00
2015-02-13 21:21:36 -08:00
2015-04-23 16:52:01 +02:00
2014-09-16 17:36:08 +01:00
2014-09-09 10:34:56 +02:00
2014-10-22 16:14:04 -06:00
2014-10-29 16:33:14 -07:00
2014-08-06 18:01:24 -07:00
2014-12-13 12:42:47 -08:00
2015-01-13 16:10:16 +00:00
2015-04-15 16:35:17 -07:00
2014-07-28 14:16:30 -04:00
2015-01-24 10:11:12 +01:00
2015-04-14 13:58:48 -07:00
2014-12-18 09:39:51 +01:00
2015-03-31 09:45:50 -06:00
2015-03-30 11:55:48 -07:00
2015-03-09 17:16:23 -07:00
2015-02-11 16:47:46 +10:30
2015-03-24 11:52:08 +10:30
2015-04-25 16:50:14 -04:00
2015-02-12 18:54:10 -08:00
2015-01-04 23:11:43 -05:00
2014-11-20 14:45:15 +01:00
2015-02-18 20:50:05 +01:00
2015-03-03 11:16:00 -08:00
2015-01-25 23:16:29 -05:00
2014-11-27 12:50:59 +05:30
2014-10-08 10:39:41 +05:30
2014-10-24 15:49:20 -04:00
2014-11-30 16:40:11 +00:00
2015-05-14 22:35:13 -04:00
2015-01-12 05:04:10 -08:00
2015-04-14 16:49:06 -07:00
2015-05-14 17:55:51 -07:00
2015-04-14 16:49:00 -07:00
2014-10-22 16:14:04 -06:00
2014-10-09 22:25:56 -04:00
2015-04-15 16:35:18 -07:00
2014-11-21 14:08:56 -05:00
2015-04-14 16:49:05 -07:00
2015-03-25 11:44:52 +01:00
2015-05-12 10:39:26 -04:00
2015-04-22 09:44:36 -07:00
2014-10-09 22:25:58 -04:00
2014-12-15 15:52:01 -08:00
2015-04-15 16:35:16 -07:00
2015-03-31 12:04:12 +02:00
2015-04-14 10:49:03 -07:00
2015-03-12 18:46:08 -07:00
2014-10-14 02:18:28 +02:00
2015-04-18 11:20:31 -04:00
2014-11-23 17:14:43 +01:00
2015-02-14 11:32:59 -08:00
2014-12-10 21:32:13 -05:00
2015-05-11 10:50:17 -04:00
2015-05-12 18:43:55 -04:00
2015-05-14 01:10:05 -04:00
2015-04-24 20:51:40 +02:00
2015-05-14 01:10:05 -04:00
2015-05-14 01:10:05 -04:00
2015-05-09 22:15:31 -04:00
2015-04-21 16:16:04 -04:00
2015-02-03 11:06:34 -08:00
2015-04-26 17:33:59 -07:00
2015-02-03 11:06:45 -08:00
2015-04-23 14:36:28 -04:00
2015-05-05 17:10:11 -07:00
2014-10-25 08:07:30 +02:00
2015-04-14 16:48:59 -07:00
2015-02-13 21:21:39 -08:00
2014-12-10 21:30:20 -05:00
2014-07-29 18:08:50 -07:00
2015-04-07 19:11:06 -06:00
2014-11-04 16:43:08 +00:00
2015-03-03 14:42:56 -06:00
2015-04-14 19:35:44 -05:00
2015-01-15 17:23:17 +01:00
2015-03-26 12:14:56 -05:00
2015-03-03 14:42:55 -06:00
2015-04-14 19:23:24 -05:00
2015-03-11 17:56:28 -04:00
2015-03-09 23:50:20 -04:00
2015-03-03 14:42:57 -06:00
2014-11-04 13:29:38 +00:00
2015-03-13 09:45:24 -05:00
2014-10-29 16:33:14 -07:00
2015-04-24 08:46:18 -07:00
2014-09-18 09:53:25 -07:00
2015-03-06 12:39:48 +02:00
2014-07-29 12:38:07 +02:00
2014-11-27 12:51:04 +05:30
2015-04-14 16:49:05 -07:00
2015-01-14 15:07:32 +01:00
2015-02-11 17:06:02 -08:00
2015-02-11 17:06:07 -08:00
2014-12-13 12:42:48 -08:00
2015-04-15 16:35:19 -07:00
2014-11-13 16:17:05 -08:00
2014-12-29 12:45:45 -08:00
2014-11-13 10:35:25 -07:00
2015-05-27 14:19:44 -04:00
2015-04-08 16:25:25 -05:00
2015-04-09 14:20:11 -05:00
2015-04-16 13:53:32 -05:00
2014-09-08 09:51:29 +09:00
2014-12-13 12:42:53 -08:00
2015-01-06 10:26:10 -05:00
2014-11-21 11:19:15 -05:00
2015-04-02 17:14:17 +02:00
2015-01-09 11:12:28 +01:00
2015-04-12 21:03:31 +02:00
2015-04-03 15:08:20 -04:00
2015-05-27 00:27:35 -04:00
2015-01-25 23:17:28 -05:00
2014-10-08 10:39:33 +05:30
2015-03-16 23:49:03 +01:00
2014-11-20 14:45:15 +01:00
2014-11-07 01:46:51 +01:00
2015-03-22 22:19:12 +01:00
2014-11-29 23:53:20 +01:00
2014-12-04 00:46:58 +01:00
2014-12-12 15:26:48 -08:00
2015-03-18 15:54:27 +01:00
2015-03-22 22:14:12 +01:00
2014-10-19 20:22:32 +03:00
2015-03-18 22:39:16 +01:00
2015-03-13 23:15:52 +01:00
2015-04-15 16:35:23 -07:00
2014-09-17 16:33:11 -04:00
2014-12-10 21:30:20 -05:00
2015-04-03 23:23:51 +02:00
2014-09-08 09:51:30 +09:00
2015-01-16 16:01:10 -08:00
2015-03-23 14:06:10 +11:00
2015-03-31 12:01:19 -04:00
2014-12-10 17:41:10 -08:00
2014-12-22 20:17:23 +00:00
2014-10-28 16:48:02 -04:00
2015-03-11 15:15:11 -05:00
2015-03-18 21:55:08 +01:00
2015-03-16 10:26:41 +01:00
2014-08-24 18:36:01 -07:00
2014-12-13 12:42:52 -08:00
2014-10-14 02:18:21 +02:00
2015-02-17 14:34:52 -08:00
2015-01-06 11:01:13 -08:00
2015-03-20 08:31:01 -07:00
2015-01-15 23:34:34 -08:00
2015-01-15 23:34:34 -08:00
2015-04-15 16:35:23 -07:00
2015-01-27 13:13:04 +00:00
2015-03-12 10:43:26 +02:00
2014-10-20 10:11:29 +02:00
2014-10-20 10:11:29 +02:00
2015-02-05 15:09:25 +01:00
2015-05-16 18:08:26 -04:00
2014-11-10 16:45:43 -05:00
2014-08-08 15:57:24 -07:00
2015-04-15 16:35:19 -07:00
2015-04-03 08:18:24 +02:00
2015-05-14 01:10:05 -04:00
2014-08-13 10:32:03 +02:00
2014-08-08 15:57:26 -07:00
2015-04-27 15:49:30 +02:00
2014-10-09 22:26:04 -04:00
2014-09-03 14:58:17 -07:00
2015-04-15 09:00:47 -07:00
2015-02-13 21:21:39 -08:00
2015-02-13 21:21:39 -08:00
2015-02-24 08:44:16 +01:00
2014-08-28 11:59:38 +05:30
2015-03-26 18:18:20 +01:00
2014-11-06 14:57:24 -08:00
2015-04-10 14:39:53 +02:00
2015-01-09 14:25:39 -08:00
2015-02-23 16:12:24 +05:30
2014-08-08 15:57:26 -07:00
2014-08-08 15:57:31 -07:00
2015-02-12 18:54:09 -08:00
2014-10-14 02:18:20 +02:00
2015-05-25 00:06:59 -04:00
2015-02-12 18:54:09 -08:00
2015-04-14 16:48:59 -07:00
2015-02-13 21:21:41 -08:00
2015-04-20 09:08:49 -07:00
2015-03-06 23:07:20 +01:00
2015-03-11 21:55:28 -04:00
2015-04-11 15:53:35 -04:00
2015-01-03 14:32:57 -05:00
2015-01-03 14:32:57 -05:00
2015-01-03 14:32:57 -05:00
2014-11-26 19:33:57 -08:00
2015-03-03 11:16:47 -08:00
2015-04-14 09:50:27 -07:00
2015-03-17 09:25:28 +01:00
2015-05-30 17:04:36 -07:00
2015-04-16 19:02:04 -04:00
2015-02-13 21:21:35 -08:00
2015-02-13 23:49:36 +01:00
2014-12-10 17:41:09 -08:00
2015-04-15 16:35:17 -07:00
2015-02-12 18:54:08 -08:00
2015-01-27 09:38:00 +00:00
2015-04-17 09:04:07 -04:00
2015-03-25 13:28:58 +01:00
2014-11-17 10:28:04 -08:00
2014-09-27 09:14:59 -06:00
2015-05-23 01:22:35 -04:00
2015-02-24 14:40:42 -04:00
2015-02-03 15:48:51 -08:00
2015-04-03 08:44:37 +02:00
2015-01-22 12:28:02 +01:00
2015-01-02 16:47:35 -05:00
2015-03-27 09:45:07 +01:00
2015-04-03 08:18:34 +02:00
2014-10-09 22:25:51 -04:00
2014-09-16 13:41:06 -07:00
2014-07-29 23:10:56 +02:00
2014-11-19 22:01:15 -05:00
2015-02-03 12:48:43 -05:00
2014-08-06 13:03:43 +02:00
2015-04-08 09:39:56 -04:00
2014-09-23 21:19:35 -07:00
2015-05-10 19:26:37 +02:00
2015-04-15 16:35:22 -07:00
2015-03-18 22:00:34 -04:00
2015-05-14 17:55:51 -07:00
2014-11-07 10:09:07 -08:00
2015-04-11 22:29:44 -04:00
2014-10-22 16:14:04 -06:00
2015-04-28 12:48:57 +02:00
2015-04-07 12:58:35 -05:00
2014-12-17 12:31:40 -08:00
2015-05-05 17:10:11 -07:00
2014-12-04 14:31:00 -05:00
2014-11-28 16:08:16 +01:00
2015-04-14 18:06:47 -07:00
2014-09-18 19:21:20 -04:00
2015-04-07 11:14:38 -06:00
2014-12-09 12:05:24 +02:00
2015-04-01 14:37:14 +10:30
2015-01-23 14:57:10 +10:30
2015-04-13 21:04:16 +09:30
2015-04-15 12:41:14 +09:30
2014-12-13 12:42:48 -08:00
2015-03-12 18:46:08 -07:00
2015-03-06 17:03:22 -08:00
2015-02-04 01:34:14 -05:00
2014-12-15 23:49:28 +02:00
2015-02-02 10:09:54 -08:00
2015-02-12 14:30:53 -08:00
2015-04-02 17:33:15 +02:00
2015-03-24 09:48:14 -07:00
2015-03-09 09:22:28 -04:00
2015-03-17 12:23:32 -04:00
2014-08-06 18:01:23 -07:00
2014-08-08 15:57:26 -07:00
2015-02-12 18:54:12 -08:00
2015-04-15 16:35:20 -07:00