Linux: stop trying to use getname/putname
authorJeff Layton <jlayton@redhat.com>
Fri, 6 Dec 2013 18:34:04 +0000 (13:34 -0500)
committerDerrick Brashear <shadow@your-file-system.com>
Wed, 11 Dec 2013 15:36:30 +0000 (07:36 -0800)
commitd40ed7391670010db0df2202d770341b2ca82f32
treeaebce4cf63a4ad11f405fc3186271c8f7e8c8111
parentce96143d79ea006f7b1318dd1c962d4c4f79fc1e
Linux: stop trying to use getname/putname

The current code has afs_putname defined as

    kmem_cache_free (names_cachep, (void *) name);

This is wrong and will cause a double -free when syscall auditing is
enabled. Fix it to call putname properly.

Instead of that, just create a new afs_getname function that doesn't
bother with struct filename at all, and use that unconditionally.

Signed-off-by:Jeff Layton <jlayton@redhat.com>

Change-Id: I1cd58a7e528abfeb7473cf47ae4cff5b8c8f419c
Reviewed-on: http://gerrit.openafs.org/10547
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeff Layton <jlayton@poochiereds.net>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
acinclude.m4
src/afs/LINUX/osi_compat.h
src/afs/LINUX/osi_misc.c