android_kernel_motorola_sm6225/drivers
Arkadiusz Bokowy 4e31ae6c40 Bluetooth: vhci: Fix race when opening vhci device
commit 92d4abd66f7080075793970fc8f241239e58a9e7 upstream.

When the vhci device is opened in the two-step way, i.e.: open device
then write a vendor packet with requested controller type, the device
shall respond with a vendor packet which includes HCI index of created
interface.

When the virtual HCI is created, the host sends a reset request to the
controller. This request is processed by the vhci_send_frame() function.
However, this request is send by a different thread, so it might happen
that this HCI request will be received before the vendor response is
queued in the read queue. This results in the HCI vendor response and
HCI reset request inversion in the read queue which leads to improper
behavior of btvirt:

> dmesg
[1754256.640122] Bluetooth: MGMT ver 1.22
[1754263.023806] Bluetooth: MGMT ver 1.22
[1754265.043775] Bluetooth: hci1: Opcode 0x c03 failed: -110

In order to synchronize vhci two-step open/setup process with virtual
HCI initialization, this patch adds internal lock when queuing data in
the vhci_send_frame() function.

Signed-off-by: Arkadiusz Bokowy <arkadiusz.bokowy@gmail.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-10-25 11:16:40 +02:00
..
accessibility
acpi ACPI: video: Add backlight=native DMI quirk for Lenovo Ideapad Z470 2023-09-23 10:48:15 +02:00
amba amba: bus: fix refcount leak 2023-09-23 10:48:09 +02:00
android binder: fix memory leak in binder_init() 2023-08-16 18:13:00 +02:00
ata ata: libata: disallow dev-initiated LPM transitions to unsupported states 2023-10-10 21:45:00 +02:00
atm treewide: Remove uninitialized_var() usage 2023-08-11 11:45:01 +02:00
auxdisplay
base regmap: rbtree: Fix wrong register marked as in-cache when creating new node 2023-10-10 21:45:01 +02:00
bcma
block loop: Select I/O scheduler 'none' from inside add_disk() 2023-08-11 11:45:36 +02:00
bluetooth Bluetooth: vhci: Fix race when opening vhci device 2023-10-25 11:16:40 +02:00
bus bus: imx-weim: fix branch condition evaluates to a garbage value 2023-04-05 11:15:38 +02:00
cdrom
char parisc: sba: Fix compile warning wrt list of SBA devices 2023-10-10 21:44:58 +02:00
clk clk: tegra: fix error return case for recalc_rate 2023-10-10 21:44:58 +02:00
clocksource clocksource/drivers/cadence-ttc: Fix memory leak in ttc_timer_probe 2023-08-11 11:45:02 +02:00
connector
cpufreq cpufreq: brcmstb-avs-cpufreq: Fix -Warray-bounds bug 2023-09-23 10:48:11 +02:00
cpuidle sched,idle,rcu: Push rcu_idle deeper into the idle path 2023-10-25 11:16:26 +02:00
crypto crypto: stm32 - fix loop iterating through scatterlist for DMA 2023-09-23 10:48:11 +02:00
dax
dca
devfreq PM / devfreq: Fix leak in devfreq_dev_release() 2023-09-23 10:48:10 +02:00
dio
dma dmaengine: stm32-mdma: abort resume if no ongoing transfer 2023-10-25 11:16:27 +02:00
dma-buf dma-buf/sw_sync: Avoid recursive lock during fence signal 2023-08-30 16:31:56 +02:00
edac EDAC/skx: Fix overflows on the DRAM row address mapping arrays 2023-05-17 11:13:09 +02:00
eisa
extcon extcon: Fix kernel doc of property capability fields to avoid warnings 2023-08-11 11:45:12 +02:00
firewire treewide: Remove uninitialized_var() usage 2023-08-11 11:45:01 +02:00
firmware firmware: arm_sdei: Fix sleep from invalid context BUG 2023-05-30 12:42:08 +01:00
fmc
fpga fpga: bridge: fix kernel-doc parameter description 2023-05-17 11:13:15 +02:00
fsi fsi: master-ast-cf: Add MODULE_FIRMWARE macro 2023-09-23 10:47:57 +02:00
gnss
gpio gpio: pxa: disable pinctrl calls for MMP_GPIO 2023-10-10 21:45:02 +02:00
gpu drm/vmwgfx: fix typo of sizeof argument 2023-10-25 11:16:24 +02:00
hid HID: logitech-hidpp: Fix kernel crash on receiver USB disconnect 2023-10-25 11:16:20 +02:00
hsi
hv Drivers: hv: vmbus: Fix vmbus_wait_for_unload() to scan present CPUs 2023-06-28 10:15:28 +02:00
hwmon hwmon: (nct7802) Fix for temp6 (PECI1) processed even if PECI1 disabled 2023-08-11 11:45:34 +02:00
hwspinlock
hwtracing coresight: Fix signedness bug in tmc_etr_buf_insert_barrier_packet() 2023-05-30 12:42:15 +01:00
i2c i2c: i801: unregister tco_pdev in i801_probe() error path 2023-10-10 21:44:59 +02:00
ide treewide: Remove uninitialized_var() usage 2023-08-11 11:45:01 +02:00
idle
iio iio: pressure: ms5611: ms5611_prom_is_valid false negative bug 2023-10-25 11:16:30 +02:00
infiniband RDMA/cxgb4: Check skb value for failure to allocate 2023-10-25 11:16:19 +02:00
input Input: xpad - add PXN V900 support 2023-10-25 11:16:33 +02:00
iommu
ipack
irqchip irqchip/mips-gic: Don't touch vl_map if a local interrupt is not routable 2023-08-30 16:31:56 +02:00
isdn mISDN: Update parameter type of dsp_cmx_send() 2023-08-16 18:13:00 +02:00
leds
lightnvm
macintosh macintosh: via-pmu-led: requires ATA to be set 2023-05-17 11:13:18 +02:00
mailbox mailbox: ti-msgmgr: Fill non-message tx data fields with 0x0 2023-08-11 11:45:13 +02:00
mcb mcb: remove is_added flag from mcb_device struct 2023-10-25 11:16:31 +02:00
md md/raid1: fix error: ISO C90 forbids mixed declarations 2023-09-23 10:48:17 +02:00
media media: dvb: symbol fixup for dvb_attach() - again 2023-10-10 21:45:00 +02:00
memory
memstick memstick r592: make memstick_debug_get_tpc_name() static 2023-08-11 11:45:06 +02:00
message scsi: message: mptlan: Fix use after free bug in mptlan_remove() due to race condition 2023-05-30 12:42:09 +01:00
mfd mfd: stmpe: Only disable the regulators if they are enabled 2023-08-11 11:45:13 +02:00
misc misc: pci_endpoint_test: Re-init completion for every test 2023-08-11 11:45:21 +02:00
mmc mmc: au1xmmc: force non-modular build and remove symbol_get usage 2023-09-23 10:47:56 +02:00
mtd ubi: Refuse attaching if mtd's erasesize is 0 2023-10-10 21:45:01 +02:00
mux
net net: usb: dm9601: fix uninitialized variable use in dm9601_mdio_read 2023-10-25 11:16:28 +02:00
nfc nfcsim.c: Fix error checking for debugfs_create_dir 2023-06-28 10:15:31 +02:00
ntb ntb: Fix calculation ntb_transport_tx_free_entry() 2023-09-23 10:48:10 +02:00
nubus
nvdimm
nvme nvme-pci: do not set the NUMA node of device if it has none 2023-10-10 21:44:59 +02:00
nvmem
of of: unittest: Fix overlay type in apply/revert check 2023-09-23 10:48:04 +02:00
opp
oprofile
parisc parisc: iosapic.c: Fix sparse warnings 2023-10-10 21:44:58 +02:00
parport
pci Revert "PCI: qcom: Disable write access to read only registers for IP v2.3.3" 2023-10-10 21:45:00 +02:00
pcmcia pcmcia: rsrc_nonstatic: Fix memory leak in nonstatic_release_resource_db() 2023-08-30 16:31:43 +02:00
perf
phy phy: hisilicon: Fix an out of bounds check in hisi_inno_phy_probe() 2023-08-11 11:45:30 +02:00
pinctrl pinctrl: avoid unsafe code pattern in find_pinctrl() 2023-10-25 11:16:34 +02:00
platform platform/x86: intel: hid: Always call BTNL ACPI method 2023-09-23 10:47:58 +02:00
pnp
power power: supply: Fix logic checking if system is running from battery 2023-06-21 15:39:56 +02:00
powercap
pps
ps3
ptp
pwm pwm: lpc32xx: Remove handling of PWM channels 2023-09-23 10:48:13 +02:00
rapidio
ras
regulator regulator: Fix error checking for debugfs_create_dir 2023-06-21 15:39:56 +02:00
remoteproc
reset
rpmsg rpmsg: glink: Add check for kstrdup 2023-09-23 10:48:09 +02:00
rtc rtc: ds1685: use EXPORT_SYMBOL_GPL for ds1685_rtc_poweroff 2023-09-23 10:47:56 +02:00
s390 scsi: zfcp: Fix a double put in zfcp_port_enqueue() 2023-10-10 21:45:00 +02:00
sbus
scsi scsi: megaraid_sas: Enable msix_load_balance for Invader and later controllers 2023-10-10 21:44:59 +02:00
sfi
sh
siox
slimbus
sn
soc soc: qcom: qmi_encdec: Restrict string length in decode 2023-09-23 10:48:12 +02:00
soundwire
spi spi: tegra20-sflash: fix to check return value of platform_get_irq() in tegra_sflash_probe() 2023-09-23 10:48:00 +02:00
spmi spmi: Add a check for remove callback when removing a SPMI driver 2023-05-17 11:13:17 +02:00
ssb treewide: Remove uninitialized_var() usage 2023-08-11 11:45:01 +02:00
staging erofs: ensure that the post-EOF tails are all zeroed 2023-09-23 10:47:56 +02:00
target scsi: target: core: Fix deadlock due to recursive locking 2023-10-10 21:45:01 +02:00
tc
tee
thermal thermal: intel: powerclamp: Fix cur_state for multi package system 2023-03-11 16:32:02 +01:00
thunderbolt thunderbolt: Use const qualifier for ring_interrupt_index 2023-04-05 11:15:35 +02:00
tty serial: 8250_port: Check IRQ data before use 2023-10-10 21:44:59 +02:00
uio
usb usb: hub: Guard against accesses to uninitialized BOS descriptors 2023-10-25 11:16:38 +02:00
uwb
vfio
vhost treewide: Remove uninitialized_var() usage 2023-08-11 11:45:01 +02:00
video fbdev/sh7760fb: Depend on FB=y 2023-10-10 21:44:59 +02:00
virt
virtio virtio-mmio: don't break lifecycle of vm_dev 2023-08-30 16:31:47 +02:00
visorbus
vlynq
vme
w1 w1: fix loop in w1_fini() 2023-08-11 11:45:11 +02:00
watchdog watchdog: iTCO_wdt: Set NO_REBOOT if the watchdog is not already running 2023-10-10 21:44:59 +02:00
xen xen/events: replace evtchn_rwlock with RCU 2023-10-10 21:45:02 +02:00
zorro
Kconfig
Makefile