Skip to contentSkip to conversation

arch/blackfin/kernel/process.c: Remove the BKL from sys_execve

RFC PATCH In review John Kacur 6 participants 24 messages Oct 12, 2009 – Oct 14, 2009 1 message not in the archive m68k architecture

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

John Kacur

author
#1 lore raw

RFC PATCH 1/6 arch/blackfin/kernel/process.c: Remove the BKL from sys_execve

Quoted 1 line

From b9b41b5a546ed0202c099f0d973da4df9aea314a Mon Sep 17 00:00:00 2001

From: John Kacur <[email protected]>
Date: Mon, 12 Oct 2009 22:44:40 +0200
Subject: [PATCH] arch/blackfin/kernel/process.c: Remove the BKL from sys_execve

This looks like a cut-and-paste job.
For example, compare this function to sys_execve in arch/x86/kernel/process_64.c

and it is almost line by line the same, except the one in x86 nolonger has the big kernel lock. All of the functions called between the lock are generic and not specific to blackfin - thus, I believe it is safe to remove the bkl here.

---
 arch/blackfin/kernel/process.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)
arch/blackfin/kernel/process.c +1 -5
index 430ae39..7d9c975 100644
@@ -215,22 +215,18 @@ copy_thread(unsigned long clone_flags,
 /*
  * sys_execve() executes a new program.
  */
-
 asmlinkage int sys_execve(char __user *name, char __user * __user *argv, char __user * __user *envp)
 {
 	int error;
 	char *filename;
 	struct pt_regs *regs = (struct pt_regs *)((&name) + 6);
 
-	lock_kernel();
 	filename = getname(name);
 	error = PTR_ERR(filename);
 	if (IS_ERR(filename))
-		goto out;
+		return error;
 	error = do_execve(filename, argv, envp, regs);
 	putname(filename);
- out:
-	unlock_kernel();
 	return error;
 }
 
Signature · 1 line
1.6.0.6
author
#2 lore raw

RFC PATCH 2/6 arch/frv/kernel/process.c: Remove the BKL from sys_execve

Quoted 1 line

From 4489496ad43049df06b7ffc37afcea561fdb52b9 Mon Sep 17 00:00:00 2001

From: John Kacur <[email protected]>
Date: Mon, 12 Oct 2009 22:53:25 +0200
Subject: [PATCH] arch/frv/kernel/process.c: Remove the BKL from sys_execve

sys_execve for frv seems to be a copy-and-paste of sys_execve that no longer requires the bkl. Just remove it.

---
 arch/frv/kernel/process.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)
arch/frv/kernel/process.c +1 -4
index 9042559..21d0fd1 100644
@@ -255,15 +255,12 @@ asmlinkage int sys_execve(char __user *name, char __user * __user *argv, char __
 	int error;
 	char * filename;
 
-	lock_kernel();
 	filename = getname(name);
 	error = PTR_ERR(filename);
 	if (IS_ERR(filename))
-		goto out;
+		return error;
 	error = do_execve(filename, argv, envp, __frame);
 	putname(filename);
- out:
-	unlock_kernel();
 	return error;
 }
 
Signature · 1 line
1.6.0.6
author
#3 lore raw

RFC PATCH 3/6 arch/h83000/kernel/process.c: Remove BKL from sys_execve

Quoted 1 line

From 5cd96ce7851d01c1c28da724dd50713c8a1c66d7 Mon Sep 17 00:00:00 2001

From: John Kacur <[email protected]>
Date: Mon, 12 Oct 2009 23:04:11 +0200
Subject: [PATCH] arch/h83000/kernel/process.c: Remove BKL from sys_execve

This looks like a copy-and-paste job for code that no-longer needs the BKL Just remove it.

---
 arch/h8300/kernel/process.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)
