bug-hurd
[Top][All Lists]
Advanced

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

I/O permission bitmap missing chunk


From: Marcus Brinkmann
Subject: I/O permission bitmap missing chunk
Date: Fri, 1 Mar 2002 13:21:40 -0500
User-agent: Mutt/1.3.25i

Hi,

this small piece is missing in my last patch, because I associated
with my kbd hack (but it is related to the io_perm range pseudo devices).

2002-02-28  Marcus Brinkmann <marcus@gnu.org>

        * oskit/ds_routines.c (device_deallocate): Allow DEVICE->com_device
        to be NULL for simple pseudo device handlers.


--- oskit/ds_routines.c.old     Fri Mar  1 20:15:22 2002
+++ oskit/ds_routines.c Fri Mar  1 20:16:04 2002
@@ -135,19 +135,21 @@
   }
   simple_unlock (&device->ref_lock);
 
-  assert (device->com_device);
+  if (device->com_device)
+    {
+      simple_lock(&dev_hash_lock);
+      simple_lock(&device->ref_lock);
+      if (--device->ref_count > 0)
+       {
+         simple_unlock (&device->ref_lock);
+         simple_unlock (&dev_hash_lock);
+         return;
+       }
 
-  simple_lock(&dev_hash_lock);
-  simple_lock(&device->ref_lock);
-  if (--device->ref_count > 0) {
-    simple_unlock (&device->ref_lock);
-    simple_unlock (&dev_hash_lock);
-    return;
-  }
-
-  dev_hash_remove (device);
-  simple_unlock(&device->ref_lock);
-  simple_unlock(&dev_hash_lock);
+      dev_hash_remove (device);
+      simple_unlock(&device->ref_lock);
+      simple_unlock(&dev_hash_lock);
+    }
 
   /* Destroy the port.  */
   ipc_kobject_set (device->port, IKO_NULL, IKOT_NONE);



reply via email to

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