ether8169: fix deadlock in allocation error case for attach. (thanks erik)
typo in error case, should qunlock() instead of qlock().
This commit is contained in:
parent
44c32071dc
commit
05d3cc414d
1 changed files with 3 additions and 1 deletions
|
@ -765,11 +765,13 @@ rtl8169attach(Ether* edev)
|
||||||
ctlr->rd = nil;
|
ctlr->rd = nil;
|
||||||
free(ctlr->dtcc);
|
free(ctlr->dtcc);
|
||||||
ctlr->dtcc = nil;
|
ctlr->dtcc = nil;
|
||||||
qlock(&ctlr->alock);
|
qunlock(&ctlr->alock);
|
||||||
error(Enomem);
|
error(Enomem);
|
||||||
}
|
}
|
||||||
ctlr->init = 1;
|
ctlr->init = 1;
|
||||||
kproc("rtl8169", rtl8169reseter, edev);
|
kproc("rtl8169", rtl8169reseter, edev);
|
||||||
|
|
||||||
|
/* rtl8169reseter() does qunlock(&ctlr->alock) when complete */
|
||||||
qlock(&ctlr->alock);
|
qlock(&ctlr->alock);
|
||||||
}
|
}
|
||||||
qunlock(&ctlr->alock);
|
qunlock(&ctlr->alock);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue