<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/bluetooth, branch v5.3.16</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>Revert "Bluetooth: hci_ll: set operational frequency earlier"</title>
<updated>2019-11-29T09:07:56+00:00</updated>
<author>
<name>Adam Ford</name>
<email>aford173@gmail.com</email>
</author>
<published>2019-10-02T11:46:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=de4dcb8fd95248ba09394c8f6f9d9b76259f9f84'/>
<id>de4dcb8fd95248ba09394c8f6f9d9b76259f9f84</id>
<content type='text'>
commit cef456cd354ef485f12d57000c455e83e416a2b6 upstream.

As nice as it would be to update firmware faster, that patch broke
at least two different boards, an OMAP4+WL1285 based Motorola Droid
4, as reported by Sebasian Reichel and the Logic PD i.MX6Q +
WL1837MOD.

This reverts commit a2e02f38eff84f199c8e32359eb213f81f270047.

Signed-off-by: Adam Ford &lt;aford173@gmail.com&gt;
Acked-by: Sebastian Reichel &lt;sebastian.reichel@collabora.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit cef456cd354ef485f12d57000c455e83e416a2b6 upstream.

As nice as it would be to update firmware faster, that patch broke
at least two different boards, an OMAP4+WL1285 based Motorola Droid
4, as reported by Sebasian Reichel and the Logic PD i.MX6Q +
WL1837MOD.

This reverts commit a2e02f38eff84f199c8e32359eb213f81f270047.

Signed-off-by: Adam Ford &lt;aford173@gmail.com&gt;
Acked-by: Sebastian Reichel &lt;sebastian.reichel@collabora.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>Bluetooth: Fix invalid-free in bcsp_close()</title>
<updated>2019-11-29T09:07:52+00:00</updated>
<author>
<name>Tomas Bortoli</name>
<email>tomasbortoli@gmail.com</email>
</author>
<published>2019-11-01T20:42:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=cf9c404f4af6d5a9cb134e69ac969c1ec747ab95'/>
<id>cf9c404f4af6d5a9cb134e69ac969c1ec747ab95</id>
<content type='text'>
commit cf94da6f502d8caecabd56b194541c873c8a7a3c upstream.

Syzbot reported an invalid-free that I introduced fixing a memleak.

bcsp_recv() also frees bcsp-&gt;rx_skb but never nullifies its value.
Nullify bcsp-&gt;rx_skb every time it is freed.

Signed-off-by: Tomas Bortoli &lt;tomasbortoli@gmail.com&gt;
Reported-by: syzbot+a0d209a4676664613e76@syzkaller.appspotmail.com
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Cc: Alexander Potapenko &lt;glider@google.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit cf94da6f502d8caecabd56b194541c873c8a7a3c upstream.

Syzbot reported an invalid-free that I introduced fixing a memleak.

bcsp_recv() also frees bcsp-&gt;rx_skb but never nullifies its value.
Nullify bcsp-&gt;rx_skb every time it is freed.

Signed-off-by: Tomas Bortoli &lt;tomasbortoli@gmail.com&gt;
Reported-by: syzbot+a0d209a4676664613e76@syzkaller.appspotmail.com
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Cc: Alexander Potapenko &lt;glider@google.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>Bluetooth: bpa10x: change return value</title>
<updated>2019-09-04T14:11:46+00:00</updated>
<author>
<name>Navid Emamdoost</name>
<email>navid.emamdoost@gmail.com</email>
</author>
<published>2019-08-31T19:23:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=d94dfd798c4839b642f534580109dc6dfc3901a9'/>
<id>d94dfd798c4839b642f534580109dc6dfc3901a9</id>
<content type='text'>
When returning from bpa10x_send_frame, it is necessary to propagate any
potential errno returned from usb_submit_urb.

Signed-off-by: Navid Emamdoost &lt;navid.emamdoost@gmail.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When returning from bpa10x_send_frame, it is necessary to propagate any
potential errno returned from usb_submit_urb.

Signed-off-by: Navid Emamdoost &lt;navid.emamdoost@gmail.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Bluetooth: hci_qca: disable irqs when spinlock is acquired</title>
<updated>2019-09-04T14:06:08+00:00</updated>
<author>
<name>Harish Bandi</name>
<email>c-hbandi@codeaurora.org</email>
</author>
<published>2019-09-04T04:34:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=31fb1bbdabb34d53e3d83f0353085d9b79977786'/>
<id>31fb1bbdabb34d53e3d83f0353085d9b79977786</id>
<content type='text'>
Looks like Deadlock is observed in hci_qca while performing
stress and stability tests. Since same lock is getting
acquired from qca_wq_awake_rx and hci_ibs_tx_idle_timeout
seeing spinlock recursion, irqs should be disable while
acquiring the spinlock always.

Signed-off-by: Harish Bandi &lt;c-hbandi@codeaurora.org&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Looks like Deadlock is observed in hci_qca while performing
stress and stability tests. Since same lock is getting
acquired from qca_wq_awake_rx and hci_ibs_tx_idle_timeout
seeing spinlock recursion, irqs should be disable while
acquiring the spinlock always.

Signed-off-by: Harish Bandi &lt;c-hbandi@codeaurora.org&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Bluetooth: btrtl: Additional Realtek 8822CE Bluetooth devices</title>
<updated>2019-09-04T14:01:52+00:00</updated>
<author>
<name>Jian-Hong Pan</name>
<email>jian-hong@endlessm.com</email>
</author>
<published>2019-09-03T09:10:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=6d0762b19c5963ff9e178e8af3626532ee04d93d'/>
<id>6d0762b19c5963ff9e178e8af3626532ee04d93d</id>
<content type='text'>
The ASUS X412FA laptop contains a Realtek RTL8822CE device with an
associated BT chip using a USB ID of 04ca:4005. This ID is added to the
driver.

The /sys/kernel/debug/usb/devices portion for this device is:

