|
@@ -2690,7 +2690,8 @@ EXPORT_SYMBOL(sock_unregister);
|
|
|
|
|
|
bool sock_is_registered(int family)
|
|
bool sock_is_registered(int family)
|
|
{
|
|
{
|
|
- return family < NPROTO && rcu_access_pointer(net_families[family]);
|
|
|
|
|
|
+ return family < NPROTO &&
|
|
|
|
+ rcu_access_pointer(net_families[array_index_nospec(family, NPROTO)]);
|
|
}
|
|
}
|
|
|
|
|
|
static int __init sock_init(void)
|
|
static int __init sock_init(void)
|