Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1480110yba; Thu, 4 Apr 2019 11:36:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqyNrnVXGcKzBFNm1XDDkjnAEOZhhdBiOqMutvfHa/KEQBD1Emtd0RBDvI/XCn5EmI7Ekk0Z X-Received: by 2002:a65:420b:: with SMTP id c11mr7502728pgq.24.1554402960866; Thu, 04 Apr 2019 11:36:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554402960; cv=none; d=google.com; s=arc-20160816; b=A/lakv34Bjw51cgZNC0ppL+AsvQOCGRH20wsTDMGPCwwoYgIvZLCS1H0iYaSnhRHkF mX4LXoA7YmRuoO94xEqGFYpgVdN1AuQOLdtonP4udOk7q/5OAQg2oXxdWqrLWmVBllks 1LDomz0Ym0dNOsyAnTdp5hwuNYCY7PPEq6TLT55uxY/JpJfS7YgN8zMFDC2+STrrvTK5 KQMYkObjBcY2y2QfBDMd1d3rb6Q3xFqTqpVQXxj9yAcx1Mbbu2JqaMDTv4HxkR+tuYSS SkRPtR99I0ohxyggC/rS8ytwZYYa9yWcufveY4+TrC0NbG7g2GzxQHbnB+KTse6NySgP 7xXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :mime-version:dkim-signature; bh=AEF8idl1k/6CbtTHbpa/B4FiEnoFupc+OZz98Gp/k0I=; b=ZOMOqLjxZPACuO+Y9lFamdir2EzX7urNaPqgf++daiQdUV74EHk805v/BkOCsZ3nkD Z27ThUOZzvZmzSZNRcEj9R3OQT2dItekLz/zVmXdBg2Q85CTLWRGOBUbfUV/Dn+U1Kzz b530qBvQU9KxrXGrNhwgEOsinjSek1rVhkJR42xFKoL8jHW5gWqlN46Qdl4D439E+hYd peWZlGat9oeuPWE9ngRBou2+p5D3camHWDL0rD9T6QhrW0rAKPSHFMwHdzAgnzVw8ZpI sysgZPLxo6PbVxM6xR2yHBY5nAGCTkSu5plhAsbHuzSFIfsXhWFmSOVOtOM5YruISfIZ qpKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Pgjsw7Ck; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r124si14103668pgr.201.2019.04.04.11.35.45; Thu, 04 Apr 2019 11:36:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Pgjsw7Ck; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729823AbfDDSe5 (ORCPT + 99 others); Thu, 4 Apr 2019 14:34:57 -0400 Received: from mail-yb1-f171.google.com ([209.85.219.171]:46351 "EHLO mail-yb1-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729709AbfDDSe5 (ORCPT ); Thu, 4 Apr 2019 14:34:57 -0400 Received: by mail-yb1-f171.google.com with SMTP id u15so1390662ybj.13 for ; Thu, 04 Apr 2019 11:34:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to:cc; bh=AEF8idl1k/6CbtTHbpa/B4FiEnoFupc+OZz98Gp/k0I=; b=Pgjsw7CkJTN19rp00qcfdU+43yN9vsD/xYSRYa1A/8uXCqj1t4/0XsrG6ZV+15qgfA Si9r2fmwFDm93Osqr2/ea3fQf76OM7OzZQo21UWHwdK4U7JhcPiB2CpC5B5hCoq9yobL r1Y5zTunUmTgafRhf6Sg8ho77+49kIc576gGU+IqxtlTxWwxextrQWhA6yf5HT4njlhl uBC3R9GpNXCYyi+nBkXk9zrVGIvi0F8kdi2X5HEQ9W/8gy1zjShZ9cGhtMO93vakXnBW 0+aUtlPs9oj95zxEUfoGVejujJv/fBMelQ9soIat7MoJLZ4GYEerUD4TuMQEZ/n8ITwm m/pA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=AEF8idl1k/6CbtTHbpa/B4FiEnoFupc+OZz98Gp/k0I=; b=ATYOu0OlPi7TFu+rny6jfELWO951/JYu7YmGkqbMm8dejug+gouL4QcyCzwZNqlCnC LnKHEgaYzfp/8SWbWZBxfS8j7jKeqJh6ySBL9WukSuFWQti4pJD0/u4lV4yiglwSXx9L 2KZWIfHMyHWtjLLDFwWhNXbCUI/+FheshJ+rq1IZEks4tjBwxReC8zyWE2NW3ApyaB/T 5Dc2Jb2fhb+KZt16awkQlvTXp4H8xmD7sasD5p1osErXdVPe1kXcMXVkAVYBaZMOil2M SBTpGsyUZSFnT6/LQqAcxVg78TajPMeCwUvdx/6Ovw8BqgIj6B9irlr8Dmta00JCNmIc b9Cg== X-Gm-Message-State: APjAAAX4+DyGc3D7XljyM9cvUX3yaq5xjnfgdilQI7QOzQ/5Pr1flLjd 0aj9/VBwySIvNvfCLHgK823AAdilRhhc80N/abgXAytEXs0= X-Received: by 2002:a25:4e89:: with SMTP id c131mr6774713ybb.430.1554402896346; Thu, 04 Apr 2019 11:34:56 -0700 (PDT) MIME-Version: 1.0 From: Max Filippov Date: Thu, 4 Apr 2019 11:34:45 -0700 Message-ID: Subject: 'sleeping function called from invalid context' in virtio_gpu_cmd_get_edid_cb To: David Airlie , Gerd Hoffmann Cc: dri-devel@lists.freedesktop.org, LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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