T:  Bus=01 Lev=01 Prnt=01 Port=09 Cnt=04 Dev#=  4 Spd=12   MxCh= 0
D:  Ver= 1.00 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=04ca ProdID=4005 Rev= 0.00
S:  Manufacturer=Realtek
S:  Product=Bluetooth Radio
S:  SerialNumber=00e04c000001
C:* #Ifs= 2 Cfg#= 1 Atr=a0 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=1ms
E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=03(O) Atr=01(Isoc) MxPS=   0 Ivl=1ms
E:  Ad=83(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
I:  If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=03(O) Atr=01(Isoc) MxPS=   9 Ivl=1ms
E:  Ad=83(I) Atr=01(Isoc) MxPS=   9 Ivl=1ms
I:  If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=03(O) Atr=01(Isoc) MxPS=  17 Ivl=1ms
E:  Ad=83(I) Atr=01(Isoc) MxPS=  17 Ivl=1ms
I:  If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=03(O) Atr=01(Isoc) MxPS=  25 Ivl=1ms
E:  Ad=83(I) Atr=01(Isoc) MxPS=  25 Ivl=1ms
I:  If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=03(O) Atr=01(Isoc) MxPS=  33 Ivl=1ms
E:  Ad=83(I) Atr=01(Isoc) MxPS=  33 Ivl=1ms
I:  If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=03(O) Atr=01(Isoc) MxPS=  49 Ivl=1ms
E:  Ad=83(I) Atr=01(Isoc) MxPS=  49 Ivl=1ms

Buglink: https://bugzilla.kernel.org/show_bug.cgi?id=204707
Signed-off-by: Jian-Hong Pan &lt;jian-hong@endlessm.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The ASUS X412FA laptop contains a Realtek RTL8822CE device with an
associated BT chip using a USB ID of 04ca:4005. This ID is added to the
driver.

The /sys/kernel/debug/usb/devices portion for this device is:

T:  Bus=01 Lev=01 Prnt=01 Port=09 Cnt=04 Dev#=  4 Spd=12   MxCh= 0
D:  Ver= 1.00 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=04ca ProdID=4005 Rev= 0.00
S:  Manufacturer=Realtek
S:  Product=Bluetooth Radio
S:  SerialNumber=00e04c000001
C:* #Ifs= 2 Cfg#= 1 Atr=a0 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=1ms
E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=03(O) Atr=01(Isoc) MxPS=   0 Ivl=1ms
E:  Ad=83(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
I:  If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=03(O) Atr=01(Isoc) MxPS=   9 Ivl=1ms
E:  Ad=83(I) Atr=01(Isoc) MxPS=   9 Ivl=1ms
I:  If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=03(O) Atr=01(Isoc) MxPS=  17 Ivl=1ms
E:  Ad=83(I) Atr=01(Isoc) MxPS=  17 Ivl=1ms
I:  If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=03(O) Atr=01(Isoc) MxPS=  25 Ivl=1ms
E:  Ad=83(I) Atr=01(Isoc) MxPS=  25 Ivl=1ms
I:  If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=03(O) Atr=01(Isoc) MxPS=  33 Ivl=1ms
E:  Ad=83(I) Atr=01(Isoc) MxPS=  33 Ivl=1ms
I:  If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=03(O) Atr=01(Isoc) MxPS=  49 Ivl=1ms
E:  Ad=83(I) Atr=01(Isoc) MxPS=  49 Ivl=1ms

Buglink: https://bugzilla.kernel.org/show_bug.cgi?id=204707
Signed-off-by: Jian-Hong Pan &lt;jian-hong@endlessm.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "Bluetooth: btusb: driver to enable the usb-wakeup feature"</title>
<updated>2019-08-30T07:45:15+00:00</updated>
<author>
<name>Mario Limonciello</name>
<email>mario.limonciello@dell.com</email>
</author>
<published>2019-08-19T17:04:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=1ffdb51f28e8ec6be0a2b812c1765b5cf5c44a8f'/>
<id>1ffdb51f28e8ec6be0a2b812c1765b5cf5c44a8f</id>
<content type='text'>
This reverts commit a0085f2510e8976614ad8f766b209448b385492f.

This commit has caused regressions in notebooks that support suspend
to idle such as the XPS 9360, XPS 9370 and XPS 9380.

These notebooks will wakeup from suspend to idle from an unsolicited
advertising packet from an unpaired BLE device.

In a bug report it was sugggested that this is caused by a generic
lack of LE privacy support.  Revert this commit until that behavior
can be avoided by the kernel.

Fixes: a0085f2510e8 ("Bluetooth: btusb: driver to enable the usb-wakeup feature")
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=200039
Link: https://marc.info/?l=linux-bluetooth&amp;m=156441081612627&amp;w=2
Link: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/750073/
CC: Bastien Nocera &lt;hadess@hadess.net&gt;
CC: Christian Kellner &lt;ckellner@redhat.com&gt;
CC: Sukumar Ghorai &lt;sukumar.ghorai@intel.com&gt;
Signed-off-by: Mario Limonciello &lt;mario.limonciello@dell.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit a0085f2510e8976614ad8f766b209448b385492f.

This commit has caused regressions in notebooks that support suspend
to idle such as the XPS 9360, XPS 9370 and XPS 9380.

These notebooks will wakeup from suspend to idle from an unsolicited
advertising packet from an unpaired BLE device.

In a bug report it was sugggested that this is caused by a generic
lack of LE privacy support.  Revert this commit until that behavior
can be avoided by the kernel.

Fixes: a0085f2510e8 ("Bluetooth: btusb: driver to enable the usb-wakeup feature")
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=200039
Link: https://marc.info/?l=linux-bluetooth&amp;m=156441081612627&amp;w=2
Link: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/750073/
CC: Bastien Nocera &lt;hadess@hadess.net&gt;
CC: Christian Kellner &lt;ckellner@redhat.com&gt;
CC: Sukumar Ghorai &lt;sukumar.ghorai@intel.com&gt;
Signed-off-by: Mario Limonciello &lt;mario.limonciello@dell.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Bluetooth: hci_qca: Skip 1 error print in device_want_to_sleep()</title>
<updated>2019-08-14T13:50:46+00:00</updated>
<author>
<name>Rocky Liao</name>
<email>rjliao@codeaurora.org</email>
</author>
<published>2019-08-14T07:42:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=6600c0808e2ea2939009e53983f066fe38bd308a'/>
<id>6600c0808e2ea2939009e53983f066fe38bd308a</id>
<content type='text'>
Don't fall through to print error message when receive sleep indication
in HCI_IBS_RX_ASLEEP state, this is allowed behavior.

Signed-off-by: Rocky Liao &lt;rjliao@codeaurora.org&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Don't fall through to print error message when receive sleep indication
in HCI_IBS_RX_ASLEEP state, this is allowed behavior.

Signed-off-by: Rocky Liao &lt;rjliao@codeaurora.org&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Bluetooth: btqca: Reset download type to default</title>
<updated>2019-08-12T17:07:15+00:00</updated>
<author>
<name>Balakrishna Godavarthi</name>
<email>bgodavar@codeaurora.org</email>
</author>
<published>2019-08-08T08:56:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=12072a68961af20e84ddb4aba2387ba5f70e8c14'/>
<id>12072a68961af20e84ddb4aba2387ba5f70e8c14</id>
<content type='text'>
This patch will reset the download flag to default value
before retrieving the download mode type.

Fixes: 32646db8cc28 ("Bluetooth: btqca: inject command complete event during fw download")
Signed-off-by: Balakrishna Godavarthi &lt;bgodavar@codeaurora.org&gt;
Tested-by: Claire Chang &lt;tientzu@chromium.org&gt;
Reviewed-by: Claire Chang &lt;tientzu@chromium.org&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch will reset the download flag to default value
before retrieving the download mode type.

Fixes: 32646db8cc28 ("Bluetooth: btqca: inject command complete event during fw download")
Signed-off-by: Balakrishna Godavarthi &lt;bgodavar@codeaurora.org&gt;
Tested-by: Claire Chang &lt;tientzu@chromium.org&gt;
Reviewed-by: Claire Chang &lt;tientzu@chromium.org&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Bluetooth: btqca: release_firmware after qca_inject_cmd_complete_event</title>
<updated>2019-08-12T16:36:09+00:00</updated>
<author>
<name>Claire Chang</name>
<email>tientzu@chromium.org</email>
</author>
<published>2019-08-06T09:56:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=c7c5ae2902bf8fe9acc75f798c0de75ac9295ccf'/>
<id>c7c5ae2902bf8fe9acc75f798c0de75ac9295ccf</id>
<content type='text'>
commit 32646db8cc28 ("Bluetooth: btqca: inject command complete event
during fw download") added qca_inject_cmd_complete_event() for certain
qualcomm chips. However, qca_download_firmware() will return without
calling release_firmware() in this case.

This leads to a memory leak like the following found by kmemleak:

unreferenced object 0xfffffff3868a5880 (size 128):
  comm "kworker/u17:5", pid 347, jiffies 4294676481 (age 312.157s)
  hex dump (first 32 bytes):
    ac fd 00 00 00 00 00 00 00 d0 7e 17 80 ff ff ff  ..........~.....
    00 00 00 00 00 00 00 00 00 59 8a 86 f3 ff ff ff  .........Y......
  backtrace:
    [&lt;00000000978ce31d&gt;] kmem_cache_alloc_trace+0x194/0x298
    [&lt;000000006ea0398c&gt;] _request_firmware+0x74/0x4e4
    [&lt;000000004da31ca0&gt;] request_firmware+0x44/0x64
    [&lt;0000000094572996&gt;] qca_download_firmware+0x74/0x6e4 [btqca]
    [&lt;00000000b24d615a&gt;] qca_uart_setup+0xc0/0x2b0 [btqca]
    [&lt;00000000364a6d5a&gt;] qca_setup+0x204/0x570 [hci_uart]
    [&lt;000000006be1a544&gt;] hci_uart_setup+0xa8/0x148 [hci_uart]
    [&lt;00000000d64c0f4f&gt;] hci_dev_do_open+0x144/0x530 [bluetooth]
    [&lt;00000000f69f5110&gt;] hci_power_on+0x84/0x288 [bluetooth]
    [&lt;00000000d4151583&gt;] process_one_work+0x210/0x420
    [&lt;000000003cf3dcfb&gt;] worker_thread+0x2c4/0x3e4
    [&lt;000000007ccaf055&gt;] kthread+0x124/0x134
    [&lt;00000000bef1f723&gt;] ret_from_fork+0x10/0x18
    [&lt;00000000c36ee3dd&gt;] 0xffffffffffffffff
unreferenced object 0xfffffff37b16de00 (size 128):
  comm "kworker/u17:5", pid 347, jiffies 4294676873 (age 311.766s)
  hex dump (first 32 bytes):
    da 07 00 00 00 00 00 00 00 50 ff 0b 80 ff ff ff  .........P......
    00 00 00 00 00 00 00 00 00 dd 16 7b f3 ff ff ff  ...........{....
  backtrace:
    [&lt;00000000978ce31d&gt;] kmem_cache_alloc_trace+0x194/0x298
    [&lt;000000006ea0398c&gt;] _request_firmware+0x74/0x4e4
    [&lt;000000004da31ca0&gt;] request_firmware+0x44/0x64
    [&lt;0000000094572996&gt;] qca_download_firmware+0x74/0x6e4 [btqca]
    [&lt;000000000cde20a9&gt;] qca_uart_setup+0x144/0x2b0 [btqca]
    [&lt;00000000364a6d5a&gt;] qca_setup+0x204/0x570 [hci_uart]
    [&lt;000000006be1a544&gt;] hci_uart_setup+0xa8/0x148 [hci_uart]
    [&lt;00000000d64c0f4f&gt;] hci_dev_do_open+0x144/0x530 [bluetooth]
    [&lt;00000000f69f5110&gt;] hci_power_on+0x84/0x288 [bluetooth]
    [&lt;00000000d4151583&gt;] process_one_work+0x210/0x420
    [&lt;000000003cf3dcfb&gt;] worker_thread+0x2c4/0x3e4
    [&lt;000000007ccaf055&gt;] kthread+0x124/0x134
    [&lt;00000000bef1f723&gt;] ret_from_fork+0x10/0x18
    [&lt;00000000c36ee3dd&gt;] 0xffffffffffffffff

Make sure release_firmware() is called aftre
qca_inject_cmd_complete_event() to avoid the memory leak.

Fixes: 32646db8cc28 ("Bluetooth: btqca: inject command complete event during fw download")
Signed-off-by: Claire Chang &lt;tientzu@chromium.org&gt;
Reviewed-by: Balakrishna Godavarthi &lt;bgodavar@codeaurora.org&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 32646db8cc28 ("Bluetooth: btqca: inject command complete event
during fw download") added qca_inject_cmd_complete_event() for certain
qualcomm chips. However, qca_download_firmware() will return without
calling release_firmware() in this case.

This leads to a memory leak like the following found by kmemleak:

unreferenced object 0xfffffff3868a5880 (size 128):
  comm "kworker/u17:5", pid 347, jiffies 4294676481 (age 312.157s)
  hex dump (first 32 bytes):
    ac fd 00 00 00 00 00 00 00 d0 7e 17 80 ff ff ff  ..........~.....
    00 00 00 00 00 00 00 00 00 59 8a 86 f3 ff ff ff  .........Y......
  backtrace:
    [&lt;00000000978ce31d&gt;] kmem_cache_alloc_trace+0x194/0x298
    [&lt;000000006ea0398c&gt;] _request_firmware+0x74/0x4e4
    [&lt;000000004da31ca0&gt;] request_firmware+0x44/0x64
    [&lt;0000000094572996&gt;] qca_download_firmware+0x74/0x6e4 [btqca]
    [&lt;00000000b24d615a&gt;] qca_uart_setup+0xc0/0x2b0 [btqca]
    [&lt;00000000364a6d5a&gt;] qca_setup+0x204/0x570 [hci_uart]
    [&lt;000000006be1a544&gt;] hci_uart_setup+0xa8/0x148 [hci_uart]
    [&lt;00000000d64c0f4f&gt;] hci_dev_do_open+0x144/0x530 [bluetooth]
    [&lt;00000000f69f5110&gt;] hci_power_on+0x84/0x288 [bluetooth]
    [&lt;00000000d4151583&gt;] process_one_work+0x210/0x420
    [&lt;000000003cf3dcfb&gt;] worker_thread+0x2c4/0x3e4
    [&lt;000000007ccaf055&gt;] kthread+0x124/0x134
    [&lt;00000000bef1f723&gt;] ret_from_fork+0x10/0x18
    [&lt;00000000c36ee3dd&gt;] 0xffffffffffffffff
unreferenced object 0xfffffff37b16de00 (size 128):
  comm "kworker/u17:5", pid 347, jiffies 4294676873 (age 311.766s)
  hex dump (first 32 bytes):
    da 07 00 00 00 00 00 00 00 50 ff 0b 80 ff ff ff  .........P......
    00 00 00 00 00 00 00 00 00 dd 16 7b f3 ff ff ff  ...........{....
  backtrace:
    [&lt;00000000978ce31d&gt;] kmem_cache_alloc_trace+0x194/0x298
    [&lt;000000006ea0398c&gt;] _request_firmware+0x74/0x4e4
    [&lt;000000004da31ca0&gt;] request_firmware+0x44/0x64
    [&lt;0000000094572996&gt;] qca_download_firmware+0x74/0x6e4 [btqca]
    [&lt;000000000cde20a9&gt;] qca_uart_setup+0x144/0x2b0 [btqca]
    [&lt;00000000364a6d5a&gt;] qca_setup+0x204/0x570 [hci_uart]
    [&lt;000000006be1a544&gt;] hci_uart_setup+0xa8/0x148 [hci_uart]
    [&lt;00000000d64c0f4f&gt;] hci_dev_do_open+0x144/0x530 [bluetooth]
    [&lt;00000000f69f5110&gt;] hci_power_on+0x84/0x288 [bluetooth]
    [&lt;00000000d4151583&gt;] process_one_work+0x210/0x420
    [&lt;000000003cf3dcfb&gt;] worker_thread+0x2c4/0x3e4
    [&lt;000000007ccaf055&gt;] kthread+0x124/0x134
    [&lt;00000000bef1f723&gt;] ret_from_fork+0x10/0x18
    [&lt;00000000c36ee3dd&gt;] 0xffffffffffffffff

Make sure release_firmware() is called aftre
qca_inject_cmd_complete_event() to avoid the memory leak.

Fixes: 32646db8cc28 ("Bluetooth: btqca: inject command complete event during fw download")
Signed-off-by: Claire Chang &lt;tientzu@chromium.org&gt;
Reviewed-by: Balakrishna Godavarthi &lt;bgodavar@codeaurora.org&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Bluetooth: hci_qca: Send VS pre shutdown command.</title>
<updated>2019-08-12T16:23:50+00:00</updated>
<author>
<name>Harish Bandi</name>
<email>c-hbandi@codeaurora.org</email>
</author>
<published>2019-07-12T05:09:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=a2780889e247561744dd8efbd3478a1999b72ae3'/>
<id>a2780889e247561744dd8efbd3478a1999b72ae3</id>
<content type='text'>
WCN399x chips are coex chips, it needs a VS pre shutdown
command while turning off the BT. So that chip can inform
BT is OFF to other active clients.

Signed-off-by: Harish Bandi &lt;c-hbandi@codeaurora.org&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
WCN399x chips are coex chips, it needs a VS pre shutdown
command while turning off the BT. So that chip can inform
BT is OFF to other active clients.

Signed-off-by: Harish Bandi &lt;c-hbandi@codeaurora.org&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
