All of lore.kernel.org
 help / color / mirror / Atom feed
From: Doug Anderson <dianders@chromium.org>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Thierry Reding <thierry.reding@gmail.com>,
	Rob Herring <robh+dt@kernel.org>, Sam Ravnborg <sam@ravnborg.org>,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" 
	<devicetree@vger.kernel.org>, Steev Klimaszewski <steev@kali.org>,
	DRI Development <dri-devel@lists.freedesktop.org>,
	linux-arm-msm <linux-arm-msm@vger.kernel.org>,
	David Airlie <airlied@linux.ie>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	Linus W <linus.walleij@linaro.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Daniel Vetter <daniel@ffwll.ch>,
	Maxime Ripard <mripard@kernel.org>,
	Jani Nikula <jani.nikula@intel.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux-Renesas <linux-renesas-soc@vger.kernel.org>
Subject: Re: [PATCH v5 02/15] drm/edid: Break out reading block 0 of the EDID
Date: Mon, 4 Oct 2021 09:26:06 -0700	[thread overview]
Message-ID: <CAD=FV=W07iZigvNaxv1WodhQZVm8hD-1NxTuBuapJYifi6ROng@mail.gmail.com> (raw)
In-Reply-To: <CAMuHMdWy+aASNevg8nc9LTvR9QNrGYZQnB3sYYLDRfEU1w_idg@mail.gmail.com>

Hi,

On Mon, Oct 4, 2021 at 8:42 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>
> > -       if ((edid = kmalloc(EDID_LENGTH, GFP_KERNEL)) == NULL)
> > +       edid = (u8 *)drm_do_get_edid_base_block(get_edid_block, data,
> > +                                               &connector->edid_corrupt,
> > +                                               &connector->null_edid_counter);
> > +       if (IS_ERR_OR_NULL(edid)) {
> > +               if (IS_ERR(edid))
>
> So edid is an error code, not a valid pointer...
>
> > +                       connector_bad_edid(connector, edid, 1);
>
> ... while connector_bad_edid() expects edid to be a valid pointer,
> causing a crash:
>
> Unable to handle kernel NULL pointer dereference at virtual address

Sigh. Thanks for the report and analysis. I guess I don't have any
displays reporting invalid EDIDs to test with. Hopefully this will
help:

https://lore.kernel.org/r/20211004092100.1.Ic90a5ebd44c75db963112be167a03cc96f9fb249@changeid/

-Doug

  reply	other threads:[~2021-10-04 16:26 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-14 20:21 [PATCH v5 00/15] eDP: Support probing eDP panels dynamically instead of hardcoding Douglas Anderson
2021-09-14 20:21 ` [PATCH v5 01/15] dt-bindings: drm/panel-simple-edp: Introduce generic eDP panels Douglas Anderson
2021-09-14 20:21 ` [PATCH v5 02/15] drm/edid: Break out reading block 0 of the EDID Douglas Anderson
2021-10-04 15:42   ` Geert Uytterhoeven
2021-10-04 15:42     ` Geert Uytterhoeven
2021-10-04 16:26     ` Doug Anderson [this message]
2021-10-04 16:26       ` Doug Anderson
2021-10-04 17:13       ` Geert Uytterhoeven
2021-09-14 20:21 ` [PATCH v5 03/15] drm/edid: Allow querying/working with the panel ID from " Douglas Anderson
2021-09-14 20:21 ` [PATCH v5 04/15] drm/edid: Use new encoded panel id style for quirks matching Douglas Anderson
2021-09-14 20:21 ` [PATCH v5 05/15] ARM: configs: Everyone who had PANEL_SIMPLE now gets PANEL_EDP Douglas Anderson
2021-09-14 20:21 ` [PATCH v5 06/15] arm64: defconfig: " Douglas Anderson
2021-09-14 20:21   ` Douglas Anderson
2021-09-14 20:21 ` [PATCH v5 07/15] drm/panel-edp: Split eDP panels out of panel-simple Douglas Anderson
2021-09-14 20:21 ` [PATCH v5 08/15] drm/panel-edp: Move some wayward panels to the eDP driver Douglas Anderson
2021-09-14 20:21 ` [PATCH v5 09/15] drm/panel-simple: Non-eDP panels don't need "HPD" handling Douglas Anderson
2021-09-14 20:21 ` [PATCH v5 10/15] drm/panel-edp: Split the delay structure out Douglas Anderson
2021-09-14 20:21 ` [PATCH v5 11/15] drm/panel-edp: Better describe eDP panel delays Douglas Anderson
2021-09-14 20:21 ` [PATCH v5 12/15] drm/panel-edp: hpd_reliable shouldn't be subtraced from hpd_absent Douglas Anderson
2021-09-14 20:22 ` [PATCH v5 13/15] drm/panel-edp: Fix "prepare_to_enable" if panel doesn't handle HPD Douglas Anderson
2021-09-14 20:22 ` [PATCH v5 14/15] drm/panel-edp: Don't re-read the EDID every time we power off the panel Douglas Anderson
2021-09-14 20:22 ` [PATCH v5 15/15] drm/panel-edp: Implement generic "edp-panel"s probed by EDID Douglas Anderson
2021-09-14 22:12 ` [PATCH v5 00/15] eDP: Support probing eDP panels dynamically instead of hardcoding Linus Walleij
2021-09-20 16:42   ` Doug Anderson
2021-09-24  8:03     ` Jani Nikula
2021-09-24  9:10       ` Andrzej Hajda
2021-09-24  9:10         ` Andrzej Hajda
2021-09-24  9:10         ` Andrzej Hajda
2021-09-24 13:59         ` Doug Anderson
2021-09-24 13:59           ` Doug Anderson
2021-09-24 13:59           ` Doug Anderson
2021-09-24 13:59           ` Doug Anderson
2021-09-24 14:55           ` Doug Anderson
2021-09-24 14:55             ` Doug Anderson
2021-09-24 14:55             ` Doug Anderson
2021-09-24 14:55             ` Doug Anderson

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='CAD=FV=W07iZigvNaxv1WodhQZVm8hD-1NxTuBuapJYifi6ROng@mail.gmail.com' \
    --to=dianders@chromium.org \
    --cc=airlied@linux.ie \
    --cc=bjorn.andersson@linaro.org \
    --cc=daniel@ffwll.ch \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=geert@linux-m68k.org \
    --cc=jani.nikula@intel.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=sam@ravnborg.org \
    --cc=steev@kali.org \
    --cc=thierry.reding@gmail.com \
    --cc=tzimmermann@suse.de \
    /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.