]> git.baikalelectronics.ru Git - kernel.git/commit
audit: replace getname()/putname() hacks with reference counters
authorPaul Moore <pmoore@redhat.com>
Thu, 22 Jan 2015 05:00:23 +0000 (00:00 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Fri, 23 Jan 2015 05:23:58 +0000 (00:23 -0500)
commit75a48a6c6cbccc7c971108d43cda34b62303b0d4
treefd1d6fae56c5e01d9d8fd6fb2fd913f5e24c7b56
parent0b87d43cca0baebe2958363c805c7bb956be8387
audit: replace getname()/putname() hacks with reference counters

In order to ensure that filenames are not released before the audit
subsystem is done with the strings there are a number of hacks built
into the fs and audit subsystems around getname() and putname().  To
say these hacks are "ugly" would be kind.

This patch removes the filename hackery in favor of a more
conventional reference count based approach.  The diffstat below tells
most of the story; lots of audit/fs specific code is replaced with a
traditional reference count based approach that is easily understood,
even by those not familiar with the audit and/or fs subsystems.

CC: viro@zeniv.linux.org.uk
CC: linux-fsdevel@vger.kernel.org
Signed-off-by: Paul Moore <pmoore@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/namei.c
include/linux/audit.h
include/linux/fs.h
kernel/audit.h
kernel/auditsc.c