arch/h8300/kernel/process.c +1 -4
index e2f33d0..bd883fa 100644
@@ -218,15 +218,12 @@ asmlinkage int sys_execve(char *name, char **argv, char **envp,int dummy,...)
 	char * filename;
 	struct pt_regs *regs = (struct pt_regs *) ((unsigned char *)&dummy-4);
 
-	lock_kernel();
 	filename = getname(name);
 	error = PTR_ERR(filename);
 	if (IS_ERR(filename))
-		goto out;
+		return error;
 	error = do_execve(filename, argv, envp, regs);
 	putname(filename);
-out:
-	unlock_kernel();
 	return error;
 }
 
Signature · 1 line
1.6.0.6
author
#4 lore raw

RFC PATCH 4/6 arch/m68k/kernel/process.c: Remove the BKL from sys_execve

Quoted 1 line

From 2dfc4e18d8968d00c0ad16c4c9e7ffd58809944b Mon Sep 17 00:00:00 2001

From: John Kacur <[email protected]>
Date: Mon, 12 Oct 2009 23:09:24 +0200
Subject: [PATCH] arch/m68k/kernel/process.c: Remove the BKL from sys_execve

This seems like a copy-and-paste from code that no-longer needs the BKL Just remove it.

---
 arch/m68k/kernel/process.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)
arch/m68k/kernel/process.c +1 -4
index 41230c5..0529659 100644
@@ -317,15 +317,12 @@ asmlinkage int sys_execve(char __user *name, char __user * __user *argv, char __
 	char * filename;
 	struct pt_regs *regs = (struct pt_regs *) &name;
 
-	lock_kernel();
 	filename = getname(name);
 	error = PTR_ERR(filename);
 	if (IS_ERR(filename))
-		goto out;
+		return error;
 	error = do_execve(filename, argv, envp, regs);
 	putname(filename);
-out:
-	unlock_kernel();
 	return error;
 }
 
Signature · 1 line
1.6.0.6
author
#5 lore raw

RFC PATCH 5/6 arch/m68knommu/kernel/process.c: Remove the BKL from sys_execve

Quoted 1 line

From e36c53d296132bc0ddbf6d9fb43ea5ea56dbd4a2 Mon Sep 17 00:00:00 2001

From: John Kacur <[email protected]>
Date: Mon, 12 Oct 2009 23:37:28 +0200
Subject: [PATCH] arch/m68knommu/kernel/process.c: Remove the BKL from sys_execve

This looks like a copy-and-paste of functionality that no-longer needs the bkl. Just remove it.

---
 arch/m68knommu/kernel/process.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)
arch/m68knommu/kernel/process.c +1 -4
index 8f8f4ab..5c9ecd4 100644
@@ -352,15 +352,12 @@ asmlinkage int sys_execve(char *name, char **argv, char **envp)
 	char * filename;
 	struct pt_regs *regs = (struct pt_regs *) &name;
 
-	lock_kernel();
 	filename = getname(name);
 	error = PTR_ERR(filename);
 	if (IS_ERR(filename))
-		goto out;
+		return error;
 	error = do_execve(filename, argv, envp, regs);
 	putname(filename);
-out:
-	unlock_kernel();
 	return error;
 }
 
Signature · 1 line
1.6.0.6
author
#6 lore raw

RFC PATCH 6/6 arch/mn10300/kernel/process.c: Remove the BKL from sys_execve

Quoted 1 line

From f05f8e3a2f5210e5274e758f66e33a9d168eacde Mon Sep 17 00:00:00 2001

From: John Kacur <[email protected]>
Date: Mon, 12 Oct 2009 23:41:55 +0200
Subject: [PATCH] arch/mn10300/kernel/process.c: Remove the BKL from sys_execve

This looks like a cut-and-paste from functionality that no-longer needs the bkl Just remove it. Also, rewrite slightly so that it looks closer to sys_execve on other architectures.

---
 arch/mn10300/kernel/process.c |   12 ++++--------
 1 files changed, 4 insertions(+), 8 deletions(-)
