diff options
author | scottl <scottl@FreeBSD.org> | 2007-04-27 14:23:05 +0000 |
---|---|---|
committer | scottl <scottl@FreeBSD.org> | 2007-04-27 14:23:05 +0000 |
commit | 798d11564899e8e1177f2f673f8d6592fa483038 (patch) | |
tree | 9e3f08bdcb724ab93446a6bdecc2717ab1353de0 /sys/cam | |
parent | 8b90b3b132c1bf1df79cb504c3ae9c055f29e932 (diff) | |
download | FreeBSD-src-798d11564899e8e1177f2f673f8d6592fa483038.zip FreeBSD-src-798d11564899e8e1177f2f673f8d6592fa483038.tar.gz |
Only schedule the xpt_finishconfig_task once. This fixes some potential
panics on boot.
Diffstat (limited to 'sys/cam')
-rw-r--r-- | sys/cam/cam_xpt.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c index 78c2ac8..f3d3ab2 100644 --- a/sys/cam/cam_xpt.c +++ b/sys/cam/cam_xpt.c @@ -7017,10 +7017,12 @@ xpt_finishconfig(struct cam_periph *periph, union ccb *done_ccb) } } - task = malloc(sizeof(struct xpt_task), M_CAMXPT, M_NOWAIT); - if (task != NULL) { - TASK_INIT(&task->task, 0, xpt_finishconfig_task, task); - taskqueue_enqueue(taskqueue_thread, &task->task); + if (busses_to_config == 0) { + task = malloc(sizeof(struct xpt_task), M_CAMXPT, M_NOWAIT); + if (task != NULL) { + TASK_INIT(&task->task, 0, xpt_finishconfig_task, task); + taskqueue_enqueue(taskqueue_thread, &task->task); + } } if (done_ccb != NULL) |