linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tsuchiya Yuto <kitakar@gmail.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Lukas Wunner <lukas@wunner.de>, Mark Brown <broonie@kernel.org>,
	Jarkko Nikula <jarkko.nikula@linux.intel.com>,
	linux-spi@vger.kernel.org, Daniel Mack <daniel@zonque.org>,
	Haojian Zhuang <haojian.zhuang@gmail.com>,
	Robert Jarzmik <robert.jarzmik@free.fr>
Subject: Re: [PATCH 2/3] spi: pxa2xx: Fix controller unregister order
Date: Wed, 27 May 2020 22:14:51 +0900	[thread overview]
Message-ID: <2e9365fd-9307-045a-8afe-1770f7cd7eda@gmail.com> (raw)
In-Reply-To: <20200527122753.GN1634618@smile.fi.intel.com>


On 5/27/20 9:27 PM, Andy Shevchenko wrote:
> On Wed, May 27, 2020 at 09:09:17PM +0900, Tsuchiya Yuto wrote:
>> I tried a kernel built with the prerequisite patch to this series + all
>> of patches in this series on top of v5.7-rc7 (with Arch Linux config
>> + olddefconfig).
>>
>> Current situations on 5.7-rc7 with Arch Linux config + olddefconfig
>> (without applying this series):
>> - I can reproduce the touch input crashing (surface3-spi) I mentioned
>>   in bugzilla [1] only after s2idle.
>> - all the other situations are the same as described in that bugzilla;
>>   I see NULL pointer dereference [2] after touch input crashing then try
>>   to unload only spi_pxa2xx_platform module.
>>
>> So, the steps to test that I did with this series applied are:
>> 1. go into s2idle then resume from s2idle
>> 2. make a touch input then surface3-spi reports that "SPI transfer
>>    timed out" repeatedly and no longer responds to any touch input
>> 3. try to unload only spi_pxa2xx_platform module and see if the NULL
>>    pointer dereference no longer occurs
>>
>> and I can confirm that I no longer see the NULL pointer dereference.
>> Thanks!
>
> Thank you very much for testing!
>
>> On 5/26/20 5:22 PM, Andy Shevchenko wrote:
>>> On Tue, May 26, 2020 at 09:39:13AM +0200, Lukas Wunner wrote:
>>>> On Mon, May 25, 2020 at 04:21:43PM +0300, Andy Shevchenko wrote:
>>>>> Tsuchiya Yuto, I'm going to apply this series as preparatory to my
>>>>> WIP patch in topic/spi/reload branch in my kernel tree on GitHub,
>>>>> so, it would be possible to see if this + my patch fixes crashes
>>>>> on removal. Though, please test this separately from my stuff to
>>>>> clarify if it fixes or not issue you have seen.
>>>> You also need to cherry-pick commit 84855678add8 ("spi: Fix controller
>>>> unregister order") from spi/for-next onto your topic/spi/reload branch
>>>> for reloading to work correctly.
>>>>
>>>> Alternatively, rebase your topic/spi/reload branch and redo the merge
>>>> from spi/for-next.  (You've merged spi/for-next into your branch on
>>>> May 14, but the commit was applied by Mark on May 20.)
>>> Ah, right. Will do it soon.
>>
>> I also built a kernel against your branch topic/spi/reload
>> (permalink: https://github.com/andy-shev/linux/tree/55cb78d5a752). The
>> result is the same as only applying this series; so, to fix the NULL pointer
>> dereference that I mentioned in bugzilla [2], only this series is required.
>>
>> Also, I want to make sure that what you tried in that branch is fixing
>> the NULL pointer dereference on spi_pxa2xx_platform module removal when
>> touch input crashed, not fixing the touch input crashing itself?
>
> Yes, my aim was to fix the SPI module reload issue. While the applied patch
> from Lukas does a huge improvement, there are still issues with ordering (you
> probably will never see them, though it's still possible based on the code).
>
> So, as far as I understood, the touch still able to come into position where
> it's not anymore responsive. Is it correct?

Yes, the touch still able to come into non-working state after every s2idle,
but always can be resurrected by reloading spi_pxa2xx_platform.

What this series fixed is the following thing:
- without this series: reloading spi_pxa2xx_platform resurrects touch
  input with causing NULL pointer dereference (system still operational
  after this anyway)
- with this series: reloading spi_pxa2xx_platform resurrects touch input
  *without* causing NULL pointer dereference

Let me know if any further info is required.
>
>> [1] https://bugzilla.kernel.org/show_bug.cgi?id=206403
>> [2] https://bugzilla.kernel.org/show_bug.cgi?id=206403#c1
>

  reply	other threads:[~2020-05-27 13:14 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-25 12:25 [PATCH 0/3] Intel SPI unbind fixes Lukas Wunner
2020-05-25 12:25 ` [PATCH 1/3] spi: dw: Fix controller unregister order Lukas Wunner
2020-05-25 13:15   ` Andy Shevchenko
2020-05-25 12:25 ` [PATCH 2/3] spi: pxa2xx: " Lukas Wunner
2020-05-25 13:21   ` Andy Shevchenko
2020-05-26  7:39     ` Lukas Wunner
2020-05-26  8:22       ` Andy Shevchenko
2020-05-27 12:09         ` Tsuchiya Yuto
2020-05-27 12:27           ` Andy Shevchenko
2020-05-27 13:14             ` Tsuchiya Yuto [this message]
2020-05-28  7:02               ` Tsuchiya Yuto
2020-05-28  8:41                 ` Andy Shevchenko
2020-05-28  9:31                   ` Lukas Wunner
2020-05-29 13:54                     ` Tsuchiya Yuto
2020-05-25 12:25 ` [PATCH 3/3] spi: pxa2xx: Fix runtime PM ref imbalance on probe error Lukas Wunner
2020-05-25 13:12   ` Andy Shevchenko
2020-05-26  8:46     ` Jarkko Nikula
2020-05-25 13:23 ` [PATCH 0/3] Intel SPI unbind fixes Andy Shevchenko
2020-05-26 16:46 ` 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=2e9365fd-9307-045a-8afe-1770f7cd7eda@gmail.com \
    --to=kitakar@gmail.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=broonie@kernel.org \
    --cc=daniel@zonque.org \
    --cc=haojian.zhuang@gmail.com \
    --cc=jarkko.nikula@linux.intel.com \
    --cc=linux-spi@vger.kernel.org \
    --cc=lukas@wunner.de \
    --cc=robert.jarzmik@free.fr \
    /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).