audit: fix two bugs in the new execve audit code
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Fri, 27 Jul 2007 22:55:18 +0000 (00:55 +0200)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Sun, 29 Jul 2007 02:42:22 +0000 (19:42 -0700)
commit040b3a2df2dd26c3e401823f3b0ce3fe99e966c5
treedbf88e0023db86669e775ed2ab4c5fb55186ffe0
parent0af3678f7c5872836d1cc8d7c659abd62c3c5ae7
audit: fix two bugs in the new execve audit code

copy_from_user() returns the number of bytes not copied, hence 0 is the
expected output.

axi->mm might not be valid anymore when not equal to current->mm, do not
dereference before checking that - thanks to Al for spotting that.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Tested-by: Steve Grubb <sgrubb@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/auditsc.c