mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-04 05:46:46 +07:00
Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfs
* 'for-linus' of git://oss.sgi.com/xfs/xfs: xfs: check if device support discard in xfs_ioc_trim() xfs: prevent leaking uninitialized stack memory in FSGEOMETRY_V1
This commit is contained in:
commit
13d1ea9a20
@ -152,6 +152,8 @@ xfs_ioc_trim(
|
|||||||
|
|
||||||
if (!capable(CAP_SYS_ADMIN))
|
if (!capable(CAP_SYS_ADMIN))
|
||||||
return -XFS_ERROR(EPERM);
|
return -XFS_ERROR(EPERM);
|
||||||
|
if (!blk_queue_discard(q))
|
||||||
|
return -XFS_ERROR(EOPNOTSUPP);
|
||||||
if (copy_from_user(&range, urange, sizeof(range)))
|
if (copy_from_user(&range, urange, sizeof(range)))
|
||||||
return -XFS_ERROR(EFAULT);
|
return -XFS_ERROR(EFAULT);
|
||||||
|
|
||||||
|
@ -53,6 +53,9 @@ xfs_fs_geometry(
|
|||||||
xfs_fsop_geom_t *geo,
|
xfs_fsop_geom_t *geo,
|
||||||
int new_version)
|
int new_version)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
memset(geo, 0, sizeof(*geo));
|
||||||
|
|
||||||
geo->blocksize = mp->m_sb.sb_blocksize;
|
geo->blocksize = mp->m_sb.sb_blocksize;
|
||||||
geo->rtextsize = mp->m_sb.sb_rextsize;
|
geo->rtextsize = mp->m_sb.sb_rextsize;
|
||||||
geo->agblocks = mp->m_sb.sb_agblocks;
|
geo->agblocks = mp->m_sb.sb_agblocks;
|
||||||
|
Loading…
Reference in New Issue
Block a user