mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: John Kacur <jkacur@redhat.com>
To: linux-kernel@vger.kernel.org, Thomas Gleixner <tglx@linutronix.de>
Cc: Arnd Bergmann <arndbergmann@googlemail.com>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>, Ingo Molnar <mingo@elte.hu>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Jeff Dike <jdike@addtoit.com>
Subject: [PATCH] UM: Remove BKL from sys_execve
Date: Sun, 18 Oct 2009 16:36:16 +0200 (CEST)	[thread overview]
Message-ID: <alpine.LFD.2.00.0910181633130.3462@localhost.localdomain> (raw)

>From 4d71a5e17b985a8fefaa88e3a6fe4896878886ba Mon Sep 17 00:00:00 2001
From: John Kacur <jkacur@redhat.com>
Date: Sun, 18 Oct 2009 16:17:57 +0200
Subject: [PATCH] UM: Remove BKL from sys_execve

The BKL in sys_execve is likely the result of a cut-and-paste from a time,
when it was needed. However, it is no longer required here. Remove to be
in sync with other architectures.

(See arch/x86/kernel/process_64.c for example)

Signed-off-by: John Kacur <jkacur@redhat.com>
---
 arch/um/kernel/exec.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/arch/um/kernel/exec.c b/arch/um/kernel/exec.c
index fda30d2..d39aa36 100644
--- a/arch/um/kernel/exec.c
+++ b/arch/um/kernel/exec.c
@@ -5,7 +5,6 @@
 
 #include "linux/stddef.h"
 #include "linux/fs.h"
-#include "linux/smp_lock.h"
 #include "linux/ptrace.h"
 #include "linux/sched.h"
 #include "asm/current.h"
@@ -76,13 +75,11 @@ long sys_execve(char __user *file, char __user *__user *argv,
 	long error;
 	char *filename;
 
-	lock_kernel();
 	filename = getname(file);
 	error = PTR_ERR(filename);
-	if (IS_ERR(filename)) goto out;
+	if (IS_ERR(filename))
+		return error;
 	error = execve1(filename, argv, env);
 	putname(filename);
- out:
-	unlock_kernel();
 	return error;
 }
-- 
1.6.0.6


                 reply	other threads:[~2009-10-18 14:37 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LFD.2.00.0910181633130.3462@localhost.localdomain \
    --to=jkacur@redhat.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=arndbergmann@googlemail.com \
    --cc=fweisbec@gmail.com \
    --cc=jdike@addtoit.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®