Hi Alexey,

[auto build test WARNING on linus/master]
[also build test WARNING on v4.10-rc8 next-20170217]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:    
https://github.com/0day-ci/linux/commits/Alexey-Gladkov/Add-pidfs-filesystem/20170219-070129
config: x86_64-randconfig-x003-201708 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   In file included from include/uapi/linux/stddef.h:1:0,
                    from include/linux/stddef.h:4,
                    from include/uapi/linux/posix_types.h:4,
                    from include/uapi/linux/types.h:13,
                    from include/linux/types.h:5,
                    from include/uapi/linux/capability.h:16,
                    from include/linux/capability.h:15,
                    from include/linux/sched.h:15,
                    from include/linux/uaccess.h:4,
                    from fs/proc/root.c:9:
   fs/proc/root.c: In function 'proc_kill_sb':
   fs/proc/root.c:107:9: error: 'struct pid_namespace' has no member named 
'pidfs_self'; did you mean 'proc_self'?
      if (ns->pidfs_self)
            ^
   include/linux/compiler.h:149:30: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                 ^~~~
>> fs/proc/root.c:107:3: note: in expansion of macro 'if'
      if (ns->pidfs_self)
      ^~
   fs/proc/root.c:107:9: error: 'struct pid_namespace' has no member named 
'pidfs_self'; did you mean 'proc_self'?
      if (ns->pidfs_self)
            ^
   include/linux/compiler.h:149:42: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                             ^~~~
>> fs/proc/root.c:107:3: note: in expansion of macro 'if'
      if (ns->pidfs_self)
      ^~
   fs/proc/root.c:107:9: error: 'struct pid_namespace' has no member named 
'pidfs_self'; did you mean 'proc_self'?
      if (ns->pidfs_self)
            ^
   include/linux/compiler.h:160:16: note: in definition of macro '__trace_if'
      ______r = !!(cond);     \
                   ^~~~
>> fs/proc/root.c:107:3: note: in expansion of macro 'if'
      if (ns->pidfs_self)
      ^~
   fs/proc/root.c:108:11: error: 'struct pid_namespace' has no member named 
'pidfs_self'; did you mean 'proc_self'?
       dput(ns->pidfs_self);
              ^~
   In file included from include/uapi/linux/stddef.h:1:0,
                    from include/linux/stddef.h:4,
                    from include/uapi/linux/posix_types.h:4,
                    from include/uapi/linux/types.h:13,
                    from include/linux/types.h:5,
                    from include/uapi/linux/capability.h:16,
                    from include/linux/capability.h:15,
                    from include/linux/sched.h:15,
                    from include/linux/uaccess.h:4,
                    from fs/proc/root.c:9:
   fs/proc/root.c:110:9: error: 'struct pid_namespace' has no member named 
'pidfs_thread_self'; did you mean 'proc_thread_self'?
      if (ns->pidfs_thread_self)
            ^
   include/linux/compiler.h:149:30: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                 ^~~~
   fs/proc/root.c:110:3: note: in expansion of macro 'if'
      if (ns->pidfs_thread_self)
      ^~
   fs/proc/root.c:110:9: error: 'struct pid_namespace' has no member named 
'pidfs_thread_self'; did you mean 'proc_thread_self'?
      if (ns->pidfs_thread_self)
            ^
   include/linux/compiler.h:149:42: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                             ^~~~
   fs/proc/root.c:110:3: note: in expansion of macro 'if'
      if (ns->pidfs_thread_self)
      ^~
   fs/proc/root.c:110:9: error: 'struct pid_namespace' has no member named 
'pidfs_thread_self'; did you mean 'proc_thread_self'?
      if (ns->pidfs_thread_self)
            ^
   include/linux/compiler.h:160:16: note: in definition of macro '__trace_if'
      ______r = !!(cond);     \
                   ^~~~
   fs/proc/root.c:110:3: note: in expansion of macro 'if'
      if (ns->pidfs_thread_self)
      ^~
   fs/proc/root.c:111:11: error: 'struct pid_namespace' has no member named 
'pidfs_thread_self'; did you mean 'proc_thread_self'?
       dput(ns->pidfs_thread_self);
              ^~
   fs/proc/root.c: In function 'pid_ns_prepare_proc':
   fs/proc/root.c:282:5: error: 'struct pid_namespace' has no member named 
