diff options
author | maxim <maxim@FreeBSD.org> | 2003-07-25 09:59:16 +0000 |
---|---|---|
committer | maxim <maxim@FreeBSD.org> | 2003-07-25 09:59:16 +0000 |
commit | ce1e0b629b698996f5f44be8c446529765f64342 (patch) | |
tree | 245b95102c4054fe5ec4d66b6de87acc48f571a8 /sys/netinet | |
parent | a2dfeb37f745904057f2c1f08051669174bb8912 (diff) | |
download | FreeBSD-src-ce1e0b629b698996f5f44be8c446529765f64342.zip FreeBSD-src-ce1e0b629b698996f5f44be8c446529765f64342.tar.gz |
o Do not overwrite saved interrupt priority level by alloc_hash(),
use a separate variable.
o Restore interrupt priority level before return (no-op in HEAD).
Spotted by: Don Bowman <don@sandvine.com>
MFC after: 5 days
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/ip_dummynet.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/sys/netinet/ip_dummynet.c b/sys/netinet/ip_dummynet.c index 9585cc7..0fd9906 100644 --- a/sys/netinet/ip_dummynet.c +++ b/sys/netinet/ip_dummynet.c @@ -1516,7 +1516,7 @@ set_fs_parms(struct dn_flow_set *x, struct dn_flow_set *src) static int config_pipe(struct dn_pipe *p) { - int i, s; + int i, r, s; struct dn_flow_set *pfs = &(p->fs); struct dn_flow_queue *q; @@ -1570,10 +1570,11 @@ config_pipe(struct dn_pipe *p) if ( x->fs.rq == NULL ) { /* a new pipe */ - s = alloc_hash(&(x->fs), pfs) ; - if (s) { + r = alloc_hash(&(x->fs), pfs) ; + if (r) { free(x, M_DUMMYNET); - return s ; + splx(s); + return r ; } x->next = b ; if (a == NULL) @@ -1614,10 +1615,11 @@ config_pipe(struct dn_pipe *p) set_fs_parms(x, pfs); if ( x->rq == NULL ) { /* a new flow_set */ - s = alloc_hash(x, pfs) ; + r = alloc_hash(x, pfs) ; if (s) { free(x, M_DUMMYNET); - return s ; + splx(s); + return r ; } x->next = b; if (a == NULL) |