]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
uwb: lock rc->rsvs_lock with spin_lock_bh()
authorDavid Vrabel <david.vrabel@csr.com>
Fri, 23 Jan 2009 12:57:20 +0000 (12:57 +0000)
committerDavid Vrabel <david.vrabel@csr.com>
Fri, 23 Jan 2009 12:57:20 +0000 (12:57 +0000)
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>
drivers/uwb/drp.c
drivers/uwb/rsv.c

index 2b4f9406789d0d7eb2e4deadb9446bd22208dd1b..4f5ca99a04b9de20c513b015e84e7b6d0ad972e3 100644 (file)
@@ -66,14 +66,14 @@ static void uwb_rc_set_drp_cmd_done(struct uwb_rc *rc, void *arg,
        } else
                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) {
                rc->set_drp_ie_pending = 0;
                uwb_rsv_queue_update(rc);       
        } else {
                rc->set_drp_ie_pending = 0;     
        }
-       spin_unlock(&rc->rsvs_lock);
+       spin_unlock_bh(&rc->rsvs_lock);
 }
 
 /**
index 886f977cd2eaf386ee6706af6c8e53be7a921e85..6b76f4bb4cc7dc5a25da658c0cc2d006ba3662f0 100644 (file)
@@ -870,7 +870,7 @@ void uwb_rsv_queue_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 (rc->set_drp_ie_pending > 0) {
                        rc->set_drp_ie_pending++;
@@ -879,7 +879,7 @@ void uwb_rsv_sched_update(struct uwb_rc *rc)
                uwb_rsv_queue_update(rc);
        }
 unlock:
-       spin_unlock(&rc->rsvs_lock);
+       spin_unlock_bh(&rc->rsvs_lock);
 }
 
 /*