]> git.baikalelectronics.ru Git - kernel.git/commit
audit: dynamically allocate audit_names when not enough space is in the names array
authorEric Paris <eparis@redhat.com>
Tue, 3 Jan 2012 19:23:05 +0000 (14:23 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Tue, 17 Jan 2012 21:16:54 +0000 (16:16 -0500)
commit0f7c1ba6b8cc79c8f1ab44b633d2a6383e7ea0c1
tree6d8d980037d95740d0f64ba9491c0e5a38f31ea3
parent5eeb5ff3c64d621667e8204254c14ffcbc31ee04
audit: dynamically allocate audit_names when not enough space is in the names array

This patch does 2 things.  First it reduces the number of audit_names
allocated in every audit context from 20 to 5.  5 should be enough for all
'normal' syscalls (rename being the worst).  Some syscalls can still touch
more the 5 inodes such as mount.  When rpc filesystem is mounted it will
create inodes and those can exceed 5.  To handle that problem this patch will
dynamically allocate audit_names if it needs more than 5.  This should
decrease the typicall memory usage while still supporting all the possible
kernel operations.

Signed-off-by: Eric Paris <eparis@redhat.com>
kernel/auditsc.c