From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Hugo Villeneuve <hugo@hugovil.com>
Cc: gregkh@linuxfoundation.org, jirislaby@kernel.org,
jringle@gridpoint.com, kubakici@wp.pl, phil@raspberrypi.org,
bo.svangard@embeddedart.se, linux-kernel@vger.kernel.org,
linux-serial@vger.kernel.org,
Hugo Villeneuve <hvilleneuve@dimonoff.com>,
stable@vger.kernel.org, Yury Norov <yury.norov@gmail.com>
Subject: Re: [PATCH 02/18] serial: sc16is7xx: fix invalid sc16is7xx_lines bitfield in case of probe error
Date: Thu, 21 Dec 2023 18:16:40 +0200 [thread overview]
Message-ID: <ZYRk6NpuUJvVEmOZ@smile.fi.intel.com> (raw)
In-Reply-To: <20231221111337.2c1af5bbe4920268dac25e8f@hugovil.com>
On Thu, Dec 21, 2023 at 11:13:37AM -0500, Hugo Villeneuve wrote:
> On Thu, 21 Dec 2023 10:56:39 -0500
> Hugo Villeneuve <hugo@hugovil.com> wrote:
> > On Wed, 20 Dec 2023 17:40:42 +0200
> > Andy Shevchenko <andriy.shevchenko@intel.com> wrote:
...
> > this will indeed fix the problem described in patch 1.
> >
> > However, if I remove patch 1, and I simulate the same probe error as
> > described in patch 1, now we get stuck forever when trying to
> > remove the driver. This is something that I observed before and
> > that patch 1 also corrected.
> >
> > The problem is caused in sc16is7xx_remove() when calling this function
> >
> > kthread_flush_worker(&s->kworker);
> >
> > I am not sure how best to handle that without patch 1.
>
> Also, if we manage to get past kthread_flush_worker() and
> kthread_stop() (commented out for testing purposes), we get another bug:
>
> # rmmod sc16is7xx
> ...
> crystal-duart-24m already disabled
> WARNING: CPU: 2 PID: 340 at drivers/clk/clk.c:1090
> clk_core_disable+0x1b0/0x1e0
> ...
> Call trace:
> clk_core_disable+0x1b0/0x1e0
> clk_disable+0x38/0x60
> sc16is7xx_remove+0x1e4/0x240 [sc16is7xx]
>
> This one is caused by calling clk_disable_unprepare(). But
> clk_disable_unprepare() has already been called in probe error handling
> code. Patch 1 also fixed this...
Word "fixed" is incorrect. "Papered over" is what it did.
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2023-12-21 16:20 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20231219171903.3530985-1-hugo@hugovil.com>
2023-12-19 17:18 ` [PATCH 01/18] serial: sc16is7xx: fix segfault when removing driver Hugo Villeneuve
2023-12-20 15:34 ` Andy Shevchenko
2023-12-20 15:38 ` Andy Shevchenko
2023-12-19 17:18 ` [PATCH 02/18] serial: sc16is7xx: fix invalid sc16is7xx_lines bitfield in case of probe error Hugo Villeneuve
2023-12-20 15:40 ` Andy Shevchenko
2023-12-21 15:56 ` Hugo Villeneuve
2023-12-21 16:05 ` Andy Shevchenko
2023-12-21 16:13 ` Hugo Villeneuve
2023-12-21 16:16 ` Andy Shevchenko [this message]
2023-12-21 17:13 ` Hugo Villeneuve
2023-12-19 17:18 ` [PATCH 03/18] serial: sc16is7xx: remove obsolete loop in sc16is7xx_port_irq() Hugo Villeneuve
2023-12-20 15:41 ` Andy Shevchenko
2023-12-20 22:09 ` Hugo Villeneuve
2023-12-19 17:18 ` [PATCH 04/18] serial: sc16is7xx: improve do/while loop in sc16is7xx_irq() Hugo Villeneuve
2023-12-20 15:42 ` Andy Shevchenko
2023-12-20 16:00 ` Hugo Villeneuve
2023-12-19 17:18 ` [PATCH 15/18] serial: sc16is7xx: pass R/W buffer in FIFO functions Hugo Villeneuve
2023-12-20 15:57 ` Andy Shevchenko
2023-12-21 19:35 ` Hugo Villeneuve
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=ZYRk6NpuUJvVEmOZ@smile.fi.intel.com \
--to=andriy.shevchenko@intel.com \
--cc=bo.svangard@embeddedart.se \
--cc=gregkh@linuxfoundation.org \
--cc=hugo@hugovil.com \
--cc=hvilleneuve@dimonoff.com \
--cc=jirislaby@kernel.org \
--cc=jringle@gridpoint.com \
--cc=kubakici@wp.pl \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=phil@raspberrypi.org \
--cc=stable@vger.kernel.org \
--cc=yury.norov@gmail.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