arch/mn10300/kernel/process.c +4 -8
index 892cce8..ec8a21d 100644
@@ -275,16 +275,12 @@ asmlinkage long sys_execve(char __user *name,
 	char *filename;
 	int error;
 
-	lock_kernel();
-
 	filename = getname(name);
 	error = PTR_ERR(filename);
-	if (!IS_ERR(filename)) {
-		error = do_execve(filename, argv, envp, __frame);
-		putname(filename);
-	}
-
-	unlock_kernel();
+	if (IS_ERR(filename))
+		return error;
+	error = do_execve(filename, argv, envp, __frame);
+	putname(filename);
 	return error;
 }
 
Signature · 1 line
1.6.0.6
Acked-by on v1 6/6
#7 lore raw

Re: [PATCH 6/6 RFC] arch/mn10300/kernel/process.c: Remove the BKL from sys_execve

Quoted 10 lines · John Kacur

From f05f8e3a2f5210e5274e758f66e33a9d168eacde Mon Sep 17 00:00:00 2001
From: John Kacur <[email protected]>
Date: Mon, 12 Oct 2009 23:41:55 +0200
Subject: [PATCH] arch/mn10300/kernel/process.c: Remove the BKL from sys_execve

This looks like a cut-and-paste from functionality that no-longer needs the bkl Just remove it. Also, rewrite slightly so that it looks closer to sys_execve on other architectures.

#8 lore raw

[tip:bkl/arch] mn10300: Remove the BKL from sys_execve

In reply to John Kacur
Commit-ID:  8c0daee204f794d095ae301f408c5f9f40e4547d
Gitweb:     http://git.kernel.org/tip/8c0daee204f794d095ae301f408c5f9f40e4547d
Author:     John Kacur <[email protected]>
AuthorDate: Mon, 12 Oct 2009 23:41:55 +0200
Committer:  Thomas Gleixner <[email protected]>
CommitDate: Wed, 14 Oct 2009 17:18:15 +0200

mn10300: Remove the BKL from sys_execve

This looks like a cut-and-paste from functionality that no-longer needs the bkl Just remove it. Also, rewrite slightly so that it looks closer to sys_execve on other architectures.

LKML-Reference: <[email protected]>

---
 arch/mn10300/kernel/process.c |   12 ++++--------
 1 files changed, 4 insertions(+), 8 deletions(-)
arch/mn10300/kernel/process.c +4 -8
index 892cce8..ec8a21d 100644
@@ -275,16 +275,12 @@ asmlinkage long sys_execve(char __user *name,
 	char *filename;
 	int error;
 
-	lock_kernel();
-
 	filename = getname(name);
 	error = PTR_ERR(filename);
-	if (!IS_ERR(filename)) {
-		error = do_execve(filename, argv, envp, __frame);
-		putname(filename);
-	}
-
-	unlock_kernel();
+	if (IS_ERR(filename))
+		return error;
+	error = do_execve(filename, argv, envp, __frame);
+	putname(filename);
 	return error;
 }
 
Acked-by on v1 5/6
#9 lore raw

Re: [PATCH 5/6 RFC] arch/m68knommu/kernel/process.c: Remove the BKL from sys_execve

In reply to John Kacur

Hi John,

Quoted 9 lines · John Kacur
Quoted 1 line

From e36c53d296132bc0ddbf6d9fb43ea5ea56dbd4a2 Mon Sep 17 00:00:00 2001

From: John Kacur<[email protected]>
Date: Mon, 12 Oct 2009 23:37:28 +0200
Subject: [PATCH] arch/m68knommu/kernel/process.c: Remove the BKL from sys_execve

This looks like a copy-and-paste of functionality that no-longer needs the bkl. Just remove it.

Tested and runs fine on m68knommu.

Do you want me to push this into the m68knommu git tree, for eventual merging into Linus' tree? Or are you going to push the whole set of patches together?

Regards
Greg

