Re: [PATCH] Fix memset in NFS zap caches

2012-09-03 Thread Myklebust, Trond
On Mon, 2012-09-03 at 14:52 -0400, Trond Myklebust wrote: > On Mon, 2012-09-03 at 20:47 +0200, Andi Kleen wrote: > > > No, this is a gcc bug. > > > > > > NFS_COOKIEVERF(inode) resolves to an array, so the current code is > > > correct. The above change will cause the 2nd half of the array to remai

Re: [PATCH] Fix memset in NFS zap caches

2012-09-03 Thread Myklebust, Trond
On Mon, 2012-09-03 at 20:47 +0200, Andi Kleen wrote: > > No, this is a gcc bug. > > > > NFS_COOKIEVERF(inode) resolves to an array, so the current code is > > correct. The above change will cause the 2nd half of the array to remain > > uninitialised... > > Are you sure? > > include/linux/nfs_fs.

Re: [PATCH] Fix memset in NFS zap caches

2012-09-03 Thread Andi Kleen
> No, this is a gcc bug. > > NFS_COOKIEVERF(inode) resolves to an array, so the current code is > correct. The above change will cause the 2nd half of the array to remain > uninitialised... Are you sure? include/linux/nfs_fs.h:268:static inline __be32 *NFS_COOKIEVERF(const struct inode *inode)

Re: [PATCH] Fix memset in NFS zap caches

2012-09-03 Thread Myklebust, Trond
On Mon, 2012-09-03 at 20:35 +0200, Andi Kleen wrote: > Fix memset in nfs_zap_caches_locked > > This memset overruns the buffer by 4 bytes on 64bit systems. > > gcc 4.8 correct complains: > > /backup/lsrc/git/linux-lto-2.6/fs/nfs/inode.c: In function > 'nfs_zap_caches_locked': > /backup/lsrc/git/