Don't acquire Giant in cryptof_close(), as the code is intended to be
able to run MPsafe (and appears to be MPsafe). Discussed with (some time ago): sam
This commit is contained in:
parent
1761672b75
commit
d7aed12f45
@ -623,19 +623,12 @@ cryptof_close(struct file *fp, struct thread *td)
|
|||||||
struct fcrypt *fcr = fp->f_data;
|
struct fcrypt *fcr = fp->f_data;
|
||||||
struct csession *cse;
|
struct csession *cse;
|
||||||
|
|
||||||
/*
|
|
||||||
* XXXRW: The cryptodev and called code all appears to be
|
|
||||||
* MPSAFE, but I'm not set up to test it. Acquire Giant
|
|
||||||
* for now.
|
|
||||||
*/
|
|
||||||
mtx_lock(&Giant);
|
|
||||||
while ((cse = TAILQ_FIRST(&fcr->csessions))) {
|
while ((cse = TAILQ_FIRST(&fcr->csessions))) {
|
||||||
TAILQ_REMOVE(&fcr->csessions, cse, next);
|
TAILQ_REMOVE(&fcr->csessions, cse, next);
|
||||||
(void)csefree(cse);
|
(void)csefree(cse);
|
||||||
}
|
}
|
||||||
FREE(fcr, M_XDATA);
|
FREE(fcr, M_XDATA);
|
||||||
fp->f_data = NULL;
|
fp->f_data = NULL;
|
||||||
mtx_unlock(&Giant);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user