Quoted 25 lines
---
  arch/m68knommu/kernel/process.c |    5 +----
  1 files changed, 1 insertions(+), 4 deletions(-)
arch/m68knommu/kernel/process.c +1 -4
index 8f8f4ab..5c9ecd4 100644
@@ -352,15 +352,12 @@ asmlinkage int sys_execve(char *name, char **argv, char **envp)
  	char * filename;
  	struct pt_regs *regs = (struct pt_regs *)&name;
 
-	lock_kernel();
  	filename = getname(name);
  	error = PTR_ERR(filename);
  	if (IS_ERR(filename))
-		goto out;
+		return error;
  	error = do_execve(filename, argv, envp, regs);
  	putname(filename);
-out:
-	unlock_kernel();
  	return error;
  }
 
Signature · 5 lines
------------------------------------------------------------------------
Greg Ungerer  --  Principal Engineer        EMAIL:     [email protected]
SnapGear Group, McAfee                      PHONE:       +61 7 3435 2888
825 Stanley St,                             FAX:         +61 7 3891 3630
Woolloongabba, QLD, 4102, Australia         WEB: http://www.SnapGear.com
author
#10 lore raw

Re: [PATCH 5/6 RFC] arch/m68knommu/kernel/process.c: Remove the BKL from sys_execve

Quoted 17 lines · Greg Ungerer

Hi John,

Quoted 11 lines · John Kacur
Quoted 1 line

From e36c53d296132bc0ddbf6d9fb43ea5ea56dbd4a2 Mon Sep 17 00:00:00 2001

From: John Kacur<[email protected]>
Date: Mon, 12 Oct 2009 23:37:28 +0200
Subject: [PATCH] arch/m68knommu/kernel/process.c: Remove the BKL from sys_execve

This looks like a copy-and-paste of functionality that no-longer needs the bkl.
Just remove it.

Tested and runs fine on m68knommu.

Quoted 8 lines

Do you want me to push this into the m68knommu git tree, for eventual merging into Linus' tree? Or are you going to push the whole set of patches together?

Regards
Greg

@Thomas - do you want to pick this up for your proposed kill bkl tree and push it to Linus during this next merge window - or in this case is it more appropriate for Greg as the m68knommu maintainer to do so?

Thanks

John

Quoted 35 lines
Quoted 27 lines
---
  arch/m68knommu/kernel/process.c |    5 +----
  1 files changed, 1 insertions(+), 4 deletions(-)
arch/m68knommu/kernel/process.c +1 -4
index 8f8f4ab..5c9ecd4 100644
@@ -352,15 +352,12 @@ asmlinkage int sys_execve(char *name, char **argv,
 char **envp)
  	char * filename;
  	struct pt_regs *regs = (struct pt_regs *)&name;
 
-	lock_kernel();
  	filename = getname(name);
  	error = PTR_ERR(filename);
  	if (IS_ERR(filename))
-		goto out;
+		return error;
  	error = do_execve(filename, argv, envp, regs);
  	putname(filename);
-out:
-	unlock_kernel();
  	return error;
  }
Signature · 5 lines
------------------------------------------------------------------------
Greg Ungerer  --  Principal Engineer        EMAIL:     [email protected]
SnapGear Group, McAfee                      PHONE:       +61 7 3435 2888
825 Stanley St,                             FAX:         +61 7 3891 3630
Woolloongabba, QLD, 4102, Australia         WEB: http://www.SnapGear.com
#11 lore raw

Re: [PATCH 5/6 RFC] arch/m68knommu/kernel/process.c: Remove the BKL from sys_execve

In reply to Greg Ungerer
Quoted 15 lines · Greg Ungerer

Hi John,

Quoted 11 lines · John Kacur
Quoted 1 line

From e36c53d296132bc0ddbf6d9fb43ea5ea56dbd4a2 Mon Sep 17 00:00:00 2001

