[PATCH] uml: consolidate modify_ldt

*) Reorganize the two cases of sys_modify_ldt to share all the reasonably
   common code.

*) Avoid memory allocation when unneeded (i.e.  when we are writing and the
   passed buffer size is known), thus not returning ENOMEM (which isn't
   allowed for this syscall, even if there is no strict "specification").

*) Add copy_{from,to}_user to modify_ldt for TT mode.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Paolo 'Blaisorblade' Giarrusso
2005-07-14 00:33:37 -07:00
committed by Linus Torvalds
parent 1feb8d2d73
commit 2e5e55923e
2 changed files with 67 additions and 52 deletions
+5
View File
@@ -0,0 +1,5 @@
#ifndef __UM_LDT_H
#define __UM_LDT_H
#include "asm/arch/ldt.h"
#endif