commit-hurd
[Top][All Lists]
Advanced

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

[hurd] 01/06: New upstream snapshot


From: Samuel Thibault
Subject: [hurd] 01/06: New upstream snapshot
Date: Sun, 20 Nov 2016 21:18:21 +0000

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

sthibault pushed a commit to branch master
in repository hurd.

commit 6ec9cffe52bc9173d0bf65fe28acacc9bb70e6ea
Author: Samuel Thibault <address@hidden>
Date:   Sun Nov 20 19:49:05 2016 +0000

    New upstream snapshot
---
 boot/boot.c             |  4 ++++
 ext2fs/dir.c            | 10 ++++++++++
 ext2fs/pager.c          |  2 +-
 libpager/pager-memcpy.c |  5 +++--
 libstore/memobj.c       |  5 +++--
 5 files changed, 21 insertions(+), 5 deletions(-)

diff --git a/boot/boot.c b/boot/boot.c
index d0e0207..491c1a9 100644
--- a/boot/boot.c
+++ b/boot/boot.c
@@ -1994,6 +1994,10 @@ S_processor_set_tasks(mach_port_t processor_set,
   error_t err;
   size_t i;
 
+  if (!task_ihash.nr_items)
+    *task_listCnt = 0;
+  return 0;
+
   err = vm_allocate (mach_task_self (), (vm_address_t *) task_list,
                     task_ihash.nr_items * sizeof **task_list, 1);
   if (err)
diff --git a/ext2fs/dir.c b/ext2fs/dir.c
index bc375c3..87a8a04 100644
--- a/ext2fs/dir.c
+++ b/ext2fs/dir.c
@@ -26,6 +26,8 @@
 #include <dirent.h>
 #include <stddef.h>
 
+#include <hurd/sigpreempt.h>
+
 /* This isn't quite right because a file system block may straddle several
    device blocks, and so a write failure between writing two device blocks
    may scramble things up a bit.  But the linux doesn't do this.  We could
@@ -620,6 +622,14 @@ diskfs_direnter_hard (struct node *dp, const char *name, 
struct node *np,
        }
 
       new = (struct ext2_dir_entry_2 *) (ds->mapbuf + oldsize);
+      err = hurd_safe_memset (new, 0, DIRBLKSIZ);
+      if (err)
+       {
+        if (err == EKERN_MEMORY_ERROR)
+          err = ENOSPC;
+         munmap ((caddr_t) ds->mapbuf, ds->mapextent);
+         return err;
+       }
 
       dp->dn_stat.st_size = oldsize + DIRBLKSIZ;
       dp->dn_set_ctime = 1;
diff --git a/ext2fs/pager.c b/ext2fs/pager.c
index 6a92682..fd93dcb 100644
--- a/ext2fs/pager.c
+++ b/ext2fs/pager.c
@@ -640,7 +640,7 @@ pager_unlock_page (struct user_pager_info *pager, 
vm_offset_t page)
       pthread_rwlock_unlock (&dn->alloc_lock);
 
       if (err == ENOSPC)
-       ext2_warning ("This filesystem is out of space, and will now crash.  
Bye!");
+       ext2_warning ("This filesystem is out of space.");
       else if (err)
        ext2_warning ("inode=%Ld, page=0x%lx: %s",
                      node->cache_id, page, strerror (err));
diff --git a/libpager/pager-memcpy.c b/libpager/pager-memcpy.c
index 7bdc248..c7a420b 100644
--- a/libpager/pager-memcpy.c
+++ b/libpager/pager-memcpy.c
@@ -121,6 +121,7 @@ pager_memcpy (struct pager *pager, memory_object_t memobj,
              /* Realign the fault preemptor for the new mapping window.  */
              preemptor->first = window;
              preemptor->last = window + window_size;
+             __sync_synchronize();
 
              if (prot == VM_PROT_READ)
                memcpy (other, (const void *) window + pageoff, copy_count);
@@ -176,7 +177,7 @@ pager_memcpy (struct pager *pager, memory_object_t memobj,
       err = pager_get_error (pager, sigcode - window + offset);
       n -= sigcode - window;
       vm_deallocate (mach_task_self (), window, window_size);
-      longjmp (buf, 1);
+      siglongjmp (buf, 1);
     }
 
   if (n == 0)
@@ -206,7 +207,7 @@ pager_memcpy (struct pager *pager, memory_object_t memobj,
   window = 0;
   window_size = 0;
 
-  if (setjmp (buf) == 0)
+  if (sigsetjmp (buf) == 0)
     hurd_catch_signal (sigmask (SIGSEGV) | sigmask (SIGBUS),
                       window, window + window_size,
                       &do_copy, (sighandler_t) &fault);
diff --git a/libstore/memobj.c b/libstore/memobj.c
index cc6c7ca..8bbc833 100644
--- a/libstore/memobj.c
+++ b/libstore/memobj.c
@@ -83,6 +83,7 @@ memobj_memcpy (memory_object_t memobj,
          /* Realign the fault preemptor for the new mapping window.  */
          preemptor->first = window;
          preemptor->last = window + windowsize;
+         __sync_synchronize();
 
          if (prot == VM_PROT_READ)
            memcpy (other, (const void *) window + pageoff,
@@ -103,7 +104,7 @@ memobj_memcpy (memory_object_t memobj,
       assert (scp->sc_error == EKERN_MEMORY_ERROR);
       err = EIO;
       to_copy -= sigcode - window;
-      longjmp (buf, 1);
+      siglongjmp (buf, 1);
     }
 
   if (to_copy == 0)
@@ -111,7 +112,7 @@ memobj_memcpy (memory_object_t memobj,
        ERR would not be initialized by the copy loop in this case.  */
     return 0;
 
-  if (setjmp (buf) == 0)
+  if (sigsetjmp (buf) == 0)
     hurd_catch_signal (sigmask (SIGSEGV) | sigmask (SIGBUS),
                       window, window + windowsize,
                       &copy, (sighandler_t) &fault);

-- 
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]