From: Sam Ravnborg <sam@ravnborg.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
dri-devel@lists.freedesktop.org, Sean Paul <sean@poorly.run>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 2/2] drm: mcde: Fix forgotten user of drm->dev_private
Date: Sun, 14 Jun 2020 09:48:47 +0200 [thread overview]
Message-ID: <20200614074847.GB220677@ravnborg.org> (raw)
In-Reply-To: <20200613223027.4189309-2-linus.walleij@linaro.org>
On Sun, Jun 14, 2020 at 12:30:27AM +0200, Linus Walleij wrote:
> We forgot one call site directly using drm->dev_private.
> This leads to a crash like this:
>
> 8<--- cut here ---
> Unable to handle kernel NULL pointer dereference at virtual address 00000918
> pgd = (ptrval)
> [00000918] *pgd=00000000
> Internal error: Oops: 5 [#1] SMP ARM
> Modules linked in:
> CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.7.0-15001-gfa384b50b96b-dirty #514
> Hardware name: ST-Ericsson Ux5x0 platform (Device Tree Support)
> PC is at mcde_display_enable+0x78/0x7c0
> LR is at mcde_display_enable+0x78/0x7c0
>
> Fix this by using to_mcde() as in other functions.
>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Fixes: fd7ee85cfe7b ("drm/mcde: Don't use drm_device->dev_private")
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This is the last hit for "git grep dev_private".
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
> ---
> drivers/gpu/drm/mcde/mcde_display.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/mcde/mcde_display.c b/drivers/gpu/drm/mcde/mcde_display.c
> index b319a474f801..212aee60cf61 100644
> --- a/drivers/gpu/drm/mcde/mcde_display.c
> +++ b/drivers/gpu/drm/mcde/mcde_display.c
> @@ -838,7 +838,7 @@ static void mcde_display_enable(struct drm_simple_display_pipe *pipe,
> struct drm_crtc *crtc = &pipe->crtc;
> struct drm_plane *plane = &pipe->plane;
> struct drm_device *drm = crtc->dev;
> - struct mcde *mcde = drm->dev_private;
> + struct mcde *mcde = to_mcde(drm);
> const struct drm_display_mode *mode = &cstate->mode;
> struct drm_framebuffer *fb = plane->state->fb;
> u32 format = fb->format->format;
> --
> 2.26.2
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-06-14 7:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-13 22:30 [PATCH 1/2] drm: mcde: Fix display initialization problem Linus Walleij
2020-06-13 22:30 ` [PATCH 2/2] drm: mcde: Fix forgotten user of drm->dev_private Linus Walleij
2020-06-14 7:48 ` Sam Ravnborg [this message]
2020-06-14 7:44 ` [PATCH 1/2] drm: mcde: Fix display initialization problem Sam Ravnborg
2020-06-14 21:29 ` Linus Walleij
2020-06-15 15:51 ` Daniel Vetter
2020-06-15 23:31 ` Emil Velikov
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=20200614074847.GB220677@ravnborg.org \
--to=sam@ravnborg.org \
--cc=daniel.vetter@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=sean@poorly.run \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).