]> git.baikalelectronics.ru Git - kernel.git/commit
Bluetooth: move adv_instance_cnt read within the device lock
authorNiels Dossche <niels.dossche@ugent.be>
Sat, 12 Feb 2022 23:14:30 +0000 (00:14 +0100)
committerMarcel Holtmann <marcel@holtmann.org>
Fri, 4 Mar 2022 15:30:58 +0000 (16:30 +0100)
commitd48122f2782a46521fa12cb6d302a12513569329
treed648fcbfee8696d8a0a4b6f0bf8f16cf600dcf25
parent6c836d183c8965016adc807c08ef71cfcf1c2c4c
Bluetooth: move adv_instance_cnt read within the device lock

The field adv_instance_cnt is always accessed within a device lock,
except in the function add_advertising. A concurrent remove of an
advertisement with adding another one could result in the if check
"if a new instance was actually added" to not trigger, resulting
in not triggering the "advertising added event".

Signed-off-by: Niels Dossche <niels.dossche@ugent.be>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/mgmt.c