Hi Subrata,

Here is the updated patch for pid ns fix.

Thanks
Rishi

On Wed, 2008-02-06 at 09:50 -0800, [EMAIL PROTECTED] wrote:

> Rishikesh K. Rajak [EMAIL PROTECTED] wrote:
> | Hi All,
> | 
> | Here is the patch require for fixing the pid namespace testcase bug on
> | -mm kernel.
> | 
> | Bug: PID Namespace testcases were getting SEGSEV on -mm kernel only.
> | 
> | After reporting this problem, i got fix from container development team.
> | 
> | Thanks
> | Rishi
> 
> | Description: Pid Namespace were getting segmentation fault while running on 
> -mm kernel.
> |                 After debugging by container development team they found 
> the exact root cause.
> | 
> | Signed-off By : Serge Hallyn <[EMAIL PROTECTED]>
> | Signed-off By : Sukadev Bhattiprolu <[EMAIL PROTECTED]>
> | Tested By     : Rishikesh k Rajak <[EMAIL PROTECTED]>
> | ---
> | Index: ltp-full-20080131/testcases/kernel/containers/libclone/libclone.c
> | ===================================================================
> | --- ltp-full-20080131.orig/testcases/kernel/containers/libclone/libclone.c  
> 2007-12-28 04:48:30.000000000 -0500
> | +++ ltp-full-20080131/testcases/kernel/containers/libclone/libclone.c       
> 2008-02-06 00:44:41.000000000 -0500
> | @@ -23,14 +23,15 @@
> |                     int(*fn2)(void *arg), void *arg2)
> |  {
> |     int ret;
> | -   void *childstack, *stack = malloc(getpagesize());
> | +   int stack_size = getpagesize();
> | +   void *childstack, *stack = malloc (4*getpagesize());
> 
> How about:
> 
>       int stack_size = getpagesize() * 4;
>       void *childstack, *stack = malloc(stack_size);
> 
> so we don't have to multiply stack_size by 4 every time ?
> 
> | 
> |     if (!stack) {
> |             perror("malloc");
> |             return -1;
> |     }
> | 
> | -   childstack = stack + getpagesize();
> | +   childstack = stack + 4*getpagesize();
> 
> and
>       childstack = stack + stack_size;
> | 
> |  #ifdef __ia64__
> |     ret = clone2(fn1, childstack, getpagesize(), clone_flags | SIGCHLD, 
> arg1, NULL, NULL, NULL);
> 
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Ltp-list mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ltp-list
Description: Pid Namespace were getting segmentation fault while running on -mm kernel.
		After debugging by container development team they found the exact root cause.
 
Signed-off By : Serge Hallyn <[EMAIL PROTECTED]>
Signed-off By : Sukadev Bhattiprolu <[EMAIL PROTECTED]>
---
Index: ltp-full-20080131/testcases/kernel/containers/libclone/libclone.c
===================================================================
--- ltp-full-20080131.orig/testcases/kernel/containers/libclone/libclone.c	2007-12-28 04:48:30.000000000 -0500
+++ ltp-full-20080131/testcases/kernel/containers/libclone/libclone.c	2008-02-08 03:48:47.000000000 -0500
@@ -23,14 +23,15 @@
 			int(*fn2)(void *arg), void *arg2)
 {
 	int ret;
-	void *childstack, *stack = malloc(getpagesize());
+	int stack_size = getpagesize() * 4;
+	void *childstack, *stack = malloc (stack_size);
 
 	if (!stack) {
 		perror("malloc");
 		return -1;
 	}
 
-	childstack = stack + getpagesize();
+	childstack = stack + stack_size;
 
 #ifdef __ia64__
 	ret = clone2(fn1, childstack, getpagesize(), clone_flags | SIGCHLD, arg1, NULL, NULL, NULL);
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to