diff options
author | Thomas Pugliese <thomas.pugliese@gmail.com> | 2013-12-20 19:01:03 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-12-20 20:19:44 (GMT) |
commit | 1fc671b3be8f671482871d9a0b577b6d96914e8e (patch) | |
tree | 09232d31e58b5ffad10dbc560db4d8fad45badab /init/do_mounts.h | |
parent | bf359dff2346d490dbbbe0fcc4aa674625803da5 (diff) | |
download | linux-1fc671b3be8f671482871d9a0b577b6d96914e8e.tar.xz |
uwb: move mutex_lock to error case in uwbd_evt_handle_rc_bp_slot_change
Only acquire rc->uwb_dev.mutex in the error case in
uwbd_evt_handle_rc_bp_slot_change. This fixes a bug where establishing
a reservation on a new channel will fail if we were unable to establish
a reservation on the previous channel due to DRP conflict.
If rc->uwb_dev.mutex is acquired in the non-error case when the uwb
system is attempting to start beaconing, it will block because the start
beaconing code is holding this mutex. This prevents any other
notifications from the URC from being processed. In particular, the
DRP_AVAILABILITY notification will not be processed during the start
beaconing process which can result in a failure to establish a
reservation. It is safe to not hold the mutex in the non-error
case since the only other place rc->uwb_dev.beacon_slot is accessed is
in the same worker thread that uwbd_evt_handle_rc_bp_slot_change
executes in.
Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'init/do_mounts.h')
0 files changed, 0 insertions, 0 deletions