Alexei Starovoitov
4fe8435909
bpf: convert htab map to hlist_nulls
...
when all map elements are pre-allocated one cpu can delete and reuse htab_elem
while another cpu is still walking the hlist. In such case the lookup may
miss the element. Convert hlist to hlist_nulls to avoid such scenario.
When bucket lock is taken there is no need to take such precautions,
so only convert map_lookup and map_get_next to nulls.
The race window is extremely small and only reproducible with explicit
udelay() inside lookup_nulls_elem_raw()
Similar to hlist add hlist_nulls_for_each_entry_safe() and
hlist_nulls_entry_safe() helpers.
Fixes: 6c90598174
("bpf: pre-allocate hash map elements")
Reported-by: Jonathan Perry <jonperry@fb.com >
Signed-off-by: Alexei Starovoitov <ast@kernel.org >
Acked-by: Daniel Borkmann <daniel@iogearbox.net >
Signed-off-by: David S. Miller <davem@davemloft.net >
2017-03-09 13:27:17 -08:00
..
2017-03-09 13:27:17 -08:00
2017-03-03 01:45:39 +01:00
2017-02-27 18:43:46 -08:00
2017-03-02 08:42:34 +01:00
2017-03-02 08:42:36 +01:00
2016-07-15 14:54:27 +09:00
2017-03-02 08:42:40 +01:00
2016-08-26 14:42:08 +02:00
2017-03-02 08:42:35 +01:00
2017-03-03 10:16:38 -08:00
2017-03-02 08:42:36 +01:00
2017-03-02 08:42:34 +01:00
2017-03-03 01:45:22 +01:00
2017-03-02 08:42:40 +01:00
2017-03-02 08:42:38 +01:00
2017-03-02 08:42:39 +01:00
2016-12-17 18:44:00 -08:00
2017-01-05 23:06:06 -08:00
2016-12-17 18:44:00 -08:00
2017-02-21 13:25:50 -08:00
2017-02-21 13:25:50 -08:00
2016-11-29 15:10:12 -05:00
2017-02-21 13:25:50 -08:00
2017-01-12 07:01:56 -07:00
2016-12-24 11:46:01 -08:00
2016-12-24 11:46:01 -08:00
2017-03-02 08:42:35 +01:00
2017-03-02 08:42:28 +01:00
2017-03-02 08:42:39 +01:00
2017-03-02 08:42:39 +01:00
2017-02-22 10:15:09 -08:00
2017-03-03 01:43:46 +01:00
2016-07-28 16:07:41 -07:00
2016-12-24 11:46:01 -08:00
2017-03-02 08:42:28 +01:00
2016-12-24 11:46:01 -08:00
2017-03-02 08:42:34 +01:00
2017-02-27 13:26:17 -08:00
2017-02-17 13:40:05 -05:00
2016-10-25 11:31:51 +02:00
2016-12-20 09:48:47 -08:00
2017-02-22 17:33:34 -08:00
2016-12-20 09:48:44 -08:00
2016-11-30 23:14:57 +11:00
2016-08-02 19:35:27 -04:00
2017-03-02 08:42:39 +01:00
2017-02-22 10:30:38 -08:00
2017-02-24 17:46:56 -08:00
2017-03-02 08:42:35 +01:00
2017-03-02 08:42:39 +01:00
2016-12-27 14:49:05 -05:00
2017-01-23 11:32:16 -08:00
2017-02-24 17:46:53 -08:00
2017-02-22 17:08:33 -08:00
2017-02-24 17:46:56 -08:00
2016-10-25 11:08:10 +08:00
2017-03-02 08:42:34 +01:00
2017-03-02 08:42:37 +01:00
2017-03-02 08:42:35 +01:00
2017-03-02 08:42:39 +01:00
2017-03-02 08:42:35 +01:00
2017-02-27 18:43:47 -08:00
2017-03-02 08:42:36 +01:00
2017-03-02 08:42:39 +01:00
2017-03-02 08:42:26 +01:00
2017-03-02 08:42:35 +01:00
2016-10-21 15:45:47 -06:00
2017-02-08 08:21:31 +01:00
2016-11-16 10:15:09 +01:00
2016-12-22 22:58:37 -05:00
2017-03-02 08:42:39 +01:00
2016-12-14 16:04:07 -08:00
2017-03-02 08:42:28 +01:00
2016-08-02 19:35:02 -04:00
2016-11-15 10:54:36 -05:00
2017-03-02 08:42:27 +01:00
2017-03-02 08:42:35 +01:00
2017-03-02 08:42:39 +01:00
2017-03-02 08:42:31 +01:00
2017-03-02 08:42:31 +01:00
2016-09-05 13:52:39 +02:00
2017-03-02 08:42:29 +01:00
2017-03-02 08:42:29 +01:00
2017-03-03 01:45:36 +01:00
2017-03-02 08:42:38 +01:00
2017-03-02 08:42:34 +01:00
2017-03-02 08:42:34 +01:00
2017-02-10 11:15:08 +01:00