lkml.org 
[lkml]   [2005]   [Sep]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
Subject[PATCH]: Missing acct/mm calls in compat_do_execve()
From

As I do periodically, I checked to see how far out of sync
compat_do_execve() has gotten from do_execve(). And as usual there
was some missing stuff in the former. Perhaps we need some tighter
consolidation of these two routines to make this less likely to happen
in the future.

Anyways, on the success path of compat_do_execve() we forget
to call acct_update_integrals() and update_mem_hiwater(), as
is done in do_execve().

Signed-off-by: David S. Miller <davem@davemloft.net>

diff --git a/fs/compat.c b/fs/compat.c
--- a/fs/compat.c
+++ b/fs/compat.c
@@ -44,6 +44,8 @@
#include <linux/nfsd/syscall.h>
#include <linux/personality.h>
#include <linux/rwsem.h>
+#include <linux/acct.h>
+#include <linux/mm.h>

#include <net/sock.h> /* siocdevprivate_ioctl */

@@ -1487,6 +1489,8 @@ int compat_do_execve(char * filename,

/* execve success */
security_bprm_free(bprm);
+ acct_update_integrals(current);
+ update_mem_hiwater(current);
kfree(bprm);
return retval;
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-09-14 20:58    [W:0.035 / U:0.360 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site