From 5f05961c88d9e819312314b0e7be7bc67a47b6c6 Mon Sep 17 00:00:00 2001 From: Michael Meffie Date: Thu, 7 Jan 2016 14:15:53 -0500 Subject: [PATCH] Linux: Fix crash when the afs root volume is not found Commit 602130f1de65eefeb4e31e114070d544eb9edd40 changed the allocation of the backing device info to directly use the kernel memory allocator. Unfortunately, one of the deallocations was not converted to the kernel memory deallocator in the backport to the 1.6.x branch. The code path is triggered when the afs root volume is not found (for example, not -dynroot and the root.afs volume is not available.) This causes the system to crash instead of just failing to mount /afs. This is a 1.6.x change only. This bug was introduced in version 1.6.14.1. FIXES 132653 Change-Id: Ifc991be5f914b4a4e1a797b7e2178dc03436b8e6 Reviewed-on: http://gerrit.openafs.org/12166 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Chas Williams <3chas3@gmail.com> Reviewed-by: Stephan Wiesand --- src/afs/LINUX/osi_vfsops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/afs/LINUX/osi_vfsops.c b/src/afs/LINUX/osi_vfsops.c index 934478d9a6..3936d4d054 100644 --- a/src/afs/LINUX/osi_vfsops.c +++ b/src/afs/LINUX/osi_vfsops.c @@ -150,7 +150,7 @@ afs_fill_super(struct super_block *sb, void *data, int silent) #if defined(HAVE_LINUX_BDI_INIT) bdi_destroy(afs_backing_dev_info); #endif - osi_Free(afs_backing_dev_info, sizeof(struct backing_dev_info)); + kfree(afs_backing_dev_info); module_put(THIS_MODULE); }