'pidfs_mnt'; did you mean 'proc_mnt'?
      ns->pidfs_mnt = mnt;
        ^~
   fs/proc/root.c: In function 'pid_ns_release_proc':
   fs/proc/root.c:292:18: error: 'struct pid_namespace' has no member named 
'pidfs_mnt'; did you mean 'proc_mnt'?
      kern_unmount(ns->pidfs_mnt);
                     ^~

vim +/if +107 fs/proc/root.c

     3   *
     4   *  Copyright (C) 1991, 1992 Linus Torvalds
     5   *
     6   *  proc root directory handling functions
     7   */
     8  
   > 9  #include <linux/uaccess.h>
    10  
    11  #include <linux/errno.h>
    12  #include <linux/time.h>
    13  #include <linux/proc_fs.h>
    14  #include <linux/stat.h>
    15  #include <linux/init.h>
    16  #include <linux/sched.h>
    17  #include <linux/module.h>
    18  #include <linux/bitops.h>
    19  #include <linux/user_namespace.h>
    20  #include <linux/mount.h>
    21  #include <linux/pid_namespace.h>
    22  #include <linux/parser.h>
    23  
    24  #include "internal.h"
    25  
    26  enum {
    27          Opt_gid, Opt_hidepid, Opt_err,
    28  };
    29  
    30  static const match_table_t tokens = {
    31          {Opt_hidepid, "hidepid=%u"},
    32          {Opt_gid, "gid=%u"},
    33          {Opt_err, NULL},
    34  };
    35  
    36  int proc_parse_options(char *options, struct pid_namespace *pid)
    37  {
    38          char *p;
    39          substring_t args[MAX_OPT_ARGS];
    40          int option;
    41  
    42          if (!options)
    43                  return 1;
    44  
    45          while ((p = strsep(&options, ",")) != NULL) {
    46                  int token;
    47                  if (!*p)
    48                          continue;
    49  
    50                  args[0].to = args[0].from = NULL;
    51                  token = match_token(p, tokens, args);
    52                  switch (token) {
    53                  case Opt_gid:
    54                          if (match_int(&args[0], &option))
    55                                  return 0;
    56                          pid->pid_gid = make_kgid(current_user_ns(), 
option);
    57                          break;
    58                  case Opt_hidepid:
    59                          if (match_int(&args[0], &option))
    60                                  return 0;
    61                          if (option < 0 || option > 2) {
    62                                  pr_err("proc: hidepid value must be 
between 0 and 2.\n");
    63                                  return 0;
    64                          }
    65                          pid->hide_pid = option;
    66                          break;
    67                  default:
    68                          pr_err("proc: unrecognized mount option \"%s\" "
    69                                 "or missing value\n", p);
    70                          return 0;
    71                  }
    72          }
    73  
    74          return 1;
    75  }
    76  
    77  int proc_remount(struct super_block *sb, int *flags, char *data)
    78  {
    79          struct pid_namespace *pid = sb->s_fs_info;
    80  
    81          sync_filesystem(sb);
    82          return !proc_parse_options(data, pid);
    83  }
    84  
    85  static struct dentry *proc_mount(struct file_system_type *fs_type,
    86          int flags, const char *dev_name, void *data)
    87  {
    88          struct pid_namespace *ns;
    89  
    90          if (flags & MS_KERNMOUNT) {
    91                  ns = data;
    92                  data = NULL;
    93          } else {
    94                  ns = task_active_pid_ns(current);
    95          }
    96  
    97          return mount_ns(fs_type, flags, data, ns, ns->user_ns, 
proc_fill_super);
    98  }
    99  
   100  static void proc_kill_sb(struct super_block *sb)
   101  {
   102          struct pid_namespace *ns;
   103  
   104          ns = (struct pid_namespace *)sb->s_fs_info;
   105  
   106          if (IS_ENABLED(CONFIG_PROC_PIDFS) && sb->s_type == 
&pidfs_fs_type) {
 > 107                  if (ns->pidfs_self)
   108                          dput(ns->pidfs_self);
   109  
   110                  if (ns->pidfs_thread_self)

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip

Reply via email to