Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

dccp Remove inet_hashinfo2_init_mod().

Commit c92c81df93df ("net: dccp: fix kernel crash on module load")
added inet_hashinfo2_init_mod() for DCCP.

Commit 22d6c9eebf2e ("net: Unexport shared functions for DCCP.")
removed EXPORT_SYMBOL_GPL() it but forgot to remove the function
itself.

Let's remove inet_hashinfo2_init_mod().

Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com>
Link: https://patch.msgid.link/20260301063756.1581685-1-kuniyu@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Kuniyuki Iwashima and committed by
Jakub Kicinski
425e080a cd994652

+8 -27
-1
include/net/inet_hashtables.h
··· 286 286 unsigned long numentries, int scale, 287 287 unsigned long low_limit, 288 288 unsigned long high_limit); 289 - int inet_hashinfo2_init_mod(struct inet_hashinfo *h); 290 289 291 290 bool inet_ehash_insert(struct sock *sk, struct sock *osk, bool *found_dup_sk); 292 291 bool inet_ehash_nolisten(struct sock *sk, struct sock *osk,
+8 -26
net/ipv4/inet_hashtables.c
··· 1246 1246 __inet_check_established); 1247 1247 } 1248 1248 1249 - static void init_hashinfo_lhash2(struct inet_hashinfo *h) 1250 - { 1251 - int i; 1252 - 1253 - for (i = 0; i <= h->lhash2_mask; i++) { 1254 - spin_lock_init(&h->lhash2[i].lock); 1255 - INIT_HLIST_NULLS_HEAD(&h->lhash2[i].nulls_head, 1256 - i + LISTENING_NULLS_BASE); 1257 - } 1258 - } 1259 - 1260 1249 void __init inet_hashinfo2_init(struct inet_hashinfo *h, const char *name, 1261 1250 unsigned long numentries, int scale, 1262 1251 unsigned long low_limit, 1263 1252 unsigned long high_limit) 1264 1253 { 1254 + unsigned int i; 1255 + 1265 1256 h->lhash2 = alloc_large_system_hash(name, 1266 1257 sizeof(*h->lhash2), 1267 1258 numentries, ··· 1262 1271 &h->lhash2_mask, 1263 1272 low_limit, 1264 1273 high_limit); 1265 - init_hashinfo_lhash2(h); 1274 + 1275 + for (i = 0; i <= h->lhash2_mask; i++) { 1276 + spin_lock_init(&h->lhash2[i].lock); 1277 + INIT_HLIST_NULLS_HEAD(&h->lhash2[i].nulls_head, 1278 + i + LISTENING_NULLS_BASE); 1279 + } 1266 1280 1267 1281 /* this one is used for source ports of outgoing connections */ 1268 1282 table_perturb = alloc_large_system_hash("Table-perturb", ··· 1276 1280 0, 0, NULL, NULL, 1277 1281 INET_TABLE_PERTURB_SIZE, 1278 1282 INET_TABLE_PERTURB_SIZE); 1279 - } 1280 - 1281 - int inet_hashinfo2_init_mod(struct inet_hashinfo *h) 1282 - { 1283 - h->lhash2 = kmalloc_objs(*h->lhash2, INET_LHTABLE_SIZE); 1284 - if (!h->lhash2) 1285 - return -ENOMEM; 1286 - 1287 - h->lhash2_mask = INET_LHTABLE_SIZE - 1; 1288 - /* INET_LHTABLE_SIZE must be a power of 2 */ 1289 - BUG_ON(INET_LHTABLE_SIZE & h->lhash2_mask); 1290 - 1291 - init_hashinfo_lhash2(h); 1292 - return 0; 1293 1283 } 1294 1284 1295 1285 int inet_ehash_locks_alloc(struct inet_hashinfo *hashinfo)