public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [bug report] xfs: introduce v5 inode group structure
@ 2019-07-24  8:11 Dan Carpenter
  2019-07-24 15:19 ` Darrick J. Wong
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2019-07-24  8:11 UTC (permalink / raw)
  To: darrick.wong; +Cc: linux-xfs

Hello Darrick J. Wong,

The patch 5f19c7fc6873: "xfs: introduce v5 inode group structure"
from Jul 3, 2019, leads to the following static checker warning:

	fs/xfs/xfs_ioctl.c:738 xfs_fsinumbers_fmt()
	warn: check that 'ig1' doesn't leak information (struct has a hole after 'xi_alloccount')

fs/xfs/xfs_ioctl.c
   730  int
   731  xfs_fsinumbers_fmt(
   732          struct xfs_ibulk                *breq,
   733          const struct xfs_inumbers       *igrp)
   734  {
   735          struct xfs_inogrp               ig1;
   736  
   737          xfs_inumbers_to_inogrp(&ig1, igrp);

The xfs_inumbers_to_inogrp() call doesn't clear the struct hole.

   738          if (copy_to_user(breq->ubuffer, &ig1, sizeof(struct xfs_inogrp)))
   739                  return -EFAULT;
   740          return xfs_ibulk_advance(breq, sizeof(struct xfs_inogrp));
   741  }

regards,
dan carpenter

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

end of thread, other threads:[~2019-07-24 15:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-24  8:11 [bug report] xfs: introduce v5 inode group structure Dan Carpenter
2019-07-24 15:19 ` Darrick J. Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox