From: Nadia Derbey Date: Wed, 19 Nov 2008 23:36:08 +0000 (-0800) Subject: sysvipc: fix the ipc structures initialization X-Git-Tag: v2.6.27.8~89 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cbb502daa826e51ecdc50e7458aaf6216bc87cce;p=pandora-kernel.git sysvipc: fix the ipc structures initialization commit e00b4ff7ebf098b11b11be403921c1cf41d9e321 upstream. A problem was found while reviewing the code after Bugzilla bug http://bugzilla.kernel.org/show_bug.cgi?id=11796. In ipc_addid(), the newly allocated ipc structure is inserted into the ipcs tree (i.e made visible to readers) without locking it. This is not correct since its initialization continues after it has been inserted in the tree. This patch moves the ipc structure lock initialization + locking before the actual insertion. Signed-off-by: Nadia Derbey Reported-by: Clement Calmels Cc: Manfred Spraul Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed