From: Ido Schimmel <idosch@mellanox.com>
To: "rui.zhang@intel.com" <rui.zhang@intel.com>,
"edubezval@gmail.com" <edubezval@gmail.com>,
"daniel.lezcano@linaro.org" <daniel.lezcano@linaro.org>
Cc: "linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
Jiri Pirko <jiri@mellanox.com>,
Vadim Pasternak <vadimp@mellanox.com>, mlxsw <mlxsw@mellanox.com>,
"idosch@idosch.org" <idosch@idosch.org>
Subject: Re: [PATCH] thermal: Fix use-after-free when unregistering thermal zone device
Date: Tue, 23 Jul 2019 08:36:02 +0000 [thread overview]
Message-ID: <20190723083600.GA31076@splinter> (raw)
In-Reply-To: <20190710101452.32748-1-idosch@idosch.org>
On Wed, Jul 10, 2019 at 01:14:52PM +0300, Ido Schimmel wrote:
> From: Ido Schimmel <idosch@mellanox.com>
>
> thermal_zone_device_unregister() cancels the delayed work that polls the
> thermal zone, but it does not wait for it to finish. This is racy with
> respect to the freeing of the thermal zone device, which can result in a
> use-after-free [1].
>
> Fix this by waiting for the delayed work to finish before freeing the
> thermal zone device. Note that thermal_zone_device_set_polling() is
> never invoked from an atomic context, so it is safe to call
> cancel_delayed_work_sync() that can block.
Ping?
next prev parent reply other threads:[~2019-07-23 8:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-10 10:14 [PATCH] thermal: Fix use-after-free when unregistering thermal zone device Ido Schimmel
2019-07-23 8:36 ` Ido Schimmel [this message]
2019-07-24 14:10 ` Zhang Rui
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=20190723083600.GA31076@splinter \
--to=idosch@mellanox.com \
--cc=daniel.lezcano@linaro.org \
--cc=edubezval@gmail.com \
--cc=idosch@idosch.org \
--cc=jiri@mellanox.com \
--cc=linux-pm@vger.kernel.org \
--cc=mlxsw@mellanox.com \
--cc=rui.zhang@intel.com \
--cc=vadimp@mellanox.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.