.. | .. |
---|
6 | 6 | #include "lkdtm.h" |
---|
7 | 7 | #include <linux/refcount.h> |
---|
8 | 8 | |
---|
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 | | - |
---|
17 | 9 | static void overflow_check(refcount_t *ref) |
---|
18 | 10 | { |
---|
19 | 11 | switch (refcount_read(ref)) { |
---|
.. | .. |
---|
127 | 119 | static void check_negative(refcount_t *ref, int start) |
---|
128 | 120 | { |
---|
129 | 121 | /* |
---|
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 |
---|
131 | 123 | * over-sub, so we have to track our starting position instead of |
---|
132 | 124 | * looking only at zero-pinning. |
---|
133 | 125 | */ |
---|
.. | .. |
---|
210 | 202 | |
---|
211 | 203 | /* |
---|
212 | 204 | * A refcount_inc() from zero should pin to zero or saturate and may WARN. |
---|
213 | | - * Only CONFIG_REFCOUNT_FULL provides this protection currently. |
---|
214 | 205 | */ |
---|
215 | 206 | void lkdtm_REFCOUNT_INC_ZERO(void) |
---|
216 | 207 | { |
---|