bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/2] avoid dereference of null pointer


From: Samuel Thibault
Subject: Re: [PATCH 2/2] avoid dereference of null pointer
Date: Sun, 10 Nov 2013 18:29:34 +0100
User-agent: Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30)

Marin Ramesa, le Sun 10 Nov 2013 18:16:20 +0100, a écrit :
> On 10.11.2013 16:53:39, Samuel Thibault wrote:
> > Marin Ramesa, le Sun 10 Nov 2013 16:46:30 +0100, a écrit :
> > > Check to see if pte is a null pointer and perform dereference only
> > > if that is not the case.
> > > 
> > > * i386/intel/pmap.c (pte): Check if it is a null pointer.
> > 
> > Well, it can never be null, since earlier in the code we see the pv_h
> > pointing to a map which has the physical page mapped somewhere.
> 
> OK, thanks. I assumed pmap_pte() returns NULL since clang reports say 
> pte is a null pointer.

Yes, it may return NULL when there is nothing at that virtual address,
but the va precisely comes from a mapped area, so we're sure there's
something there.

Samuel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]