]> git.baikalelectronics.ru Git - kernel.git/commit
Bluetooth: Delay check for conn->smp in smp_conn_security()
authorJohan Hedberg <johan.hedberg@intel.com>
Fri, 4 Sep 2015 09:22:46 +0000 (12:22 +0300)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 17 Sep 2015 10:28:27 +0000 (12:28 +0200)
commitc901c0e8bd28add94f9b606ccff5cb060952524b
tree3f3f0b3c775621eef856097a6c5ef7847452f502
parentff91be79371aaa7201d0803682bdf1ee40b2f34b
Bluetooth: Delay check for conn->smp in smp_conn_security()

There are several actions that smp_conn_security() might make that do
not require a valid SMP context (conn->smp pointer). One of these
actions is to encrypt the link with an existing LTK. If the SMP
context wasn't initialized properly we should still allow the
independent actions to be done, i.e. the check for the context should
only be done at the last possible moment.

Reported-by: Chuck Ebbert <cebbert.lkml@gmail.com>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Cc: stable@vger.kernel.org # 4.0+
net/bluetooth/smp.c