From: John Kacur<[email protected]>
Date: Mon, 12 Oct 2009 23:37:28 +0200
Subject: [PATCH] arch/m68knommu/kernel/process.c: Remove the BKL from sys_execve

This looks like a copy-and-paste of functionality that no-longer needs the bkl.
Just remove it.

Quoted 7 lines

Tested and runs fine on m68knommu.

Do you want me to push this into the m68knommu git tree, for eventual merging into Linus' tree? Or are you going to push the whole set of patches together?

I'm collecting and pushing the BKL stuff, but if you want to take it just let me know and I drop it.

Thanks,

tglx

#12 lore raw

Re: [PATCH 5/6 RFC] arch/m68knommu/kernel/process.c: Remove the BKL from sys_execve

Hi Thomas,

Quoted 15 lines · Thomas Gleixner
Quoted 14 lines · Greg Ungerer
Quoted 11 lines · John Kacur
Quoted 1 line

From e36c53d296132bc0ddbf6d9fb43ea5ea56dbd4a2 Mon Sep 17 00:00:00 2001

From: John Kacur<[email protected]>
Date: Mon, 12 Oct 2009 23:37:28 +0200
Subject: [PATCH] arch/m68knommu/kernel/process.c: Remove the BKL from sys_execve

This looks like a copy-and-paste of functionality that no-longer needs the bkl.
Just remove it.

Tested and runs fine on m68knommu.

Quoted 8 lines
Quoted 5 lines

Do you want me to push this into the m68knommu git tree, for eventual merging into Linus' tree? Or are you going to push the whole set of patches together?

I'm collecting and pushing the BKL stuff, but if you want to take it just let me know and I drop it.

Would make more sense to keep it all together I think. So you take it.

Regards
Greg

------------------------------------------------------------------------

Greg Ungerer  --  Principal Engineer        EMAIL:     [email protected]
SnapGear Group, McAfee                      PHONE:       +61 7 3435 2888
825 Stanley St,                             FAX:         +61 7 3891 3630
Woolloongabba, QLD, 4102, Australia         WEB: http://www.SnapGear.com
#13 lore raw

[tip:bkl/arch] m68knommu: Remove the BKL from sys_execve

In reply to John Kacur
Commit-ID:  eb7371d4fdcc40a390e8bdf90c99b5541213ca45
Gitweb:     http://git.kernel.org/tip/eb7371d4fdcc40a390e8bdf90c99b5541213ca45
Author:     John Kacur <[email protected]>
AuthorDate: Mon, 12 Oct 2009 23:37:28 +0200
Committer:  Thomas Gleixner <[email protected]>
CommitDate: Wed, 14 Oct 2009 17:18:14 +0200

m68knommu: Remove the BKL from sys_execve

This looks like a copy-and-paste of functionality that no-longer needs the bkl. Just remove it.

Reviewed: Frederic Weisbecker <[email protected]>

LKML-Reference: <[email protected]>

---
 arch/m68knommu/kernel/process.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)
arch/m68knommu/kernel/process.c +1 -4
index 8f8f4ab..5c9ecd4 100644
@@ -352,15 +352,12 @@ asmlinkage int sys_execve(char *name, char **argv, char **envp)
 	char * filename;
 	struct pt_regs *regs = (struct pt_regs *) &name;
 
-	lock_kernel();
 	filename = getname(name);
 	error = PTR_ERR(filename);
 	if (IS_ERR(filename))
-		goto out;
+		return error;
 	error = do_execve(filename, argv, envp, regs);
 	putname(filename);
-out:
-	unlock_kernel();
 	return error;
 }
 
#14 lore raw

[tip:bkl/arch] m68k: Remove the BKL from sys_execve

In reply to John Kacur
Commit-ID:  2624167cd8b4965d0ef548e84767a30214edd8d4
Gitweb:     http://git.kernel.org/tip/2624167cd8b4965d0ef548e84767a30214edd8d4
Author:     John Kacur <[email protected]>
AuthorDate: Mon, 12 Oct 2009 23:09:24 +0200
Committer:  Thomas Gleixner <[email protected]>
CommitDate: Wed, 14 Oct 2009 17:18:14 +0200

