From: Marc Dionne Date: Tue, 22 Nov 2011 02:27:06 +0000 (-0500) Subject: Linux: make sure backing_dev_info is zeroed X-Git-Tag: debian/1.6.0-2~2 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=84b510032307bc136b693d1c998d79ef39e50437;p=packages%2Fo%2Fopenafs.git Linux: make sure backing_dev_info is zeroed The afs backing_dev_info structure is allocated dynamically without zeroing out the contents. In particular there's no guarantee that congested_fn is NULL, causing spurious oopses when bdi_congested in the kernel tries to call it. (adapted from commit 8e97cf6f215d5575c63d86eaec59031399f4beda) Change-Id: I83755b6bb5ec2fada7e077c00d3d8edf8af1cae4 Reviewed-on: http://gerrit.openafs.org/6104 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 032736bc052d3fb1a1d4f033a47e844d7f4ea05a) --- diff --git a/src/afs/LINUX/osi_vfsops.c b/src/afs/LINUX/osi_vfsops.c index d32720f5c..0d41bc7f3 100644 --- a/src/afs/LINUX/osi_vfsops.c +++ b/src/afs/LINUX/osi_vfsops.c @@ -114,6 +114,7 @@ afs_fill_super(struct super_block *sb, void *data, int silent) /* used for inodes backing_dev_info field, also */ afs_backing_dev_info = osi_Alloc(sizeof(struct backing_dev_info)); + memset(afs_backing_dev_info, 0, sizeof(struct backing_dev_info)); #if defined(HAVE_LINUX_BDI_INIT) bdi_init(afs_backing_dev_info); #endif