hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/misc/lkdtm/refcount.c
....@@ -6,14 +6,6 @@
66 #include "lkdtm.h"
77 #include <linux/refcount.h>
88
9
-#ifdef CONFIG_REFCOUNT_FULL
10
-#define REFCOUNT_MAX (UINT_MAX - 1)
11
-#define REFCOUNT_SATURATED UINT_MAX
12
-#else
13
-#define REFCOUNT_MAX INT_MAX
14
-#define REFCOUNT_SATURATED (INT_MIN / 2)
15
-#endif
16
-
179 static void overflow_check(refcount_t *ref)
1810 {
1911 switch (refcount_read(ref)) {
....@@ -127,7 +119,7 @@
127119 static void check_negative(refcount_t *ref, int start)
128120 {
129121 /*
130
- * CONFIG_REFCOUNT_FULL refuses to move a refcount at all on an
122
+ * refcount_t refuses to move a refcount at all on an
131123 * over-sub, so we have to track our starting position instead of
132124 * looking only at zero-pinning.
133125 */
....@@ -210,7 +202,6 @@
210202
211203 /*
212204 * A refcount_inc() from zero should pin to zero or saturate and may WARN.
213
- * Only CONFIG_REFCOUNT_FULL provides this protection currently.
214205 */
215206 void lkdtm_REFCOUNT_INC_ZERO(void)
216207 {