m68k: Remove the BKL from sys_execve

This seems like a copy-and-paste from code that no-longer needs the BKL Just remove it.

LKML-Reference: <[email protected]>

Cc Geert Uytterhoeven <[email protected]>
---
 arch/m68k/kernel/process.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)
arch/m68k/kernel/process.c +1 -4
index 41230c5..0529659 100644
@@ -317,15 +317,12 @@ asmlinkage int sys_execve(char __user *name, char __user * __user *argv, char __
 	char * filename;
 	struct pt_regs *regs = (struct pt_regs *) &name;
 
-	lock_kernel();
 	filename = getname(name);
 	error = PTR_ERR(filename);
 	if (IS_ERR(filename))
-		goto out;
+		return error;
 	error = do_execve(filename, argv, envp, regs);
 	putname(filename);
-out:
-	unlock_kernel();
 	return error;
 }
 
#15 lore raw

[tip:bkl/arch] h83000: Remove BKL from sys_execve

In reply to John Kacur
Commit-ID:  e3c1a6b35c84795f7cb31cb7f4748166904cc0bc
Gitweb:     http://git.kernel.org/tip/e3c1a6b35c84795f7cb31cb7f4748166904cc0bc
Author:     John Kacur <[email protected]>
AuthorDate: Mon, 12 Oct 2009 23:04:11 +0200
Committer:  Thomas Gleixner <[email protected]>
CommitDate: Wed, 14 Oct 2009 17:18:14 +0200

h83000: Remove BKL from sys_execve

This looks like a copy-and-paste job for code that no-longer needs the BKL Just remove it.

LKML-Reference: <[email protected]>

---
 arch/h8300/kernel/process.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)
arch/h8300/kernel/process.c +1 -4
index e2f33d0..bd883fa 100644
@@ -218,15 +218,12 @@ asmlinkage int sys_execve(char *name, char **argv, char **envp,int dummy,...)
 	char * filename;
 	struct pt_regs *regs = (struct pt_regs *) ((unsigned char *)&dummy-4);
 
-	lock_kernel();
 	filename = getname(name);
 	error = PTR_ERR(filename);
 	if (IS_ERR(filename))
-		goto out;
+		return error;
 	error = do_execve(filename, argv, envp, regs);
 	putname(filename);
-out:
-	unlock_kernel();
 	return error;
 }
 
Acked-by on v1 2/6
#16 lore raw

Re: [PATCH 2/6 RFC] arch/frv/kernel/process.c: Remove the BKL from sys_execve

In reply to John Kacur
Quoted 9 lines · John Kacur

From 4489496ad43049df06b7ffc37afcea561fdb52b9 Mon Sep 17 00:00:00 2001
From: John Kacur <[email protected]>
Date: Mon, 12 Oct 2009 22:53:25 +0200
Subject: [PATCH] arch/frv/kernel/process.c: Remove the BKL from sys_execve

sys_execve for frv seems to be a copy-and-paste of sys_execve that no longer requires the bkl. Just remove it.

#17 lore raw

[tip:bkl/arch] frv: Remove the BKL from sys_execve

In reply to John Kacur
Commit-ID:  b69975a35a7332624b6977a5676a6fc320070360
Gitweb:     http://git.kernel.org/tip/b69975a35a7332624b6977a5676a6fc320070360
Author:     John Kacur <[email protected]>
AuthorDate: Mon, 12 Oct 2009 22:53:25 +0200
Committer:  Thomas Gleixner <[email protected]>
CommitDate: Wed, 14 Oct 2009 17:18:14 +0200

frv: Remove the BKL from sys_execve

sys_execve for frv seems to be a copy-and-paste of sys_execve that no longer requires the bkl. Just remove it.

