[lkml]   [2002]   [Feb]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: kernel: ldt allocation failed
On 7 December 2001 07:45, Anton Altaparmakov wrote:
> However, looking at 2.4.16/arch/i386/kernel/process.c::copy_segments()
> which generates this message it seems odd: It returns void, yet it can fail
> because it is doing a vmalloc().
> When the vmalloc() fails, the new_mm->context.segments is set to NULL and
> the function returns.
> That seems wrong, no? Shouldn't there be a panic() when the allocation
> fails at least? Or even better the function should perhaps return an error
> code?
> Considering there is only one caller (kernel/fork.c::copy_mm()) it would be
> easy to modify copy_mm() to handle a returned error code gracefully and
> goto fail_nomem, which would in turn result in kernel/fork.c::do_fork(),
> the only caller of copy_mm(), cleaning up properly and returning an error
> code.

I am ignorant on the subject, but why LDT is used in Linux at all?
LDT register can be set to 0, this can speed up task switch time and save
some memory used for LDT.

I see a i386 specific syscall (kernel/ldt.c:sys_modify_ldt()) and
* default LDT is a single-entry callgate to lcall7 for iBCS
* and a callgate to lcall27 for Solaris/x86 binaries
in kernel/traps.c:trap_init().

Is it used elsewhere?
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:24    [W:0.094 / U:7.080 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site