diff mbox series

smack: include linux/watch_queue.h

Message ID 20190909204631.1076624-1-arnd@arndb.de (mailing list archive)
State New, archived
Headers show
Series smack: include linux/watch_queue.h | expand

Commit Message

Arnd Bergmann Sept. 9, 2019, 8:46 p.m. UTC
In some randconfig builds, the lack of an explicit #include
in smack_lsm.c causes a build failure:

security/smack/smack_lsm.c:4384:7: error: incomplete definition of type 'struct watch_notification'
        if (n->type == WATCH_TYPE_META)
            ~^
include/linux/device.h:46:8: note: forward declaration of 'struct watch_notification'
struct watch_notification;
       ^
security/smack/smack_lsm.c:4384:17: error: use of undeclared identifier 'WATCH_TYPE_META'
        if (n->type == WATCH_TYPE_META)

Fixes: 5301fef8ca60 ("smack: Implement the watch_key and post_notification hooks [untested]")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 security/smack/smack_lsm.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Casey Schaufler Sept. 23, 2019, 9:50 p.m. UTC | #1
On 9/9/2019 1:46 PM, Arnd Bergmann wrote:
> In some randconfig builds, the lack of an explicit #include
> in smack_lsm.c causes a build failure:

What tree/branch are you working with? I don't see this.

>
> security/smack/smack_lsm.c:4384:7: error: incomplete definition of type 'struct watch_notification'
>         if (n->type == WATCH_TYPE_META)
>             ~^
> include/linux/device.h:46:8: note: forward declaration of 'struct watch_notification'
> struct watch_notification;
>        ^
> security/smack/smack_lsm.c:4384:17: error: use of undeclared identifier 'WATCH_TYPE_META'
>         if (n->type == WATCH_TYPE_META)
>
> Fixes: 5301fef8ca60 ("smack: Implement the watch_key and post_notification hooks [untested]")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  security/smack/smack_lsm.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c
> index a15e76489683..5120dd9c6335 100644
> --- a/security/smack/smack_lsm.c
> +++ b/security/smack/smack_lsm.c
> @@ -42,6 +42,7 @@
>  #include <linux/parser.h>
>  #include <linux/fs_context.h>
>  #include <linux/fs_parser.h>
> +#include <linux/watch_queue.h>
>  #include "smack.h"
>  
>  #define TRANS_TRUE	"TRUE"
Arnd Bergmann Sept. 24, 2019, 1:24 a.m. UTC | #2
On Mon, Sep 23, 2019 at 2:50 PM Casey Schaufler <casey@schaufler-ca.com> wrote:
>
> On 9/9/2019 1:46 PM, Arnd Bergmann wrote:
> > In some randconfig builds, the lack of an explicit #include
> > in smack_lsm.c causes a build failure:
>
> What tree/branch are you working with? I don't see this.

It was in the latest linux-next at the time I posted the patch. It's
possible that
the patch causing the problem got removed in the meantime.

      Arnd
diff mbox series

Patch

diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c
index a15e76489683..5120dd9c6335 100644
--- a/security/smack/smack_lsm.c
+++ b/security/smack/smack_lsm.c
@@ -42,6 +42,7 @@ 
 #include <linux/parser.h>
 #include <linux/fs_context.h>
 #include <linux/fs_parser.h>
+#include <linux/watch_queue.h>
 #include "smack.h"
 
 #define TRANS_TRUE	"TRUE"