mirror of
https://github.com/adulau/aha.git
synced 2024-12-27 19:26:25 +00:00
uwb: lock rc->rsvs_lock with spin_lock_bh()
rc->rsvs_lock may be taken in a timer so lock it with spin_lock_bh(). Signed-off-by: David Vrabel <david.vrabel@csr.com>
This commit is contained in:
parent
dff243f7cb
commit
8f5140a6a0
2 changed files with 4 additions and 4 deletions
|
@ -66,14 +66,14 @@ static void uwb_rc_set_drp_cmd_done(struct uwb_rc *rc, void *arg,
|
||||||
} else
|
} else
|
||||||
dev_err(&rc->uwb_dev.dev, "SET-DRP-IE: timeout\n");
|
dev_err(&rc->uwb_dev.dev, "SET-DRP-IE: timeout\n");
|
||||||
|
|
||||||
spin_lock(&rc->rsvs_lock);
|
spin_lock_bh(&rc->rsvs_lock);
|
||||||
if (rc->set_drp_ie_pending > 1) {
|
if (rc->set_drp_ie_pending > 1) {
|
||||||
rc->set_drp_ie_pending = 0;
|
rc->set_drp_ie_pending = 0;
|
||||||
uwb_rsv_queue_update(rc);
|
uwb_rsv_queue_update(rc);
|
||||||
} else {
|
} else {
|
||||||
rc->set_drp_ie_pending = 0;
|
rc->set_drp_ie_pending = 0;
|
||||||
}
|
}
|
||||||
spin_unlock(&rc->rsvs_lock);
|
spin_unlock_bh(&rc->rsvs_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -870,7 +870,7 @@ void uwb_rsv_queue_update(struct uwb_rc *rc)
|
||||||
*/
|
*/
|
||||||
void uwb_rsv_sched_update(struct uwb_rc *rc)
|
void uwb_rsv_sched_update(struct uwb_rc *rc)
|
||||||
{
|
{
|
||||||
spin_lock(&rc->rsvs_lock);
|
spin_lock_bh(&rc->rsvs_lock);
|
||||||
if (!delayed_work_pending(&rc->rsv_update_work)) {
|
if (!delayed_work_pending(&rc->rsv_update_work)) {
|
||||||
if (rc->set_drp_ie_pending > 0) {
|
if (rc->set_drp_ie_pending > 0) {
|
||||||
rc->set_drp_ie_pending++;
|
rc->set_drp_ie_pending++;
|
||||||
|
@ -879,7 +879,7 @@ void uwb_rsv_sched_update(struct uwb_rc *rc)
|
||||||
uwb_rsv_queue_update(rc);
|
uwb_rsv_queue_update(rc);
|
||||||
}
|
}
|
||||||
unlock:
|
unlock:
|
||||||
spin_unlock(&rc->rsvs_lock);
|
spin_unlock_bh(&rc->rsvs_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue