commit-hurd
[Top][All Lists]
Advanced

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

[hurd] 19/21: boot: Fix failing device lookups in unprivileged mode.


From: Samuel Thibault
Subject: [hurd] 19/21: boot: Fix failing device lookups in unprivileged mode.
Date: Sat, 04 Mar 2017 21:10:59 +0000

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

sthibault pushed a commit to branch upstream
in repository hurd.

commit 7845e0f740d104dc712505ab2f8b273a18078fae
Author: Justus Winter <address@hidden>
Date:   Fri Mar 3 17:10:53 2017 +0100

    boot: Fix failing device lookups in unprivileged mode.
    
    Previously, EMACH_SEND_INVALID_DEST was returned.  This had
    devastating consequences on the translator linkage of storeio
    translators.  When accessed, the parent translator tried to start the
    translator over and over again, spawning tasks until the system runs
    out of resources.
    
    * boot/boot.c (ds_device_open): Return the correct error when trying
    to open a non-existent device in unprivileged mode.
---
 boot/boot.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/boot/boot.c b/boot/boot.c
index 78bd183..c69c89a 100644
--- a/boot/boot.c
+++ b/boot/boot.c
@@ -938,6 +938,9 @@ ds_device_open (mach_port_t master_port,
       return err;
     }
 
+  if (! privileged)
+    return D_NO_SUCH_DEVICE;
+
   *devicetype = MACH_MSG_TYPE_MOVE_SEND;
   return device_open (master_device_port, mode, name, device);
 }

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