lkml.org 
[lkml]   [1997]   [Apr]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: a question on i386 copy_thread()
On Mon, 7 Apr 1997, James Mastros wrote:

> On Sun, 6 Apr 1997, Bryn Paul Arnold Jones wrote:
> [...]
> >
> > Nope, if the vmalloc fails, p->ldt would be NULL (hence the test that it
> > isn't), and the next time we try to do anything with it, we'll have a NULL
> > pointer dereference.
> >
> > > Ray Lehtiniemi <rayl@crosskeys.com>
> > >
> > Bryn
>
> ...a NULL pointer dereference... also known as a bad thing!
>
> -=- James Mastros
>

At least it's a trapped error, and would come to light unambiguasley if we
try to use it, but it's not going to be a problem, as it only gets
executed if(p->ldt!=NULL):

[...]
if (p->ldt) {
p->ldt = (struct desc_struct*) vmalloc(LDT_ENTRIES*LDT_ENTRY_SIZE);
if (p->ldt != NULL)
memcpy(p->ldt, current->ldt, LDT_ENTRIES*LDT_ENTRY_SIZE);
}
[...]

so I don't think it's a problem.

Bryn
--
PGP key pass phrase forgotten, \ Overload -- core meltdown sequence
again :( and I don't care ;) | initiated.
/ This space is intentionally left
| blank, apart from this text ;-)
\____________________________________


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