Skip to content

Conversation

6by9
Copy link
Contributor

@6by9 6by9 commented Apr 29, 2025

https://forums.raspberrypi.com/viewtopic.php?t=387270

I don't have hardware to test this, so will ask OP to test.

@6by9
Copy link
Contributor Author

6by9 commented May 6, 2025

OP reported this as working.

Exaga pushed a commit to Exaga/linux that referenced this pull request Jul 6, 2025
commit f1a8f40 upstream.

This fixes the following deadlock introduced by 39a92a5
("bluetooth/l2cap: sync sock recv cb and release")

============================================
WARNING: possible recursive locking detected
6.10.0-rc3-g4029dba6b6f1 raspberrypi#6823 Not tainted
--------------------------------------------
kworker/u5:0/35 is trying to acquire lock:
ffff888002ec2510 (&chan->lock#2/1){+.+.}-{3:3}, at:
l2cap_sock_recv_cb+0x44/0x1e0

but task is already holding lock:
ffff888002ec2510 (&chan->lock#2/1){+.+.}-{3:3}, at:
l2cap_get_chan_by_scid+0xaf/0xd0

other info that might help us debug this:
 Possible unsafe locking scenario:

       CPU0
       ----
  lock(&chan->lock#2/1);
  lock(&chan->lock#2/1);

 *** DEADLOCK ***

 May be due to missing lock nesting notation

3 locks held by kworker/u5:0/35:
 #0: ffff888002b8a940 ((wq_completion)hci0#2){+.+.}-{0:0}, at:
process_one_work+0x750/0x930
 raspberrypi#1: ffff888002c67dd0 ((work_completion)(&hdev->rx_work)){+.+.}-{0:0},
at: process_one_work+0x44e/0x930
 raspberrypi#2: ffff888002ec2510 (&chan->lock#2/1){+.+.}-{3:3}, at:
l2cap_get_chan_by_scid+0xaf/0xd0

To fix the original problem this introduces l2cap_chan_lock at
l2cap_conless_channel to ensure that l2cap_sock_recv_cb is called with
chan->lock held.

Fixes: 89e856e ("bluetooth/l2cap: sync sock recv cb and release")
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
@6by9 6by9 force-pushed the rpi-6.12.y-dtoverlays branch 2 times, most recently from 9543359 to cfc9efb Compare September 2, 2025 13:50
@6by9 6by9 force-pushed the rpi-6.12.y-dtoverlays branch from cfc9efb to 67bdb40 Compare September 2, 2025 14:15
@6by9
Copy link
Contributor Author

6by9 commented Sep 2, 2025

Fixed s/adxl345/adxl355, and rebased.

6by9 added 2 commits September 3, 2025 10:51
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
@6by9
Copy link
Contributor Author

6by9 commented Sep 3, 2025

As this was still open, I've tagged the requested changes for BMP580 on to it as well
raspberrypi/firmware#1994

They're supported by the standard BMP280 driver, so only
needed the overlay configuration.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
@6by9 6by9 force-pushed the rpi-6.12.y-dtoverlays branch from cf623b1 to 4934a9d Compare September 3, 2025 10:42
@pelwell pelwell merged commit 523119e into raspberrypi:rpi-6.12.y Sep 3, 2025
11 of 12 checks passed
popcornmix added a commit to raspberrypi/firmware that referenced this pull request Sep 5, 2025
kernel: configs: Add EROFS_FS_ZIP_ZSTD
See: raspberrypi/linux#7028

kernel: dt: Add eth_max_speed override for CM4, Pi4, and Pi400
See: raspberrypi/linux#7031

kernel: mfd: rp1: Fix device links when modules disabled
See: raspberrypi/linux#7027

kernel: Add adxl355 to i2c-sensor
See: raspberrypi/linux#6823

kernel: dtoverlays: Switch ssd1306 to use the DRM driver
See: raspberrypi/linux#7034

kernel: Added device tree overlays for the rpi-power HAT
See: raspberrypi/linux#7036

kernel: fixup! misc: rp1-pio: Request a DMA burst size of 8
See: raspberrypi/linux#7037
popcornmix added a commit to raspberrypi/rpi-firmware that referenced this pull request Sep 5, 2025
kernel: configs: Add EROFS_FS_ZIP_ZSTD
See: raspberrypi/linux#7028

kernel: dt: Add eth_max_speed override for CM4, Pi4, and Pi400
See: raspberrypi/linux#7031

kernel: mfd: rp1: Fix device links when modules disabled
See: raspberrypi/linux#7027

kernel: Add adxl355 to i2c-sensor
See: raspberrypi/linux#6823

kernel: dtoverlays: Switch ssd1306 to use the DRM driver
See: raspberrypi/linux#7034

kernel: Added device tree overlays for the rpi-power HAT
See: raspberrypi/linux#7036

kernel: fixup! misc: rp1-pio: Request a DMA burst size of 8
See: raspberrypi/linux#7037
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants