On Tue, 7 Jun 2016, Taylor R Campbell wrote:

  Date: Tue, 7 Jun 2016 18:28:11 +0800 (PHT)
  From: Paul Goyette <p...@whooppee.com>

  Can anyone suggest a reliable way to ensure that a device-driver module
  can be _really_ safely detached?

General approach:

1. Prevent new references (e.g., devsw_detach).

2. Wait for existing references to drain (or roll back with
devsw_attach if you don't want to wait, and fail with EBUSY).

3. Unload.

Yes, of course.  Thanks, I think this will work.



+------------------+--------------------------+------------------------+
| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:      |
| (Retired)        | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com   |
| Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd.org |
+------------------+--------------------------+------------------------+

Reply via email to