Files
kernel_arpi/include/linux
Eric Dumazet 0a0ee9f2d5 tcp/dccp: fix possible race __inet_lookup_established()
[ Upstream commit 8dbd76e79a ]

Michal Kubecek and Firo Yang did a very nice analysis of crashes
happening in __inet_lookup_established().

Since a TCP socket can go from TCP_ESTABLISH to TCP_LISTEN
(via a close()/socket()/listen() cycle) without a RCU grace period,
I should not have changed listeners linkage in their hash table.

They must use the nulls protocol (Documentation/RCU/rculist_nulls.txt),
so that a lookup can detect a socket in a hash list was moved in
another one.

Since we added code in commit d296ba60d8 ("soreuseport: Resolve
merge conflict for v4/v6 ordering fix"), we have to add
hlist_nulls_add_tail_rcu() helper.

Fixes: 3b24d854cb ("tcp/dccp: do not touch listener sk_refcnt under synflood")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Michal Kubecek <mkubecek@suse.cz>
Reported-by: Firo Yang <firo.yang@suse.com>
Reviewed-by: Michal Kubecek <mkubecek@suse.cz>
Link: https://lore.kernel.org/netdev/20191120083919.GH27852@unicorn.suse.cz/
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-01-04 19:19:13 +01:00
..
2019-09-17 10:27:46 -07:00
2019-09-16 09:56:27 -07:00
2019-12-17 19:56:49 +01:00
2019-08-20 22:09:52 +02:00
2019-08-28 21:17:12 -06:00
2019-09-05 19:52:33 -06:00
2019-12-17 19:55:30 +01:00
2019-11-29 10:10:13 +01:00
2019-09-05 11:40:54 +02:00
2019-09-24 15:54:08 -07:00
2019-10-02 06:36:50 -07:00
2019-09-07 04:28:05 -03:00
2019-12-13 08:42:53 +01:00
2019-09-02 11:43:54 +01:00
2019-09-05 12:32:05 +02:00
2019-12-13 08:43:18 +01:00
2019-08-23 16:39:26 +01:00
2019-11-29 10:10:13 +01:00
2019-10-31 14:01:40 -07:00
2019-09-25 17:51:41 -07:00
2019-09-07 21:42:25 +02:00
2019-10-02 10:06:45 +02:00
2019-08-30 07:27:17 -07:00
2019-08-20 17:05:05 +02:00
2019-10-14 15:04:01 -07:00