| [2062] | 1 | From e7669883d5124f85bad6840a4e8280e4de32f7a5 Mon Sep 17 00:00:00 2001 | 
|---|
|  | 2 | From: Marc Dionne <marc.c.dionne@gmail.com> | 
|---|
|  | 3 | Date: Mon, 21 Nov 2011 21:27:06 -0500 | 
|---|
|  | 4 | Subject: [PATCH] Linux: make sure backing_dev_info is zeroed | 
|---|
|  | 5 |  | 
|---|
|  | 6 | The afs backing_dev_info structure is allocated dynamically | 
|---|
|  | 7 | without zeroing out the contents.  In particular there's no | 
|---|
|  | 8 | guarantee that congested_fn is NULL, causing spurious oopses | 
|---|
|  | 9 | when bdi_congested in the kernel tries to call it. | 
|---|
|  | 10 |  | 
|---|
|  | 11 | (adapted from commit 8e97cf6f215d5575c63d86eaec59031399f4beda) | 
|---|
|  | 12 |  | 
|---|
|  | 13 | Change-Id: I83755b6bb5ec2fada7e077c00d3d8edf8af1cae4 | 
|---|
|  | 14 | --- | 
|---|
|  | 15 | src/afs/LINUX/osi_vfsops.c |    1 + | 
|---|
|  | 16 | 1 files changed, 1 insertions(+), 0 deletions(-) | 
|---|
|  | 17 |  | 
|---|
|  | 18 | diff --git a/src/afs/LINUX/osi_vfsops.c b/src/afs/LINUX/osi_vfsops.c | 
|---|
|  | 19 | index d32720f..0d41bc7 100644 | 
|---|
|  | 20 | --- a/src/afs/LINUX/osi_vfsops.c | 
|---|
|  | 21 | +++ b/src/afs/LINUX/osi_vfsops.c | 
|---|
|  | 22 | @@ -114,6 +114,7 @@ afs_fill_super(struct super_block *sb, void *data, int silent) | 
|---|
|  | 23 |  | 
|---|
|  | 24 | /* used for inodes backing_dev_info field, also */ | 
|---|
|  | 25 | afs_backing_dev_info = osi_Alloc(sizeof(struct backing_dev_info)); | 
|---|
|  | 26 | +    memset(afs_backing_dev_info, 0, sizeof(struct backing_dev_info)); | 
|---|
|  | 27 | #if defined(HAVE_LINUX_BDI_INIT) | 
|---|
|  | 28 | bdi_init(afs_backing_dev_info); | 
|---|
|  | 29 | #endif | 
|---|
|  | 30 | -- | 
|---|
|  | 31 | 1.7.2.5 | 
|---|
|  | 32 |  | 
|---|