patch-2.3.31 linux/kernel/acct.c

Next file: linux/kernel/capability.c
Previous file: linux/include/linux/pci_ids.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.30/linux/kernel/acct.c linux/kernel/acct.c
@@ -150,12 +150,12 @@
 {
 	struct file *file = NULL, *old_acct = NULL;
 	char *tmp;
-	int error = -EPERM;
+	int error;
 
-	lock_kernel();
 	if (!capable(CAP_SYS_PACCT))
-		goto out;
+		return -EPERM;
 
+	lock_kernel();
 	if (name) {
 		tmp = getname(name);
 		error = PTR_ERR(tmp);
@@ -257,8 +257,6 @@
  *  into the accounting file. This function should only be called from
  *  do_exit().
  */
-#define KSTK_EIP(stack) (((unsigned long *)(stack))[1019])
-#define KSTK_ESP(stack) (((unsigned long *)(stack))[1022])
 
 /*
  *  do_acct_process does all actual work.

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)