oops, don't hold mycpu() result across intr_off()
This commit is contained in:
parent
2c0338fe42
commit
535ac52efa
|
@ -87,13 +87,12 @@ holding(struct spinlock *lk)
|
||||||
void
|
void
|
||||||
push_off(void)
|
push_off(void)
|
||||||
{
|
{
|
||||||
struct cpu *c = mycpu();
|
|
||||||
int old = intr_get();
|
int old = intr_get();
|
||||||
|
|
||||||
intr_off();
|
intr_off();
|
||||||
if(c->noff == 0)
|
if(mycpu()->noff == 0)
|
||||||
c->intena = old;
|
mycpu()->intena = old;
|
||||||
c->noff += 1;
|
mycpu()->noff += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in a new issue