LKML-Reference: <[email protected]>

---
 arch/frv/kernel/process.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)
arch/frv/kernel/process.c +1 -4
index 9042559..21d0fd1 100644
@@ -255,15 +255,12 @@ asmlinkage int sys_execve(char __user *name, char __user * __user *argv, char __
 	int error;
 	char * filename;
 
-	lock_kernel();
 	filename = getname(name);
 	error = PTR_ERR(filename);
 	if (IS_ERR(filename))
-		goto out;
+		return error;
 	error = do_execve(filename, argv, envp, __frame);
 	putname(filename);
- out:
-	unlock_kernel();
 	return error;
 }
 
Reviewed-by on v1 1/6
#18 lore raw
In reply to John Kacur
Quoted 51 lines · John Kacur

From b9b41b5a546ed0202c099f0d973da4df9aea314a Mon Sep 17 00:00:00 2001
From: John Kacur <[email protected]>
Date: Mon, 12 Oct 2009 22:44:40 +0200
Subject: [PATCH] arch/blackfin/kernel/process.c: Remove the BKL from sys_execve

This looks like a cut-and-paste job.
For example, compare this function to sys_execve in arch/x86/kernel/process_64.c

and it is almost line by line the same, except the one in x86 nolonger has the big kernel lock. All of the functions called between the lock are generic and not specific to blackfin - thus, I believe it is safe to remove the bkl here.

---
 arch/blackfin/kernel/process.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)
