Source-Changes-D archive

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

Re: CVS commit: src/sys/opencrypto



The mere existence of a non-zero unit is a "reference" that needs to prevent unloading.

The two checks (unit# and ref-count) are equivalent and redundant, and only one of them needs to be there.


On Sun, 19 Jan 2014, Christos Zoulas wrote:

In article <Pine.NEB.4.64.1401191416060.22170%screamer.whooppee.com@localhost>,
Paul Goyette  <paul%whooppee.com@localhost> wrote:
On Sun, 19 Jan 2014, John Nemeth wrote:

} Handled indirectly.  The MODULE_CMD_FINI calls config_cfdata_detach()
} which attempts to detach each device instance.  If a detach fails, then
} config_cfdata_detach fails, and the unload will fail.

    Does this mean that you'll end up with some device instances
detached and not others?

Nope.

All non-zero units are prevented from unload.  And unit zero is
permitted only if there are no references, ie no clones.

I don't see why non-zero units are special, can you explain? Open zero
open 1, close 0, close 1. Should the close 1 unload?

christos


!DSPAM:52dc4fde23811308416388!



-------------------------------------------------------------------------
| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:       |
| Customer Service | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com    |
| Network Engineer | 0786 F758 55DE 53BA 7731 | pgoyette at juniper.net |
| Kernel Developer |                          | pgoyette at netbsd.org  |
-------------------------------------------------------------------------


Home | Main Index | Thread Index | Old Index