]> git.baikalelectronics.ru Git - kernel.git/commit
Bluetooth: Fix race condition with conn->sec_level
authorJohan Hedberg <johan.hedberg@nokia.com>
Wed, 19 Jan 2011 06:36:52 +0000 (12:06 +0530)
committerGustavo F. Padovan <padovan@profusion.mobi>
Wed, 19 Jan 2011 16:43:11 +0000 (14:43 -0200)
commit55d5275591dd7f0e4a1661bdbdea8a16cf48b8db
treee646cb50bd43f9a74583391805529d3397934f42
parent00b3a82f0915080a3b4f20e7c6cb9b24dd2cb3c4
Bluetooth: Fix race condition with conn->sec_level

The conn->sec_level value is supposed to represent the current level of
security that the connection has. However, by assigning to it before
requesting authentication it will have the wrong value during the
authentication procedure. To fix this a pending_sec_level variable is
added which is used to track the desired security level while making
sure that sec_level always represents the current level of security.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
include/net/bluetooth/hci_core.h
net/bluetooth/hci_conn.c
net/bluetooth/hci_event.c