linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [bug report] attr: handle idmapped mounts
@ 2021-01-28 11:21 Dan Carpenter
  2021-01-28 11:31 ` [whitespace] " Christian Brauner
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2021-01-28 11:21 UTC (permalink / raw)
  To: christian.brauner; +Cc: linux-fsdevel, lkp, kbuild

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/20210121131959.646623-8-christian.brauner@ubuntu.com/
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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [whitespace] attr: handle idmapped mounts
  2021-01-28 11:21 [bug report] attr: handle idmapped mounts Dan Carpenter
@ 2021-01-28 11:31 ` Christian Brauner
  0 siblings, 0 replies; 2+ messages in thread
From: Christian Brauner @ 2021-01-28 11:31 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: linux-fsdevel, lkp, kbuild

On Thu, Jan 28, 2021 at 02:21:02PM +0300, Dan Carpenter wrote:
> 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.

Thanks. Must've sneaked in despite clang-format. Will likely fix in a
separate commit. I don't want to rebase because of this.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-01-28 11:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-28 11:21 [bug report] attr: handle idmapped mounts Dan Carpenter
2021-01-28 11:31 ` [whitespace] " Christian Brauner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).