commit-hurd
[Top][All Lists]
Advanced

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

[hurd] 02/64: Deal with odd kernel behavior


From: Samuel Thibault
Subject: [hurd] 02/64: Deal with odd kernel behavior
Date: Wed, 10 Dec 2014 15:17:02 +0000

This is an automated email from the git hooks/post-receive script.

sthibault pushed a commit to branch upstream
in repository hurd.

commit 84172a2e26fd81c1c39b6301b003cc89b97ee75c
Author: Samuel Thibault <address@hidden>
Date:   Sun Nov 9 22:38:22 2014 +0100

    Deal with odd kernel behavior
    
    Some versions of gnumach actually take address as a mapping hint, and would 
fail
    if the hint is bogus.  Make sure to pass 0 for those versions.
    
    * libstore/memobj.c (memobj_read): Make sure to set *buf to 0 before
    calling vm_map.
---
 libstore/memobj.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libstore/memobj.c b/libstore/memobj.c
index 0d5c816..cc6c7ca 100644
--- a/libstore/memobj.c
+++ b/libstore/memobj.c
@@ -133,6 +133,7 @@ memobj_read (struct store *store,
   if (((size_t) addr & (vm_page_size - 1)) == 0)
     {
       *len = amount;
+      *buf = 0;
       return vm_map (mach_task_self (), (vm_address_t *) buf, amount,
                     0, 1, store->port, addr << store->log2_block_size, 0,
                     VM_PROT_READ, VM_PROT_ALL, VM_INHERIT_NONE);

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-hurd/hurd.git



reply via email to

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