Source-Changes-D archive

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

Re: CVS commit: src/sys/opencrypto

On Jan 19, 11:21am, (Paul Goyette) wrote:
-- Subject: Re: CVS commit: src/sys/opencrypto

| > | 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.
| >
| > Ok then! Did you test it? If it works, I guess commit it.
| It does address the simple case I described.  It has a minor/cosmetic 
| issue of printing an error message
|       crypto0: unable to detach instance
| from config_cfdata_detach().

yes, it looks like it is not designed to be called if it is not going
to work. This is why most other things do the test in the MODULE_FINI
part, see bpf for example.

| But David Laight's post has me more concerned, that perhaps we really 
| need to solve this sort of issue more generically.

Yes, this is why I took the EOPNOTSUPP shortcut.

| So, not sure if this should be committed, or if we should leave your 
| code in to prevent unload in all cases.

Well, you can move your test from detach to MODULE_FINI and it should
work just fine. But yes, we should solve it more generically, but I still
think the reference counting code is needed.


Home | Main Index | Thread Index | Old Index