Hi !

This patch fix a concurrency issue in mremap04

The tmp directory the IPC key was build with was destroyed before
we destroy the IPC ressource attached to the key.
In case of concurency, the same inode id can be reused for another
process tmp dir, leading to the generation of the same key.

Regards.

R.

-- 
Renaud Lottiaux

Kerlabs
Bâtiment Germanium
80, avenue des buttes de Coësmes
35700 Rennes - France
Phone : (+33|0)6 80 89 19 34
Fax   : (+33|0)2 99 84 71 71
Email : [EMAIL PROTECTED]
Web   : http://www.kerlabs.com/
Index: cvs/testcases/kernel/syscalls/mremap/mremap04.c
===================================================================
--- cvs.orig/testcases/kernel/syscalls/mremap/mremap04.c	2008-05-30 15:12:38.000000000 +0200
+++ cvs/testcases/kernel/syscalls/mremap/mremap04.c	2008-05-30 15:12:45.000000000 +0200
@@ -249,9 +249,6 @@
 	 */
 	TEST_CLEANUP;
 
-	/* Remove the temporary directory */
-	tst_rmdir();
-
 	/*
 	 * Detach the shared memory segment attached to
 	 * the calling process's data segment
@@ -271,6 +268,9 @@
 			 "memory, error:%d", errno);
 	}
 
+	/* Remove the temporary directory */
+	tst_rmdir();
+
 	/* Exit the program */
 	tst_exit();
 }

Attachment: signature.asc
Description: This is a digitally signed message part.

-------------------------------------------------------------------------
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