lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LNX.2.00.1102142252540.4530@swampdragon.chaosbits.net>
Date:	Mon, 14 Feb 2011 22:56:33 +0100 (CET)
From:	Jesper Juhl <jj@...osbits.net>
To:	linux-nfs@...r.kernel.org
cc:	linux-kernel@...r.kernel.org,
	Trond Myklebust <Trond.Myklebust@...app.com>
Subject: [PATCH] NFS: Zap entire 'struct inode' in nfs_zap_caches_locked().

nfs_zap_caches_locked() attempts to zero all of the 'struct inode' that's 
passed in via the pointer variable 'inode'. Unfortunately it only manages 
to zero the size of a 'pointer to struct inode'. Fix that.

Signed-off-by: Jesper Juhl <jj@...osbits.net>
---
 inode.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

 compile tested only

diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index 1cc600e..6c4236e 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -145,7 +145,7 @@ static void nfs_zap_caches_locked(struct inode *inode)
 	nfsi->attrtimeo = NFS_MINATTRTIMEO(inode);
 	nfsi->attrtimeo_timestamp = jiffies;
 
-	memset(NFS_COOKIEVERF(inode), 0, sizeof(NFS_COOKIEVERF(inode)));
+	memset(NFS_COOKIEVERF(inode), 0, sizeof(*NFS_COOKIEVERF(inode)));
 	if (S_ISREG(mode) || S_ISDIR(mode) || S_ISLNK(mode))
 		nfsi->cache_validity |= NFS_INO_INVALID_ATTR|NFS_INO_INVALID_DATA|NFS_INO_INVALID_ACCESS|NFS_INO_INVALID_ACL|NFS_INO_REVAL_PAGECACHE;
 	else


-- 
Jesper Juhl <jj@...osbits.net>            http://www.chaosbits.net/
Plain text mails only, please.
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