mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Move callout initialization to the proper spot. This prevents panics during
error recovery. Approved by: re Found by: kan
This commit is contained in:
parent
83b4953255
commit
9adc3a2dfb
3 changed files with 1 additions and 8 deletions
|
|
@ -1237,6 +1237,7 @@ retry:
|
|||
req->state = REQ_STATE_ALLOCATED;
|
||||
req->chain = NULL;
|
||||
mpt_assign_serno(mpt, req);
|
||||
mpt_callout_init(&req->callout);
|
||||
} else if (sleep_ok != 0) {
|
||||
mpt->getreqwaiter = 1;
|
||||
mpt_sleep(mpt, &mpt->request_free_list, PUSER, "mptgreq", 0);
|
||||
|
|
|
|||
|
|
@ -844,8 +844,6 @@ mpt_sleep(struct mpt_softc *mpt, void *ident, int priority,
|
|||
callout_reset(&(req)->callout, (ticks), (func), (arg));
|
||||
#define mpt_req_untimeout(req, func, arg) \
|
||||
callout_stop(&(req)->callout)
|
||||
#define mpt_req_timeout_init(req) \
|
||||
callout_init(&(req)->callout)
|
||||
|
||||
#else
|
||||
#if 1
|
||||
|
|
@ -871,8 +869,6 @@ mpt_sleep(struct mpt_softc *mpt, void *ident, int priority,
|
|||
callout_reset(&(req)->callout, (ticks), (func), (arg));
|
||||
#define mpt_req_untimeout(req, func, arg) \
|
||||
callout_stop(&(req)->callout)
|
||||
#define mpt_req_timeout_init(req) \
|
||||
callout_init(&(req)->callout, 1)
|
||||
|
||||
#else
|
||||
|
||||
|
|
|
|||
|
|
@ -1636,8 +1636,6 @@ out:
|
|||
if (ccb->ccb_h.timeout != CAM_TIME_INFINITY) {
|
||||
mpt_req_timeout(req, (ccb->ccb_h.timeout * hz) / 1000,
|
||||
mpt_timeout, ccb);
|
||||
} else {
|
||||
mpt_req_timeout_init(req);
|
||||
}
|
||||
if (mpt->verbose > MPT_PRT_DEBUG) {
|
||||
int nc = 0;
|
||||
|
|
@ -2037,8 +2035,6 @@ out:
|
|||
if (ccb->ccb_h.timeout != CAM_TIME_INFINITY) {
|
||||
mpt_req_timeout(req, (ccb->ccb_h.timeout * hz) / 1000,
|
||||
mpt_timeout, ccb);
|
||||
} else {
|
||||
mpt_req_timeout_init(req);
|
||||
}
|
||||
if (mpt->verbose > MPT_PRT_DEBUG) {
|
||||
int nc = 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue