Mercurial > illumos > illumos-gate
changeset 5115:4c575c54d5b4
6574028 Panic in flowacct_update_flows_tbl
author | vi117747 |
---|---|
date | Fri, 21 Sep 2007 08:17:15 -0700 |
parents | 0dab8b69b8f2 |
children | af663f9eb6d1 |
files | usr/src/uts/common/ipp/flowacct/flowacct.c |
diffstat | 1 files changed, 14 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/uts/common/ipp/flowacct/flowacct.c Fri Sep 21 08:09:33 2007 -0700 +++ b/usr/src/uts/common/ipp/flowacct/flowacct.c Fri Sep 21 08:17:15 2007 -0700 @@ -518,6 +518,7 @@ just_once = B_FALSE; goto try_again; } else { + flow->inuse = B_FALSE; mutex_exit(&fhead->lock); flowacct1dbg(("flowacct_update_flows_tbl: "\ "maximum active flows exceeded\n")); @@ -538,6 +539,7 @@ FLOWACCT_DEL_OBJ); } atomic_add_32(&flowacct_data->nflows, -1); + flow->inuse = B_FALSE; mutex_exit(&fhead->lock); return (-1); } @@ -552,6 +554,7 @@ FLOWACCT_DEL_OBJ); } atomic_add_32(&flowacct_data->nflows, -1); + flow->inuse = B_FALSE; mutex_exit(&fhead->lock); return (-1); } @@ -822,12 +825,20 @@ * a new item for this flow. */ if (!flow->inuse) { - if (fl_hdr == thead->tail) { - thead->head = thead->tail = NULL; + if (fl_hdr->timeout_prev != NULL) { + fl_hdr->timeout_prev->timeout_next = + fl_hdr->timeout_next; } else { thead->head = fl_hdr->timeout_next; - thead->head->timeout_prev = NULL; } + if (fl_hdr->timeout_next != NULL) { + fl_hdr->timeout_next->timeout_prev = + fl_hdr->timeout_prev; + } else { + thead->tail = fl_hdr->timeout_prev; + } + fl_hdr->timeout_prev = NULL; + fl_hdr->timeout_next = NULL; flowacct_del_obj(head, fl_hdr, FLOWACCT_DEL_OBJ); atomic_add_64(&flowacct_data->usedmem, flow_size); }