From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Hongyan Xu <getshell@seu.edu.cn>
Cc: Jiri Kosina <jikos@kernel.org>, David Sterba <dsterba@suse.com>,
Jiri Slaby <jirislaby@kernel.org>,
Ben Martel <benm@symmetric.co.nz>,
Stephen Blackheath <stephen@symmetric.co.nz>,
linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org,
stable@vger.kernel.org, jianhao.xu@seu.edu.cn
Subject: Re: [PATCH] tty: ipwireless: shut down setup timer before freeing hardware
Date: Thu, 6 Aug 2026 08:16:32 +0200 [thread overview]
Message-ID: <2026080627-uncrushed-boil-769d@gregkh> (raw)
In-Reply-To: <20260806060741.714-1-getshell@seu.edu.cn>
On Thu, Aug 06, 2026 at 02:07:40PM +0800, Hongyan Xu wrote:
> ipwireless_stop_interrupts() uses timer_delete() for a timer whose callback
> can rearm itself. timer_delete() neither waits for a running callback nor
> prevents that callback from rearming the timer. The callback can therefore
> continue to access struct ipw_hardware after ipwireless_hardware_free() has
> freed it.
>
> Use timer_shutdown_sync() so teardown waits for the callback and prevents
> any further rearming.
>
> Fixes: 099dc4fb6265 ("ipwireless: driver for PC Card 3G/UMTS modem")
> Cc: stable@vger.kernel.org
> Signed-off-by: Hongyan Xu <getshell@seu.edu.cn>
> ---
> drivers/tty/ipwireless/hardware.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/tty/ipwireless/hardware.c b/drivers/tty/ipwireless/hardware.c
> index 0bfcbca6e2df..fb3554a6e04b 100644
> --- a/drivers/tty/ipwireless/hardware.c
> +++ b/drivers/tty/ipwireless/hardware.c
> @@ -1721,7 +1721,7 @@ void ipwireless_stop_interrupts(struct ipw_hardware *hw)
> if (!hw->shutting_down) {
> /* Tell everyone we are going down. */
> hw->shutting_down = 1;
> - timer_delete(&hw->setup_timer);
> + timer_shutdown_sync(&hw->setup_timer);
>
> /* Prevent the hardware from sending any more interrupts */
> do_close_hardware(hw);
> --
> 2.50.1.windows.1
>
How was this tested?
next prev parent reply other threads:[~2026-08-06 6:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-06 6:07 [PATCH] tty: ipwireless: shut down setup timer before freeing hardware Hongyan Xu
2026-08-06 6:16 ` Greg Kroah-Hartman [this message]
2026-08-06 7:54 ` Jiri Kosina
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=2026080627-uncrushed-boil-769d@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=benm@symmetric.co.nz \
--cc=dsterba@suse.com \
--cc=getshell@seu.edu.cn \
--cc=jianhao.xu@seu.edu.cn \
--cc=jikos@kernel.org \
--cc=jirislaby@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=stephen@symmetric.co.nz \
/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