[haiku-commits] haiku: hrev43393 - src/libs/compat/freebsd_network

  • From: mmlr@xxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sat, 3 Dec 2011 23:07:57 +0100 (CET)

hrev43393 adds 1 changeset to branch 'master'
old head: 44954094997c3f1e7ceb8c9826768b679f87152d
new head: b39f919dbfabd409668fd9c8e137292f22a3d9e9

----------------------------------------------------------------------------

b39f919: Remove the root device from the root devices list.
  
  The device is added to the root devices list when initializing, but was
  not removed from there again when the root device was removed and freed,
  causing the list to have a stale entry. Probably fixes #3305.
  
  The list is populated once for the _fbsd_init_hardware iteration and, if
  a device was found, again for _fbsd_init_drivers. The only thing I don't
  understand is why it didn't just always crash, as there should have been
  a stale list entry in any case when a supported device actually was found...

                                            [ Michael Lotz <mmlr@xxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev43393
Commit:      b39f919dbfabd409668fd9c8e137292f22a3d9e9
URL:         http://cgit.haiku-os.org/haiku/commit/?id=b39f919
Author:      Michael Lotz <mmlr@xxxxxxxx>
Date:        Sat Dec  3 21:56:27 2011 UTC

Ticket:      https://dev.haiku-os.org/ticket/3305

----------------------------------------------------------------------------

1 files changed, 2 insertions(+), 0 deletions(-)
src/libs/compat/freebsd_network/compat.c |    2 ++

----------------------------------------------------------------------------

diff --git a/src/libs/compat/freebsd_network/compat.c 
b/src/libs/compat/freebsd_network/compat.c
index 52594a7..de2c046 100644
--- a/src/libs/compat/freebsd_network/compat.c
+++ b/src/libs/compat/freebsd_network/compat.c
@@ -362,6 +362,8 @@ device_delete_child(device_t parent, device_t child)
 
        if (parent != NULL)
                list_remove_item(&parent->children, child);
+       else
+               list_remove_item(&sRootDevices, child);
 
        // We differentiate from the FreeBSD logic here - it will first delete
        // the children, and will then detach the device.


Other related posts: