public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: linux-kernel@vger.kernel.org
Cc: Andreas Noever <andreas.noever@gmail.com>,
	Michael Jamet <michael.jamet@intel.com>,
	Yehezkel Bernat <YehezkelShB@gmail.com>,
	Lukas Wunner <lukas@wunner.de>,
	Lu Baolu <baolu.lu@linux.intel.com>
Subject: Re: [PATCH 1/2] thunderbolt: Do not handle ICM events after domain is stopped
Date: Fri, 14 Sep 2018 10:52:11 +0300	[thread overview]
Message-ID: <20180914075211.GP14465@lahna.fi.intel.com> (raw)
In-Reply-To: <20180903132012.23531-1-mika.westerberg@linux.intel.com>

On Mon, Sep 03, 2018 at 04:20:11PM +0300, Mika Westerberg wrote:
> If there is a long chain of devices connected when the driver is loaded
> ICM sends device connected event for each and those are put to tb->wq
> for later processing. Now if the driver gets unloaded in the middle, so
> that the work queue is not yet empty it gets flushed by tb_domain_stop().
> However, by that time the root switch is already removed so the driver
> crashes when it tries to dereference it in ICM event handling callbacks.
> 
> Fix this by checking whether the root switch is already removed. If it
> is we know that the domain is stopped and we should merely skip handling
> the event.
> 
> Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>

Applied to thunderbolt.git/fixes.

  parent reply	other threads:[~2018-09-14  7:52 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-03 13:20 [PATCH 1/2] thunderbolt: Do not handle ICM events after domain is stopped Mika Westerberg
2018-09-03 13:20 ` [PATCH 2/2] thunderbolt: Initialize after IOMMUs Mika Westerberg
2018-09-05  8:47   ` Lukas Wunner
2018-09-05  9:46     ` Mika Westerberg
2018-09-06  8:13       ` Lukas Wunner
2018-09-06 10:36         ` Mika Westerberg
2018-09-06 11:00           ` Lukas Wunner
2018-09-06 11:07             ` Mika Westerberg
2018-09-06 11:21               ` Lukas Wunner
2018-09-06 11:46                 ` Mika Westerberg
2018-09-14  7:52   ` Mika Westerberg
2018-09-14  7:52 ` Mika Westerberg [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-09-24 10:20 [PATCH 0/2] thunderbolt: Fixes for v4.19-rc6 Mika Westerberg
2018-09-24 10:20 ` [PATCH 1/2] thunderbolt: Do not handle ICM events after domain is stopped Mika Westerberg

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=20180914075211.GP14465@lahna.fi.intel.com \
    --to=mika.westerberg@linux.intel.com \
    --cc=YehezkelShB@gmail.com \
    --cc=andreas.noever@gmail.com \
    --cc=baolu.lu@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lukas@wunner.de \
    --cc=michael.jamet@intel.com \
    /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