| 1344 | } |
| 1345 | |
| 1346 | static void |
| 1347 | fcrypt_dtor(void *data) |
| 1348 | { |
| 1349 | struct fcrypt *fcr = data; |
| 1350 | struct csession *cse; |
| 1351 | |
| 1352 | while ((cse = TAILQ_FIRST(&fcr->csessions))) { |
| 1353 | TAILQ_REMOVE(&fcr->csessions, cse, next); |
| 1354 | KASSERT(refcount_load(&cse->refs) == 1, |
| 1355 | ("%s: crypto session %p with %d refs", __func__, cse, |
| 1356 | refcount_load(&cse->refs))); |
| 1357 | cse_free(cse); |
| 1358 | } |
| 1359 | mtx_destroy(&fcr->lock); |
| 1360 | free(fcr, M_XDATA); |
| 1361 | } |
| 1362 | |
| 1363 | static int |
| 1364 | crypto_open(struct cdev *dev, int oflags, int devtype, struct thread *td) |
no test coverage detected