]> git.baikalelectronics.ru Git - kernel.git/commit
Bluetooth: Fix not checking MGMT cmd pending queue
authorBrian Gix <brian.gix@intel.com>
Tue, 1 Mar 2022 22:34:57 +0000 (14:34 -0800)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Wed, 2 Mar 2022 00:10:58 +0000 (16:10 -0800)
commit275f3f64870245b06188f24bdf917e55a813d294
tree92f7618353b18749fd3d3c39eee5786b105b6232
parentcaef14b7530c065fb85d54492768fa48fdb5093e
Bluetooth: Fix not checking MGMT cmd pending queue

A number of places in the MGMT handlers we examine the command queue for
other commands (in progress but not yet complete) that will interact
with the process being performed. However, not all commands go into the
queue if one of:

1. There is no negative side effect of consecutive or redundent commands
2. The command is entirely perform "inline".

This change examines each "pending command" check, and if it is not
needed, deletes the check. Of the remaining pending command checks, we
make sure that the command is in the pending queue by using the
mgmt_pending_add/mgmt_pending_remove pair rather than the
mgmt_pending_new/mgmt_pending_free pair.

Link: https://lore.kernel.org/linux-bluetooth/f648f2e11bb3c2974c32e605a85ac3a9fac944f1.camel@redhat.com/T/
Tested-by: Maxim Levitsky <mlevitsk@redhat.com>
Signed-off-by: Brian Gix <brian.gix@intel.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
net/bluetooth/mgmt.c