public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: gregkh@linuxfoundation.org
Cc: pihsun@chromium.org, enric.balletbo@collabora.com,
	stable@vger.kernel.org
Subject: Re: FAILED: patch "[PATCH] platform/chrome: cros_ec_rpmsg: Fix race with host command" failed to apply to 5.3-stable tree
Date: Thu, 3 Oct 2019 10:36:30 -0400	[thread overview]
Message-ID: <20191003143630.GC17454@sasha-vm> (raw)
In-Reply-To: <157010460554182@kroah.com>

On Thu, Oct 03, 2019 at 02:10:05PM +0200, gregkh@linuxfoundation.org wrote:
>
>The patch below does not apply to the 5.3-stable tree.
>If someone wants it applied there, or to any other stable or longterm
>tree, then please email the backport, including the original git commit
>id to <stable@vger.kernel.org>.
>
>thanks,
>
>greg k-h
>
>------------------ original commit in Linus's tree ------------------
>
>From 71cddb7097e2b0feb855d7fd7d59afd12cbee4bb Mon Sep 17 00:00:00 2001
>From: Pi-Hsun Shih <pihsun@chromium.org>
>Date: Wed, 4 Sep 2019 14:26:13 +0800
>Subject: [PATCH] platform/chrome: cros_ec_rpmsg: Fix race with host command
> when probe failed
>
>Since the rpmsg_endpoint is created before probe is called, it's
>possible that a host event is received during cros_ec_register, and
>there would be some pending work in the host_event_work workqueue while
>cros_ec_register is called.
>
>If cros_ec_register fails, when the leftover work in host_event_work
>run, the ec_dev from the drvdata of the rpdev could be already set to
>NULL, causing kernel crash when trying to run cros_ec_get_next_event.
>
>Fix this by creating the rpmsg_endpoint by ourself, and when
>cros_ec_register fails (or on remove), destroy the endpoint first (to
>make sure there's no more new calls to cros_ec_rpmsg_callback), and then
>cancel all works in the host_event_work workqueue.
>
>Cc: stable@vger.kernel.org
>Fixes: 2de89fd98958 ("platform/chrome: cros_ec: Add EC host command support using rpmsg")
>Signed-off-by: Pi-Hsun Shih <pihsun@chromium.org>
>Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>

I've worked around the changes introduced by 7aa703bb88243 ("mfd /
platform: cros_ec: Handle chained ECs as platform devices"). Queued for
5.3 and 5.2.

-- 
Thanks,
Sasha

      reply	other threads:[~2019-10-03 14:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-03 12:10 FAILED: patch "[PATCH] platform/chrome: cros_ec_rpmsg: Fix race with host command" failed to apply to 5.3-stable tree gregkh
2019-10-03 14:36 ` Sasha Levin [this message]

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=20191003143630.GC17454@sasha-vm \
    --to=sashal@kernel.org \
    --cc=enric.balletbo@collabora.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=pihsun@chromium.org \
    --cc=stable@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox