Skip to contentSkip to conversation

userns: do not export uidhash_table

PATCH New Ben Dooks 1 participant 1 message Oct 15, 2019

lore
Share & tools
lore

Ben Dooks

author
#0 lore raw

PATCH 1/1 userns: do not export uidhash_table

The uidhash_table is not exported from this file, so make it static to avoid the following sparse warning:

kernel/user.c:85:19: warning: symbol 'uidhash_table' was not declared. Should it be static?

---
Cc: [email protected]

---
 kernel/user.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/user.c +1 -1
index 5235d7f49982..b1635d94a1f2 100644
@@ -82,7 +82,7 @@ EXPORT_SYMBOL_GPL(init_user_ns);
 #define uidhashentry(uid)	(uidhash_table + __uidhashfn((__kuid_val(uid))))
 
 static struct kmem_cache *uid_cachep;
-struct hlist_head uidhash_table[UIDHASH_SZ];
+static struct hlist_head uidhash_table[UIDHASH_SZ];
 
 /*
  * The uidhash_lock is mostly taken from process context, but it is
Signature · 1 line
2.23.0