linux-mediatek.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Tzung-Bi Shih <tzungbi@google.com>
To: broonie@kernel.org, airlied@linux.ie, daniel@ffwll.ch
Cc: alsa-devel@alsa-project.org, cychiang@google.com,
	tzungbi@google.com, dri-devel@lists.freedesktop.org,
	ck.hu@mediatek.com, linux-mediatek@lists.infradead.org,
	p.zabel@pengutronix.de, matthias.bgg@gmail.com,
	dgreid@google.com, linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 0/2] ASoC hdmi-codec: fix HDMI jack reporting
Date: Mon, 17 Feb 2020 11:16:51 +0800	[thread overview]
Message-ID: <20200217031653.52345-1-tzungbi@google.com> (raw)

With proper unbinding audio components and inserting the HDMI external
display, kernel crashes as the following messages:

Unable to handle kernel NULL pointer dereference at virtual address ...
[snip]
Call trace:
 plugged_cb+0x1c/0x74
 mtk_hdmi_update_plugged_status+0x48/0x6c
 hdmi_conn_detect+0x1c/0x28
 drm_helper_probe_detect+0x110/0x170
 drm_helper_probe_single_connector_modes+0xd4/0x608
 drm_mode_getconnector+0x1e8/0x418

The 1st patch fixes the crash by notifying hdmi-codec's consumers to not
report jack status anymore when component removing.

The 2nd patch fixes race condition in mediatek/mtk_hdmi.c.

Changes from v1:
(https://patchwork.kernel.org/patch/11379979/)
- added the 1st patch
- use mutex to protect plugged_cb and codec_dev in 2nd patch

Tzung-Bi Shih (2):
  ASoC: hdmi-codec: set plugged_cb to NULL when component removing
  drm/mediatek: fix race condition for HDMI jack status reporting

 drivers/gpu/drm/mediatek/mtk_hdmi.c | 11 ++++++++++-
 sound/soc/codecs/hdmi-codec.c       | 10 ++++++++++
 2 files changed, 20 insertions(+), 1 deletion(-)

-- 
2.25.0.265.gbab2e86ba0-goog


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

             reply	other threads:[~2020-02-17  3:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-17  3:16 Tzung-Bi Shih [this message]
2020-02-17  3:16 ` [PATCH v2 1/2] ASoC: hdmi-codec: set plugged_cb to NULL when component removing Tzung-Bi Shih
2020-02-17 22:04   ` Applied "ASoC: hdmi-codec: set plugged_cb to NULL when component removing" to the asoc tree Mark Brown
2020-02-17  3:16 ` [PATCH v2 2/2] drm/mediatek: fix race condition for HDMI jack status reporting Tzung-Bi Shih
2020-02-17  3:44   ` CK Hu
2020-02-17  3:55     ` Tzung-Bi Shih
2020-02-17  4:49       ` CK Hu
2020-02-17 22:03   ` Applied "drm/mediatek: fix race condition for HDMI jack status reporting" to the asoc tree Mark Brown

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=20200217031653.52345-1-tzungbi@google.com \
    --to=tzungbi@google.com \
    --cc=airlied@linux.ie \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=ck.hu@mediatek.com \
    --cc=cychiang@google.com \
    --cc=daniel@ffwll.ch \
    --cc=dgreid@google.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=p.zabel@pengutronix.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 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).