public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Kai-Heng Feng <kai.heng.feng@canonical.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	andreas.noever@gmail.com, michael.jamet@intel.com,
	yehezkel.bernat@intel.com
Subject: Re: [PATCH] thunderbolt: icm: Remove Apple check for Alpine Ridge
Date: Mon, 7 Aug 2017 10:02:54 +0300	[thread overview]
Message-ID: <20170807070254.GL2369@lahna.fi.intel.com> (raw)
In-Reply-To: <CAAd53p5c+MHuviVjEi0=oJ0eEE3atW181PsHpCjfqnhtHBy=GA@mail.gmail.com>

On Mon, Aug 07, 2017 at 02:50:49PM +0800, Kai-Heng Feng wrote:
> On Mon, Aug 7, 2017 at 12:49 PM, Kai-Heng Feng
> <kai.heng.feng@canonical.com> wrote:
> > In icm_ar_is_supported(), icm->upstream_port will be uninitialized if
> > the hardware is not an Apple one.
> >
> > The uninitialized icm->upstream_port will later be dereferenced in
> > pcie2cio_write(), causes a NULL pointer dereference issue.
> >
> > Commit f67cf491175a ("thunderbolt: Add support for Internal Connection
> > Manager (ICM)") states that all Alpine Ridge will use ICM, so I guess
> > it's safe to remove the Apple check.

Yes, Alpine Ridge uses ICM but on Apple systems we need to additional
steps to get it up and running. That's why the check is there. So no it
cannot be removed.

Is there an actual issue you are trying to solve here?
                                                                                                                                                                                                                     
> > Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
> > ---
> >  drivers/thunderbolt/icm.c | 7 -------
> >  1 file changed, 7 deletions(-)
> >
> > diff --git a/drivers/thunderbolt/icm.c b/drivers/thunderbolt/icm.c
> > index bdaac1ff00a5..2ab25aac5446 100644
> > --- a/drivers/thunderbolt/icm.c
> > +++ b/drivers/thunderbolt/icm.c
> > @@ -514,13 +514,6 @@ static bool icm_ar_is_supported(struct tb *tb)
> >         struct icm *icm = tb_priv(tb);
> >
> >         /*
> > -        * Starting from Alpine Ridge we can use ICM on Apple machines
> > -        * as well. We just need to reset and re-enable it first.
> > -        */
> > -       if (!is_apple())
> > -               return true;
> > -
> > -       /*

How did you test this?

  reply	other threads:[~2017-08-07  7:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20170807044912.18146-1-kai.heng.feng@canonical.com>
2017-08-07  6:50 ` [PATCH] thunderbolt: icm: Remove Apple check for Alpine Ridge Kai-Heng Feng
2017-08-07  7:02   ` Mika Westerberg [this message]
2017-08-07  7:20     ` Kai-Heng Feng
2017-08-07  7:51       ` Mika Westerberg
2017-08-07  8:00         ` Kai-Heng Feng
2017-08-07  8:06           ` 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=20170807070254.GL2369@lahna.fi.intel.com \
    --to=mika.westerberg@linux.intel.com \
    --cc=andreas.noever@gmail.com \
    --cc=kai.heng.feng@canonical.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michael.jamet@intel.com \
    --cc=yehezkel.bernat@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