diff options
author | mlaier <mlaier@FreeBSD.org> | 2004-09-01 19:56:47 +0000 |
---|---|---|
committer | mlaier <mlaier@FreeBSD.org> | 2004-09-01 19:56:47 +0000 |
commit | 9597d324e036ae8820f26a82947b74c149b807f8 (patch) | |
tree | 63b62658bd73aaf16ca9934024909e5e9f5dfca3 /sys/net/if.c | |
parent | a141198c5395c62e306f62158e43111bbab01e71 (diff) | |
download | FreeBSD-src-9597d324e036ae8820f26a82947b74c149b807f8.zip FreeBSD-src-9597d324e036ae8820f26a82947b74c149b807f8.tar.gz |
Fix an assertion when if_down()ing a ALTQ managed interface. The lock should
have been in place all the time the mtx_assert in the ALTQ code just
discovered the shortcoming.
PR: i386/71195
Tested by: Bettan (PR originator), myself
MFC after: 5 days
Diffstat (limited to 'sys/net/if.c')
-rw-r--r-- | sys/net/if.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/net/if.c b/sys/net/if.c index ef48f1e..8097cc1 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -986,6 +986,7 @@ if_qflush(struct ifaltq *ifq) { struct mbuf *m, *n; + IFQ_LOCK(ifq); #ifdef ALTQ if (ALTQ_IS_ENABLED(ifq)) ALTQ_PURGE(ifq); @@ -998,6 +999,7 @@ if_qflush(struct ifaltq *ifq) ifq->ifq_head = 0; ifq->ifq_tail = 0; ifq->ifq_len = 0; + IFQ_UNLOCK(ifq); } /* |