[bug report] xfs: introduce v5 inode group structure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux