[haiku-bugs] Re: [Haiku] #15095: if_free not called on (some?) attach failures (was: gDeviceCount management in the FreeBSD compatibility layer needs improvement.)

  • From: "Haiku" <trac@xxxxxxxxxxxx>
  • To: undisclosed-recipients: ;
  • Date: Fri, 31 May 2019 16:55:50 -0000

#15095: if_free not called on (some?) attach failures
-------------------------------+----------------------------
   Reporter:  bga              |      Owner:  bga
       Type:  bug              |     Status:  assigned
   Priority:  normal           |  Milestone:  Unscheduled
  Component:  Drivers/Network  |    Version:  R1/Development
 Resolution:                   |   Keywords:
 Blocked By:                   |   Blocking:
Has a Patch:  0                |   Platform:  All
-------------------------------+----------------------------
Changes (by waddlesplash):

 * component:  Network & Internet => Drivers/Network


Comment:

 The problem appears to be that if_free is not called on attach failures.
 iflib calls that when deregistering the device. Perhaps when attach fails,
 we should call if_free ourselves and not rely on the driver to do it?

 Or, how do other ethernet drivers handle this? I think most of them call
 detach() inside attach() to tear down the internal state? Is iflib doing
 that?

-- 
Ticket URL: <https://dev.haiku-os.org/ticket/15095#comment:1>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.

Other related posts:

  • » [haiku-bugs] Re: [Haiku] #15095: if_free not called on (some?) attach failures (was: gDeviceCount management in the FreeBSD compatibility layer needs improvement.) - Haiku