Hello Christian Brauner,

The patch 2f221d6f7b88: "attr: handle idmapped mounts" from Jan 21,
2021, leads to the following static checker warning:

        fs/attr.c:129 setattr_prepare()
        warn: inconsistent indenting

fs/attr.c
   124          /* Make sure a caller can chmod. */
   125          if (ia_valid & ATTR_MODE) {
   126                  if (!inode_owner_or_capable(mnt_userns, inode))
   127                          return -EPERM;
   128                  /* Also check the setgid bit! */
   129                 if (!in_group_p((ia_valid & ATTR_GID) ? attr->ia_gid :
      ^^^^^^^^^^^^^^^^^
The patch accidentally swapped tabs for spaces.

The kbuild-bot is supposed to warn about these, but I searched on the
lore.kernel.org thread and didn't see a warning.
https://lore.kernel.org/containers/[email protected]/
Presumably it is coming soon.

   130                                  i_gid_into_mnt(mnt_userns, inode)) &&
   131                      !capable_wrt_inode_uidgid(mnt_userns, inode, 
CAP_FSETID))
   132                          attr->ia_mode &= ~S_ISGID;
   133          }

regards,
dan carpenter
_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to