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 <>,
Paul Goyette  <> 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?


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?



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

Home | Main Index | Thread Index | Old Index