Re: [PATCH] x86/refcount: Implement fast refcount_t handling
From: Peter Zijlstra
Date: Mon Apr 24 2017 - 06:49:16 EST
On Fri, Apr 21, 2017 at 03:09:39PM -0700, Kees Cook wrote:
> diff --git a/drivers/misc/lkdtm_bugs.c b/drivers/misc/lkdtm_bugs.c
> index e3f4cd8876b5..1bdafb29b802 100644
> --- a/drivers/misc/lkdtm_bugs.c
> +++ b/drivers/misc/lkdtm_bugs.c
> @@ -135,9 +135,15 @@ void lkdtm_HUNG_TASK(void)
> schedule();
> }
>
> +#ifdef CONFIG_FAST_REFCOUNT
> +#define REFCOUNT_MAX INT_MAX
> +#else
> +#define REFCOUNT_MAX UINT_MAX
> +#endif
That doesn't seem like a sensible place for this.