lkml.org 
[lkml]   [2002]   [Jan]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [Linux-fbdev-devel] Re: [PATCH?] Crash in 2.4.17/ptrace

> Ah, thanks. Also I missed sbusfb.c (not that it was fatal - the driver
> got it right anyway).

Great.

> Here's the current patch. After some discussion with Ben
> Herrenschmidt, it now sets VM_IO against the vma *before*
> calling the subdriver's mmap method, just in case the
> driver really does want to clear that flag (presumably, a shadow
> buffer in main memory).

I also thought about it as well. Never thought about the issue with shadow
buffers. Is it safe to move it before if (fb->fb_mmap)?

> --- linux-2.4.18-pre7/drivers/video/fbmem.c Fri Dec 21 11:19:14 2001
> +++ linux-akpm/drivers/video/fbmem.c Tue Jan 29 14:57:00 2002
> @@ -541,6 +541,16 @@ fb_mmap(struct file *file, struct vm_are
> if (fb->fb_mmap) {
> int res;
> lock_kernel();
> + /*
> + * This is an IO map - tell maydump to skip this VMA.
> + * If, for some reason, the sub-driver wishes to allow the
> + * mapping to be dumpable and accessible via ptrace then
> + * it may clear VM_IO later.
> + * (This only makes sense if the buffer is actually
> + * in main memory, and is described by a page struct in
> + * mem_map[])
> + */
> + vma->vm_flags |= VM_IO;
> res = fb->fb_mmap(info, file, vma);
> unlock_kernel();
> return res;

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

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