From: Vladimir Zapolskiy <vz@mleia.com>
To: Zou Wei <zou_wei@huawei.com>, wim@linux-watchdog.org, linux@roeck-us.net
Cc: linux-watchdog@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH -next] watchdog: Fix possible use-after-free by calling del_timer_sync()
Date: Wed, 12 May 2021 20:04:27 +0300 [thread overview]
Message-ID: <f5b8a4e5-069b-290d-b0d6-2ef89f7a0d4a@mleia.com> (raw)
In-Reply-To: <1620802676-19701-1-git-send-email-zou_wei@huawei.com>
On 5/12/21 9:57 AM, Zou Wei wrote:
> This driver's remove path calls del_timer(). However, that function
> does not wait until the timer handler finishes. This means that the
> timer handler may still be running after the driver's remove function
> has finished, which would result in a use-after-free.
>
> Fix by calling del_timer_sync(), which makes sure the timer handler
> has finished, and unable to re-schedule itself.
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Zou Wei <zou_wei@huawei.com>
Acked-by: Vladimir Zapolskiy <vz@mleia.com>
--
Best wishes,
Vladimir
prev parent reply other threads:[~2021-05-12 19:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-12 6:57 Zou Wei
2021-05-12 14:06 ` Guenter Roeck
2021-05-13 2:01 ` Samuel Zou
2021-05-12 17:04 ` Vladimir Zapolskiy [this message]
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=f5b8a4e5-069b-290d-b0d6-2ef89f7a0d4a@mleia.com \
--to=vz@mleia.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=wim@linux-watchdog.org \
--cc=zou_wei@huawei.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
all inboxes | Powered by JetHome®