24 lines
594 B
Diff
24 lines
594 B
Diff
From: Ben Hutchings <ben@decadent.org.uk>
|
|
Date: Tue, 14 Mar 2017 21:35:33 +0000
|
|
Subject: userns: Avoid ABI change for CVE-2017-6874 fix
|
|
|
|
The type of ucounts::count changed from atomic_t to int. But they're
|
|
the same size, and it's only accessed within kernel/ucount.c, so hide
|
|
the change from genksyms.
|
|
|
|
---
|
|
--- a/include/linux/user_namespace.h
|
|
+++ b/include/linux/user_namespace.h
|
|
@@ -65,7 +65,11 @@ struct ucounts {
|
|
struct hlist_node node;
|
|
struct user_namespace *ns;
|
|
kuid_t uid;
|
|
+#ifdef __GENKSYMS__
|
|
+ atomic_t count;
|
|
+#else
|
|
int count;
|
|
+#endif
|
|
atomic_t ucount[UCOUNT_COUNTS];
|
|
};
|
|
|