Re: CVS commit: src/sys/opencrypto

2014-01-19 Thread Paul Goyette
On Sun, 19 Jan 2014, Christos Zoulas wrote: Module Name:src Committed By: christos Date: Sun Jan 19 18:16:13 UTC 2014 Modified Files: src/sys/opencrypto: cryptodev.c Log Message: bail out unloading for now How about the following changes? @@ -143,6 +143,8 @@ static

Re: CVS commit: src/sys/opencrypto

2014-01-19 Thread Christos Zoulas
On Jan 19, 10:22am, p...@whooppee.com (Paul Goyette) wrote: -- Subject: Re: CVS commit: src/sys/opencrypto | How about the following changes? You need to handle the regular open too, not justthe get (look for the other fd_clone) | @@ -143,6 +143,8 @@ static intcryptoread(dev_t dev,

Re: CVS commit: src/sys/opencrypto

2014-01-19 Thread Christos Zoulas
On Jan 19, 10:37am, p...@whooppee.com (Paul Goyette) wrote: -- Subject: Re: CVS commit: src/sys/opencrypto | That's covered in cryptoopen() at line 1060 I missed that patch | Handled indirectly. The MODULE_CMD_FINI calls config_cfdata_detach() | which attempts to detach each device instance.

Re: CVS commit: src/sys/opencrypto

2014-01-19 Thread Paul Goyette
On Sun, 19 Jan 2014, Christos Zoulas wrote: On Jan 19, 10:37am, p...@whooppee.com (Paul Goyette) wrote: -- Subject: Re: CVS commit: src/sys/opencrypto | That's covered in cryptoopen() at line 1060 I missed that patch No worry. | Handled indirectly. The MODULE_CMD_FINI calls

Re: CVS commit: src/sys/opencrypto

2014-01-19 Thread Christos Zoulas
On Jan 19, 11:21am, p...@whooppee.com (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

Re: CVS commit: src/sys/opencrypto

2014-01-19 Thread Paul Goyette
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

Re: CVS commit: src/sys/opencrypto

2014-01-19 Thread Christos Zoulas
In article pine.neb.4.64.1401191416060.22...@screamer.whooppee.com, Paul Goyette p...@whooppee.com 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 }

Re: CVS commit: src/sys/opencrypto

2014-01-19 Thread John Nemeth
On Jan 19, 10:37am, Paul Goyette wrote: } On Sun, 19 Jan 2014, Christos Zoulas wrote: } On Jan 19, 10:22am, p...@whooppee.com (Paul Goyette) wrote: } } | How about the following changes? } } You need to handle the regular open too, not justthe get (look for the } other fd_clone) } } That's

Re: CVS commit: src/sys/opencrypto

2014-01-19 Thread Paul Goyette
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

Re: CVS commit: src/sys/opencrypto

2014-01-19 Thread Christos Zoulas
On Jan 19, 3:04pm, p...@whooppee.com (Paul Goyette) wrote: -- Subject: Re: CVS commit: src/sys/opencrypto | The mere existence of a non-zero unit is a reference that needs to | prevent unloading. What if it is the last reference? Then the ref count will go to zero after close without

Re: CVS commit: src/sys/opencrypto

2014-01-19 Thread Paul Goyette
On Sun, 19 Jan 2014, Christos Zoulas wrote: On Jan 19, 3:04pm, p...@whooppee.com (Paul Goyette) wrote: -- Subject: Re: CVS commit: src/sys/opencrypto | The mere existence of a non-zero unit is a reference that needs to | prevent unloading. What if it is the last reference? Then the ref count