lkml.org 
[lkml]   [2004]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: 2.6.5-rc1-aa3
On Sat, Mar 20, 2004 at 10:17:16PM -0800, Martin J. Bligh wrote:
> > Fixed the sigbus in nopage and improved the page_t layout per Hugh's
> > suggestion. BUG() with discontigmem disabled if somebody returns non-ram
> > via do_no_page, that cannot work right on numa anyways.
>
> OK, well it doesn't oops any more. But sshd still dies as soon as it starts,
> so accessing the box is tricky ;-) And now I have no obvious diagnostics
> either ...

Jens sent me the perfect strace log, after his help it has not been
difficult to spot the bug. this incremental should fix it
MAP_SHARED|MAP_ANONYMOUS isn't very common and my userspace never
triggered it. I placed the pgoff anon setting in the path of the shared
memory too, that generated the sigbus. Leaving the setting only in the
MAP_PRIVATE should fix it, the anonymous memory is only MAP_PRIVATE.

patch is untested at the moment, as soon as I get confirmation I'll
upload an update.

thanks!

--- x/mm/mmap.c.~1~ 2004-03-20 22:12:43.000000000 +0100
+++ x/mm/mmap.c 2004-03-21 14:15:17.269882800 +0100
@@ -622,11 +622,11 @@ unsigned long do_mmap_pgoff(struct file
return -EINVAL;
case MAP_PRIVATE:
vm_flags &= ~(VM_SHARED | VM_MAYSHARE);
- /* fall through */
+ pgoff = addr >> PAGE_SHIFT;
+ break;
case MAP_SHARED:
break;
}
- pgoff = addr >> PAGE_SHIFT;
}

error = security_file_mmap(file, prot, flags);
-
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 14:01    [W:0.120 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site