]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Linux: Fix crash when the afs root volume is not found
authorMichael Meffie <mmeffie@sinenomine.net>
Thu, 7 Jan 2016 19:15:53 +0000 (14:15 -0500)
committerStephan Wiesand <stephan.wiesand@desy.de>
Thu, 3 Mar 2016 14:38:03 +0000 (09:38 -0500)
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 <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Chas Williams <3chas3@gmail.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
src/afs/LINUX/osi_vfsops.c

index 934478d9a6842353eabc34e392eac6e0ead7e797..3936d4d054bcb938fe447a12fd4bcb9171cc84da 100644 (file)
@@ -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);
     }