<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/net/bluetooth/hci_request.c, branch v6.1.174</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.1.174</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.1.174'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2024-04-17T09:18:22+00:00</updated>
<entry>
<title>Bluetooth: Fix memory leak in hci_req_sync_complete()</title>
<updated>2024-04-17T09:18:22+00:00</updated>
<author>
<name>Dmitry Antipov</name>
<email>dmantipov@yandex.ru</email>
</author>
<published>2024-04-02T11:32:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=66fab1e120b39f8f47a94186ddee36006fc02ca8'/>
<id>urn:sha1:66fab1e120b39f8f47a94186ddee36006fc02ca8</id>
<content type='text'>
commit 45d355a926ab40f3ae7bc0b0a00cb0e3e8a5a810 upstream.

In 'hci_req_sync_complete()', always free the previous sync
request state before assigning reference to a new one.

Reported-by: syzbot+39ec16ff6cc18b1d066d@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=39ec16ff6cc18b1d066d
Cc: stable@vger.kernel.org
Fixes: f60cb30579d3 ("Bluetooth: Convert hci_req_sync family of function to new request API")
Signed-off-by: Dmitry Antipov &lt;dmantipov@yandex.ru&gt;
Signed-off-by: Luiz Augusto von Dentz &lt;luiz.von.dentz@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Bluetooth: hci_core: Cancel request on command timeout</title>
<updated>2024-03-26T22:20:40+00:00</updated>
<author>
<name>Luiz Augusto von Dentz</name>
<email>luiz.von.dentz@intel.com</email>
</author>
<published>2024-01-09T18:45:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1b6cfa4c760e5f3729e21b725c89f6ddb9be5abf'/>
<id>urn:sha1:1b6cfa4c760e5f3729e21b725c89f6ddb9be5abf</id>
<content type='text'>
[ Upstream commit 63298d6e752fc0ec7f5093860af8bc9f047b30c8 ]

If command has timed out call __hci_cmd_sync_cancel to notify the
hci_req since it will inevitably cause a timeout.

This also rework the code around __hci_cmd_sync_cancel since it was
wrongly assuming it needs to cancel timer as well, but sometimes the
timers have not been started or in fact they already had timed out in
which case they don't need to be cancel yet again.

Signed-off-by: Luiz Augusto von Dentz &lt;luiz.von.dentz@intel.com&gt;
Stable-dep-of: 2615fd9a7c25 ("Bluetooth: hci_sync: Fix overwriting request callback")
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>Bluetooth: silence a dmesg error message in hci_request.c</title>
<updated>2022-12-02T21:09:30+00:00</updated>
<author>
<name>Mateusz Jończyk</name>
<email>mat.jonczyk@o2.pl</email>
</author>
<published>2022-11-16T20:28:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=696bd3622138bfad0dda9ad7311886b8e6f5ea10'/>
<id>urn:sha1:696bd3622138bfad0dda9ad7311886b8e6f5ea10</id>
<content type='text'>
On kernel 6.1-rcX, I have been getting the following dmesg error message
on every boot, resume from suspend and rfkill unblock of the Bluetooth
device:

	Bluetooth: hci0: HCI_REQ-0xfcf0

After some investigation, it turned out to be caused by
commit dd50a864ffae ("Bluetooth: Delete unreferenced hci_request code")
which modified hci_req_add() in net/bluetooth/hci_request.c to always
print an error message when it is executed. In my case, the function was
executed by msft_set_filter_enable() in net/bluetooth/msft.c, which
provides support for Microsoft vendor opcodes.

As explained by Brian Gix, "the error gets logged because it is using a
deprecated (but still working) mechanism to issue HCI opcodes" [1]. So
this is just a debugging tool to show that a deprecated function is
executed. As such, it should not be included in the mainline kernel.
See for example
commit 771c035372a0 ("deprecate the '__deprecated' attribute warnings entirely and for good")
Additionally, this error message is cryptic and the user is not able to
do anything about it.

[1]
Link: https://lore.kernel.org/lkml/beb8dcdc3aee4c5c833aa382f35995f17e7961a1.camel@intel.com/

Fixes: dd50a864ffae ("Bluetooth: Delete unreferenced hci_request code")
Signed-off-by: Mateusz Jończyk &lt;mat.jonczyk@o2.pl&gt;
Cc: Brian Gix &lt;brian.gix@intel.com&gt;
Cc: Luiz Augusto von Dentz &lt;luiz.von.dentz@intel.com&gt;
Cc: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Cc: Johan Hedberg &lt;johan.hedberg@gmail.com&gt;
Signed-off-by: Luiz Augusto von Dentz &lt;luiz.von.dentz@intel.com&gt;
</content>
</entry>
<entry>
<title>Bluetooth: Move hci_abort_conn to hci_conn.c</title>
<updated>2022-08-31T22:45:56+00:00</updated>
<author>
<name>Brian Gix</name>
<email>brian.gix@intel.com</email>
</author>
<published>2022-08-16T16:41:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1a942de092c0b96216864fedcb4d8822ce3fc12e'/>
<id>urn:sha1:1a942de092c0b96216864fedcb4d8822ce3fc12e</id>
<content type='text'>
hci_abort_conn() is a wrapper around a number of DISCONNECT and
CREATE_CONN_CANCEL commands that was being invoked from hci_request
request queues, which are now deprecated. There are two versions:
hci_abort_conn() which can be invoked from the hci_event thread, and
hci_abort_conn_sync() which can be invoked within a hci_sync cmd chain.

