]> 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)
commit13faf1143f02209c49624ad06f527175267d25b9
tree92f7618353b18749fd3d3c39eee5786b105b6232
parent31ae132b3f9c7d1a144c4ed2bf17b8eb31e31617
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