Linux: stop trying to use getname/putname
authorJeff Layton <jlayton@redhat.com>
Fri, 6 Dec 2013 18:34:04 +0000 (13:34 -0500)
committerStephan Wiesand <stephan.wiesand@desy.de>
Fri, 20 Dec 2013 15:23:42 +0000 (07:23 -0800)
commit512ef081c1f1c2e31e7233e4b79338ae27f787b6
tree20279de5842570634ea14730349a61a7cbb63ccc
parent6e97ac37caa91ff03dc2ddcd224b8c93d1f2063b
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>

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>
(cherry picked from commit d40ed7391670010db0df2202d770341b2ca82f32)

Reviewed-on: http://gerrit.openafs.org/10578
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit d68e6c24f53b6878733e28909e23e44a0fdfae1d)

Change-Id: Ic8055a6ed7aa955266c0f3112817924ef8ba591b
Reviewed-on: http://gerrit.openafs.org/10604
Tested-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
acinclude.m4
src/afs/LINUX/osi_compat.h
src/afs/LINUX/osi_misc.c