[PATCH] uml: fix host LDT lookup initialization locking, try 2
authorJeff Dike <jdike@addtoit.com>
Thu, 1 Mar 2007 04:13:06 +0000 (20:13 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Thu, 1 Mar 2007 22:53:38 +0000 (14:53 -0800)
commitaf727902212343211627da14d17c85592feb0e18
treef0b2b42a8ec582de6a6a52d2007a0d44eb32c36b
parentdae9f8e63cbb532e8c4b9c54bda0bf511af9c01c
[PATCH] uml: fix host LDT lookup initialization locking, try 2

Add some locking to host_ldt_entries to prevent racing when reading LDT
information from the host.

The locking is somewhat more careful than my previous attempt.  Now, only
the check of host_ldt_entries is locked.  The lock is dropped immediately
afterwards, and if the LDT needs initializing, that (and the memory
allocations needed) proceed outside the lock.

Also fixed some style violations.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/um/sys-i386/ldt.c