arch/blackfin/kernel/process.c +1 -5
index 430ae39..7d9c975 100644
@@ -215,22 +215,18 @@ copy_thread(unsigned long clone_flags,
 /*
  * sys_execve() executes a new program.
  */
-
 asmlinkage int sys_execve(char __user *name, char __user * __user *argv, char __user * __user *envp)
 {
 	int error;
 	char *filename;
 	struct pt_regs *regs = (struct pt_regs *)((&name) + 6);
 
-	lock_kernel();
 	filename = getname(name);
 	error = PTR_ERR(filename);
 	if (IS_ERR(filename))
-		goto out;
+		return error;
 	error = do_execve(filename, argv, envp, regs);
 	putname(filename);
- out:
-	unlock_kernel();
 	return error;
 }
 
Signature · 1 line
1.6.0.6

Yeah, there seem to be nothing to protect there.

Acked-by on v1 1/6
#19 lore raw
In reply to John Kacur
Quoted 8 lines · John Kacur

This looks like a cut-and-paste job.
For example, compare this function to sys_execve in arch/x86/kernel/process_64.c

and it is almost line by line the same, except the one in x86 nolonger has the big kernel lock. All of the functions called between the lock are generic and not specific to blackfin - thus, I believe it is safe to remove the bkl here.

and it still boots/runs fine, so np here

-mike

author
#20 lore raw
Quoted 5 lines · Mike Frysinger
Quoted 4 lines · John Kacur

This looks like a cut-and-paste job.
For example, compare this function to sys_execve in arch/x86/kernel/process_64.c

Quoted 8 lines
Quoted 4 lines

and it is almost line by line the same, except the one in x86 nolonger has the big kernel lock. All of the functions called between the lock are generic and not specific to blackfin - thus, I believe it is safe to remove the bkl here.

and it still boots/runs fine, so np here

-mike

Cool - are you testing on one of those nifty smp (or smp-like) blackfins?

#21 lore raw
Quoted 11 lines · John Kacur
Quoted 10 lines · Mike Frysinger
Quoted 8 lines · John Kacur

This looks like a cut-and-paste job.
For example, compare this function to sys_execve in arch/x86/kernel/process_64.c

and it is almost line by line the same, except the one in x86 nolonger has the big kernel lock. All of the functions called between the lock are generic and not specific to blackfin - thus, I believe it is safe to remove the bkl here.

Quoted 4 lines
Quoted 2 lines

and it still boots/runs fine, so np here

Cool - are you testing on one of those nifty smp (or smp-like) blackfins?

no, this was a uniproc. i could try a SMP Blackfin if you think it'll make a difference.
-mike

author
#22 lore raw
Quoted 12 lines · Mike Frysinger
Quoted 11 lines · John Kacur
Quoted 10 lines · Mike Frysinger
Quoted 8 lines · John Kacur

This looks like a cut-and-paste job.
For example, compare this function to sys_execve in arch/x86/kernel/process_64.c

and it is almost line by line the same, except the one in x86 nolonger has the big kernel lock. All of the functions called between the lock are generic and not specific to blackfin - thus, I believe it is safe to remove the bkl here.

Quoted 9 lines
Quoted 4 lines
Quoted 2 lines

and it still boots/runs fine, so np here

Cool - are you testing on one of those nifty smp (or smp-like) blackfins?

no, this was a uniproc. i could try a SMP Blackfin if you think it'll make a difference.
-mike

Well - hopefully it won't make a difference, but if there are problems, then that is where they will show up.

Thanks

#23 lore raw
Quoted 16 lines · John Kacur
Quoted 15 lines · Mike Frysinger
Quoted 14 lines · John Kacur
Quoted 12 lines · Mike Frysinger
Quoted 8 lines · John Kacur

This looks like a cut-and-paste job.
For example, compare this function to sys_execve in arch/x86/kernel/process_64.c

and it is almost line by line the same, except the one in x86 nolonger has the big kernel lock. All of the functions called between the lock are generic and not specific to blackfin - thus, I believe it is safe to remove the bkl here.

and it still boots/runs fine, so np here

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

Cool - are you testing on one of those nifty smp (or smp-like) blackfins?

no, this was a uniproc.  i could try a SMP Blackfin if you think it'll make a difference.

Well - hopefully it won't make a difference, but if there are problems, then that is where they will show up.

it seems that the Blackfin SMP code is currently broken during boot, so i'll have to wait until that is fixed ;)

i would just queue this in the mean time since, as you said, the code is generic (sounds like a case for moving sys_execve to common code) and there shouldnt be any issues.
-mike

#24 lore raw

[tip:bkl/arch] blackfin: Remove the BKL from sys_execve

In reply to John Kacur
Commit-ID:  25708a5fe7467dcc69d9b92c1701aad4a0c71887
Gitweb:     http://git.kernel.org/tip/25708a5fe7467dcc69d9b92c1701aad4a0c71887
Author:     John Kacur <[email protected]>
AuthorDate: Mon, 12 Oct 2009 22:44:40 +0200
Committer:  Thomas Gleixner <[email protected]>
CommitDate: Wed, 14 Oct 2009 17:18:14 +0200

blackfin: Remove the BKL from sys_execve

This looks like a cut-and-paste job. For example, compare this function to sys_execve in arch/x86/kernel/process_64.c and it is almost line by line the same, except the one in x86 nolonger has the big kernel lock. All of the functions called between the lock are generic and not specific to blackfin - thus, I believe it is safe to remove the bkl here.

LKML-Reference: <[email protected]>

---
 arch/blackfin/kernel/process.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)
arch/blackfin/kernel/process.c +1 -5
index 430ae39..7d9c975 100644
@@ -215,22 +215,18 @@ copy_thread(unsigned long clone_flags,
 /*
  * sys_execve() executes a new program.
  */
-
 asmlinkage int sys_execve(char __user *name, char __user * __user *argv, char __user * __user *envp)
 {
 	int error;
 	char *filename;
 	struct pt_regs *regs = (struct pt_regs *)((&name) + 6);
 
-	lock_kernel();
 	filename = getname(name);
 	error = PTR_ERR(filename);
 	if (IS_ERR(filename))
-		goto out;
+		return error;
 	error = do_execve(filename, argv, envp, regs);
 	putname(filename);
- out:
-	unlock_kernel();
 	return error;
 }