Signed-off-by: Brian Gix &lt;brian.gix@intel.com&gt;
Signed-off-by: Luiz Augusto von Dentz &lt;luiz.von.dentz@intel.com&gt;
</content>
</entry>
<entry>
<title>Bluetooth: convert hci_update_adv_data to hci_sync</title>
<updated>2022-08-25T23:20:30+00:00</updated>
<author>
<name>Brian Gix</name>
<email>brian.gix@intel.com</email>
</author>
<published>2022-08-05T23:42:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=651cd3d65b0f76a2198fcf3a80ce5d53dd267717'/>
<id>urn:sha1:651cd3d65b0f76a2198fcf3a80ce5d53dd267717</id>
<content type='text'>
hci_update_adv_data() is called from hci_event and hci_core due to
events from the controller. The prior function used the deprecated
hci_request method, and the new one uses hci_sync.c

Signed-off-by: Brian Gix &lt;brian.gix@intel.com&gt;
Signed-off-by: Luiz Augusto von Dentz &lt;luiz.von.dentz@intel.com&gt;
</content>
</entry>
<entry>
<title>Bluetooth: move hci_get_random_address() to hci_sync</title>
<updated>2022-08-25T23:20:11+00:00</updated>
<author>
<name>Brian Gix</name>
<email>brian.gix@intel.com</email>
</author>
<published>2022-08-05T23:42:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3fe318ee72c54506534f51b4b4dfb19e0e0df2db'/>
<id>urn:sha1:3fe318ee72c54506534f51b4b4dfb19e0e0df2db</id>
<content type='text'>
This function has no dependencies on the deprecated hci_request
mechanism, so has been moved unchanged to hci_sync.c

Signed-off-by: Brian Gix &lt;brian.gix@intel.com&gt;
Signed-off-by: Luiz Augusto von Dentz &lt;luiz.von.dentz@intel.com&gt;
</content>
</entry>
<entry>
<title>Bluetooth: Delete unreferenced hci_request code</title>
<updated>2022-08-25T23:19:56+00:00</updated>
<author>
<name>Brian Gix</name>
<email>brian.gix@intel.com</email>
</author>
<published>2022-08-05T23:42:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=dd50a864ffaece5b75621a84ae8d6e3483ce6732'/>
<id>urn:sha1:dd50a864ffaece5b75621a84ae8d6e3483ce6732</id>
<content type='text'>
This patch deletes a whole bunch of code no longer reached because the
functionality was recoded using hci_sync.c

Signed-off-by: Brian Gix &lt;brian.gix@intel.com&gt;
Signed-off-by: Luiz Augusto von Dentz &lt;luiz.von.dentz@intel.com&gt;
</content>
</entry>
<entry>
<title>Bluetooth: Move Adv Instance timer to hci_sync</title>
<updated>2022-08-25T23:19:37+00:00</updated>
<author>
<name>Brian Gix</name>
<email>brian.gix@intel.com</email>
</author>
<published>2022-08-05T23:42:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c249ea9b4309cf3250c5bbb42a05d38d0ed9071c'/>
<id>urn:sha1:c249ea9b4309cf3250c5bbb42a05d38d0ed9071c</id>
<content type='text'>
The Advertising Instance expiration timer adv_instance_expire was
handled with the deprecated hci_request mechanism, rather than it's
replacement: hci_sync.

Signed-off-by: Brian Gix &lt;brian.gix@intel.com&gt;
Signed-off-by: Luiz Augusto von Dentz &lt;luiz.von.dentz@intel.com&gt;
</content>
</entry>
<entry>
<title>Bluetooth: Convert SCO configure_datapath to hci_sync</title>
<updated>2022-08-25T23:19:22+00:00</updated>
<author>
<name>Brian Gix</name>
<email>brian.gix@intel.com</email>
</author>
<published>2022-08-05T23:42:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e07a06b4eb417f5271d33ce2240e93c62d98b7b4'/>
<id>urn:sha1:e07a06b4eb417f5271d33ce2240e93c62d98b7b4</id>
<content type='text'>
Recoding HCI cmds to offload SCO codec to use hci_sync mechanism rather
than deprecated hci_request mechanism.

Signed-off-by: Brian Gix &lt;brian.gix@intel.com&gt;
Signed-off-by: Luiz Augusto von Dentz &lt;luiz.von.dentz@intel.com&gt;
</content>
</entry>
<entry>
<title>Bluetooth: Delete unused hci_req_stop_discovery()</title>
<updated>2022-08-25T23:19:07+00:00</updated>
<author>
<name>Brian Gix</name>
<email>brian.gix@intel.com</email>
</author>
<published>2022-08-05T23:42:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9e63767dd58a388ca1c000058f0bf84abf154b48'/>
<id>urn:sha1:9e63767dd58a388ca1c000058f0bf84abf154b48</id>
<content type='text'>
hci_req_stop_discovery has been deprecated in favor of
hci_stop_discovery_sync() as part of transition to hci_sync.c

Signed-off-by: Brian Gix &lt;brian.gix@intel.com&gt;
Signed-off-by: Luiz Augusto von Dentz &lt;luiz.von.dentz@intel.com&gt;
</content>
</entry>
</feed>
