Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Linux: Kernel

find_vma_intersection

 

 

Linux kernel RSS feed   Index | Next | Previous | View Threaded


dmarkh at cfl

Dec 30, 2005, 3:05 AM

Post #1 of 2 (299 views)
Permalink
find_vma_intersection

Can someone enlighten me as to what it really means when a user land
shmat call, in which the virtual address is provided, fails in the
kernel find_vma_intersection function because

end_addr(of my SHM) is <= vma->vm_start?

static inline struct vm_area_struct * find_vma_intersection(struct
mm_struct * mm, unsigned long start_addr, unsigned long end_addr)
{
struct vm_area_struct * vma = find_vma(mm,start_addr);

if (vma && end_addr <= vma->vm_start)
vma = NULL;
return vma;
}

Thanks in advance
Mark
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


dmarkh at cfl

Dec 30, 2005, 4:34 AM

Post #2 of 2 (278 views)
Permalink
Re: find_vma_intersection [In reply to]

Mark Hounschell wrote:
> Can someone enlighten me as to what it really means when a user land
> shmat call, in which the virtual address is provided, fails in the
> kernel find_vma_intersection function because
>
> end_addr(of my SHM) is <= vma->vm_start?

Actually because its ! <= vma->vm_start.

>
> static inline struct vm_area_struct * find_vma_intersection(struct
> mm_struct * mm, unsigned long start_addr, unsigned long end_addr)
> {
> struct vm_area_struct * vma = find_vma(mm,start_addr);
>
> if (vma && end_addr <= vma->vm_start)
> vma = NULL;
> return vma;
> }
>

Thanks
Mark
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Linux kernel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.