lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180331083632.zufg2gzgjsyemcsq@gmail.com>
Date:   Sat, 31 Mar 2018 10:36:32 +0200
From:   Ingo Molnar <mingo@...nel.org>
To:     Alexey Dobriyan <adobriyan@...il.com>
Cc:     peterz@...radead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] refcount: trim headers


* Alexey Dobriyan <adobriyan@...il.com> wrote:

> kernel.h is not needed, but compiler.h is.
> 
> mutex.h is not needed only a forward declaration.
> 
> spinlock.h is not needed, spinlock_types.h is enough.
> 
> Signed-off-by: Alexey Dobriyan <adobriyan@...il.com>
> ---
> 
>  include/linux/refcount.h |    7 ++++---
>  lib/refcount.c           |    2 ++
>  2 files changed, 6 insertions(+), 3 deletions(-)
> 
> --- a/include/linux/refcount.h
> +++ b/include/linux/refcount.h
> @@ -3,9 +3,10 @@
>  #define _LINUX_REFCOUNT_H
>  
>  #include <linux/atomic.h>
> -#include <linux/mutex.h>
> -#include <linux/spinlock.h>
> -#include <linux/kernel.h>
> +#include <linux/compiler.h>
> +#include <linux/spinlock_types.h>
> +
> +struct mutex;
>  
>  /**
>   * struct refcount_t - variant of atomic_t specialized for reference counts
> --- a/lib/refcount.c
> +++ b/lib/refcount.c
> @@ -35,7 +35,9 @@
>   *
>   */
>  
> +#include <linux/mutex.h>
>  #include <linux/refcount.h>
> +#include <linux/spinlock.h>
>  #include <linux/bug.h>

Doesn't build on x86-64 defconfig...

Thanks,

	Ingo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