[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ltp-list
Subject:    [LTP] [PATCH] [CONCURRENCY] mremap04
From:       Renaud Lottiaux <Renaud.Lottiaux () kerlabs ! com>
Date:       2008-05-30 13:23:40
Message-ID: 200805301523.41007.Renaud.Lottiaux () kerlabs ! com
[Download RAW message or body]

[Attachment #2 (multipart/signed)]

[Attachment #4 (multipart/mixed)]


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 : Renaud.Lottiaux@kerlabs.com
Web   : http://www.kerlabs.com/

["LTP-mremap04-concurrency-fix.patch" (text/x-diff)]

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();
 }

["signature.asc" (application/pgp-signature)]

-------------------------------------------------------------------------
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
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic