Skip to contentSkip to conversation

Bluetooth: Use GFP_KERNEL in read_index_list

DISCUSSION Dan Carpenter 2 participants 2 messages Sep 4, 2012 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

Hello Szymon Janc,

The patch 7cfeb868eb85: "Bluetooth: Use GFP_KERNEL in read_index_list" from Aug 31, 2012, leads to the following warning:
net/bluetooth/mgmt.c:343 read_index_list()
error: scheduling with locks held: 'read_lock:hci_dev_list_lock'

This patch should be reverted because we're not allowed to schedule while holding the read lock. The way to avoid these bugs in the future is to test with CONFIG_DEBUG_ATOMIC_SLEEP=y. It will give a big splat.

regards,
dan carpenter

#1 lore raw

Hi Dan,

Quoted 10 lines · Dan Carpenter

Hello Szymon Janc,

The patch 7cfeb868eb85: "Bluetooth: Use GFP_KERNEL in read_index_list" from Aug 31, 2012, leads to the following warning:
net/bluetooth/mgmt.c:343 read_index_list()
error: scheduling with locks held: 'read_lock:hci_dev_list_lock'

This patch should be reverted because we're not allowed to schedule while holding the read lock. The way to avoid these bugs in the future is to test with CONFIG_DEBUG_ATOMIC_SLEEP=y. It will give a big splat.

I reverted this patch earlier this morning. It should be ok now.

Gustavo