From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Sasha Levin <sashal@kernel.org>,
Cornelia Huck <cohuck@redhat.com>,
dri-devel@lists.freedesktop.org,
virtualization@lists.linux-foundation.org,
Max Filippov <jcmvbkbc@gmail.com>,
Gerd Hoffmann <kraxel@redhat.com>
Subject: [PATCH AUTOSEL 5.1 03/11] drm/virtio: move drm_connector_update_edid_property() call
Date: Wed, 10 Jul 2019 11:02:30 -0400 [thread overview]
Message-ID: <20190710150240.6984-3-sashal@kernel.org> (raw)
In-Reply-To: <20190710150240.6984-1-sashal@kernel.org>
From: Gerd Hoffmann <kraxel@redhat.com>
[ Upstream commit 41de4be6f6efa4132b29af51158cd672d93f2543 ]
drm_connector_update_edid_property can sleep, we must not
call it while holding a spinlock. Move the callsite.
Fixes: b4b01b4995fb ("drm/virtio: add edid support")
Reported-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Tested-by: Max Filippov <jcmvbkbc@gmail.com>
Tested-by: Cornelia Huck <cohuck@redhat.com>
Acked-by: Cornelia Huck <cohuck@redhat.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20190405044602.2334-1-kraxel@redhat.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/virtio/virtgpu_vq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_vq.c b/drivers/gpu/drm/virtio/virtgpu_vq.c
index 6bc2008b0d0d..3ef24f89ef93 100644
--- a/drivers/gpu/drm/virtio/virtgpu_vq.c
+++ b/drivers/gpu/drm/virtio/virtgpu_vq.c
@@ -620,11 +620,11 @@ static void virtio_gpu_cmd_get_edid_cb(struct virtio_gpu_device *vgdev,
output = vgdev->outputs + scanout;
new_edid = drm_do_get_edid(&output->conn, virtio_get_edid_block, resp);
+ drm_connector_update_edid_property(&output->conn, new_edid);
spin_lock(&vgdev->display_info_lock);
old_edid = output->edid;
output->edid = new_edid;
- drm_connector_update_edid_property(&output->conn, output->edid);
spin_unlock(&vgdev->display_info_lock);
kfree(old_edid);
--
2.20.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
WARNING: multiple messages have this Message-ID (diff)
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Gerd Hoffmann <kraxel@redhat.com>,
Max Filippov <jcmvbkbc@gmail.com>,
Cornelia Huck <cohuck@redhat.com>,
Sasha Levin <sashal@kernel.org>,
dri-devel@lists.freedesktop.org,
virtualization@lists.linux-foundation.org
Subject: [PATCH AUTOSEL 5.1 03/11] drm/virtio: move drm_connector_update_edid_property() call
Date: Wed, 10 Jul 2019 11:02:30 -0400 [thread overview]
Message-ID: <20190710150240.6984-3-sashal@kernel.org> (raw)
In-Reply-To: <20190710150240.6984-1-sashal@kernel.org>
From: Gerd Hoffmann <kraxel@redhat.com>
[ Upstream commit 41de4be6f6efa4132b29af51158cd672d93f2543 ]
drm_connector_update_edid_property can sleep, we must not
call it while holding a spinlock. Move the callsite.
Fixes: b4b01b4995fb ("drm/virtio: add edid support")
Reported-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Tested-by: Max Filippov <jcmvbkbc@gmail.com>
Tested-by: Cornelia Huck <cohuck@redhat.com>
Acked-by: Cornelia Huck <cohuck@redhat.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20190405044602.2334-1-kraxel@redhat.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/virtio/virtgpu_vq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_vq.c b/drivers/gpu/drm/virtio/virtgpu_vq.c
index 6bc2008b0d0d..3ef24f89ef93 100644
--- a/drivers/gpu/drm/virtio/virtgpu_vq.c
+++ b/drivers/gpu/drm/virtio/virtgpu_vq.c
@@ -620,11 +620,11 @@ static void virtio_gpu_cmd_get_edid_cb(struct virtio_gpu_device *vgdev,
output = vgdev->outputs + scanout;
new_edid = drm_do_get_edid(&output->conn, virtio_get_edid_block, resp);
+ drm_connector_update_edid_property(&output->conn, new_edid);
spin_lock(&vgdev->display_info_lock);
old_edid = output->edid;
output->edid = new_edid;
- drm_connector_update_edid_property(&output->conn, output->edid);
spin_unlock(&vgdev->display_info_lock);
kfree(old_edid);
--
2.20.1
next prev parent reply other threads:[~2019-07-10 15:02 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-10 15:02 [PATCH AUTOSEL 5.1 01/11] MIPS: ath79: fix ar933x uart parity mode Sasha Levin
2019-07-10 15:02 ` [PATCH AUTOSEL 5.1 02/11] MIPS: fix build on non-linux hosts Sasha Levin
2019-07-10 15:02 ` Sasha Levin [this message]
2019-07-10 15:02 ` [PATCH AUTOSEL 5.1 03/11] drm/virtio: move drm_connector_update_edid_property() call Sasha Levin
2019-07-10 15:02 ` Sasha Levin
2019-07-10 15:02 ` [PATCH AUTOSEL 5.1 04/11] arm64/efi: Mark __efistub_stext_offset as an absolute symbol explicitly Sasha Levin
2019-07-10 15:02 ` [PATCH AUTOSEL 5.1 05/11] drm/etnaviv: add missing failure path to destroy suballoc Sasha Levin
2019-07-10 15:02 ` Sasha Levin
2019-07-10 15:02 ` [PATCH AUTOSEL 5.1 06/11] KVM: x86: degrade WARN to pr_warn_ratelimited Sasha Levin
2019-07-10 15:02 ` [PATCH AUTOSEL 5.1 07/11] scsi: iscsi: set auth_protocol back to NULL if CHAP_A value is not supported Sasha Levin
2019-07-10 15:02 ` [PATCH AUTOSEL 5.1 07/11] scsi: iscsi: set auth_protocol back to NULL if CHAP_A value is not support Sasha Levin
2019-07-10 15:02 ` [PATCH AUTOSEL 5.1 08/11] drm/imx: notify drm core before sending event during crtc disable Sasha Levin
2019-07-10 15:02 ` Sasha Levin
2019-07-10 15:02 ` [PATCH AUTOSEL 5.1 09/11] drm/imx: only send event on crtc disable if kept disabled Sasha Levin
2019-07-10 15:02 ` Sasha Levin
2019-07-10 15:02 ` [PATCH AUTOSEL 5.1 10/11] dmaengine: jz4780: Fix an endian bug in IRQ handler Sasha Levin
2019-07-10 15:02 ` [PATCH AUTOSEL 5.1 11/11] dmaengine: imx-sdma: fix use-after-free on probe error path Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190710150240.6984-3-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=cohuck@redhat.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jcmvbkbc@gmail.com \
--cc=kraxel@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=virtualization@lists.linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.