'sleeping function called from invalid context' in virtio_gpu_cmd_get_edid_cb

Max Filippov jcmvbkbc at gmail.com
Thu Apr 4 18:34:45 UTC 2019


Hello,

I get the following warning during v5.1-rc3 bootup on QEMU with virtio-gpu-pci

BUG: sleeping function called from invalid context at mm/slab.h:418
in_atomic(): 1, irqs_disabled(): 0, pid: 14, name: kworker/0:1
Preemption disabled at:
 virtio_gpu_cmd_get_edid_cb+0x4c/0x9c
CPU: 0 PID: 14 Comm: kworker/0:1 Not tainted 5.1.0-rc3-00007-g2c6e21bcbbae #6
Workqueue: events virtio_gpu_dequeue_ctrl_func
Call Trace:
 ___might_sleep+0xfc/0x11c
 __might_sleep+0x42/0x64
 __kmalloc+0x66/0x1f0
 kvmalloc_node+0x66/0x7c
 drm_property_create_blob$part$0+0x14/0x8c
 drm_property_replace_global_blob+0x40/0xdc
 drm_connector_update_edid_property+0x58/0x74
 virtio_gpu_cmd_get_edid_cb+0x62/0x9c
 virtio_gpu_dequeue_ctrl_func+0xd1/0x188
 process_one_work+0x1a0/0x388
 worker_thread+0x1e8/0x3b4
 kthread+0xe8/0x100
 ret_from_kernel_thread+0xc/0x18

Looks like virtio_gpu_cmd_get_edid_cb calls
drm_connector_update_edid_property under the spinlock and the
latter function may sleep.
-- 
Thanks.
-- Max


More information about the dri-devel mailing list