Re: [PATCH V2] xfs: fix string handling in get/set functions

2018-06-06 Thread Eric Sandeen
On 6/6/18 5:58 AM, Christoph Hellwig wrote: >> diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c >> index 82f7c83c1dad..596e176c19a6 100644 >> --- a/fs/xfs/xfs_ioctl.c >> +++ b/fs/xfs/xfs_ioctl.c >> @@ -1828,13 +1828,13 @@ xfs_ioc_getlabel( >> /* Paranoia */ >> BUILD_BUG_ON(sizeof(s

Re: [PATCH V2] xfs: fix string handling in get/set functions

2018-06-06 Thread Christoph Hellwig
> diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c > index 82f7c83c1dad..596e176c19a6 100644 > --- a/fs/xfs/xfs_ioctl.c > +++ b/fs/xfs/xfs_ioctl.c > @@ -1828,13 +1828,13 @@ xfs_ioc_getlabel( > /* Paranoia */ > BUILD_BUG_ON(sizeof(sbp->sb_fname) > FSLABEL_MAX); > > + /* 1 large

Re: [PATCH V2] xfs: fix string handling in get/set functions

2018-06-05 Thread Darrick J. Wong
On Tue, Jun 05, 2018 at 02:49:20PM -0500, Eric Sandeen wrote: > From: Arnd Bergmann > > [sandeen: fix subject, avoid copy-out of uninit data in getlabel] > > gcc-8 reports two warnings for the newly added getlabel/setlabel code: > > fs/xfs/xfs_ioctl.c: In function 'xfs_ioc_getlabel': > fs/xfs/x

Re: [PATCH V2] xfs: fix string handling in get/set functions

2018-06-05 Thread Martin Sebor
On 06/05/2018 01:49 PM, Eric Sandeen wrote: From: Arnd Bergmann [sandeen: fix subject, avoid copy-out of uninit data in getlabel] gcc-8 reports two warnings for the newly added getlabel/setlabel code: fs/xfs/xfs_ioctl.c: In function 'xfs_ioc_getlabel': fs/xfs/xfs_ioctl.c:1822:38: error: argum

[PATCH V2] xfs: fix string handling in get/set functions

2018-06-05 Thread Eric Sandeen
From: Arnd Bergmann [sandeen: fix subject, avoid copy-out of uninit data in getlabel] gcc-8 reports two warnings for the newly added getlabel/setlabel code: fs/xfs/xfs_ioctl.c: In function 'xfs_ioc_getlabel': fs/xfs/xfs_ioctl.c:1822:38: error: argument to 'sizeof' in 'strncpy' call is the same