diff options
Diffstat (limited to 'net/socket.c')
-rw-r--r-- | net/socket.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/socket.c b/net/socket.c index b91949168a87..270f28264cb1 100644 --- a/net/socket.c +++ b/net/socket.c | |||
@@ -2697,8 +2697,7 @@ EXPORT_SYMBOL(sock_unregister); | |||
2697 | 2697 | ||
2698 | bool sock_is_registered(int family) | 2698 | bool sock_is_registered(int family) |
2699 | { | 2699 | { |
2700 | return family < NPROTO && | 2700 | return family < NPROTO && rcu_access_pointer(net_families[family]); |
2701 | rcu_access_pointer(net_families[array_index_nospec(family, NPROTO)]); | ||
2702 | } | 2701 | } |
2703 | 2702 | ||
2704 | static int __init sock_init(void) | 2703 | static int __init sock_init(void) |