diff options
Diffstat (limited to 'include/net/inet_hashtables.h')
-rw-r--r-- | include/net/inet_hashtables.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/include/net/inet_hashtables.h b/include/net/inet_hashtables.h index ec7ee2e46d8c..f44bb5c77a70 100644 --- a/include/net/inet_hashtables.h +++ b/include/net/inet_hashtables.h | |||
@@ -99,9 +99,16 @@ struct inet_bind_hashbucket { | |||
99 | struct hlist_head chain; | 99 | struct hlist_head chain; |
100 | }; | 100 | }; |
101 | 101 | ||
102 | /* | ||
103 | * Sockets can be hashed in established or listening table | ||
104 | * We must use different 'nulls' end-of-chain value for listening | ||
105 | * hash table, or we might find a socket that was closed and | ||
106 | * reallocated/inserted into established hash table | ||
107 | */ | ||
108 | #define LISTENING_NULLS_BASE (1U << 29) | ||
102 | struct inet_listen_hashbucket { | 109 | struct inet_listen_hashbucket { |
103 | spinlock_t lock; | 110 | spinlock_t lock; |
104 | struct hlist_head head; | 111 | struct hlist_nulls_head head; |
105 | }; | 112 | }; |
106 | 113 | ||
107 | /* This is for listening sockets, thus all sockets which possess wildcards. */ | 114 | /* This is for listening sockets, thus all sockets which possess wildcards. */ |