From: Sebastian Reichel <sre@kernel.org>
To: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Cc: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>,
David Woodhouse <dwmw2@infradead.org>, Milo Kim <milo.kim@ti.com>,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
Dmitry Artamonow <mad_soft@inbox.ru>,
Marek Belisko <marek@goldelico.com>,
stable@vger.kernel.org
Subject: Re: [RFT RESEND 1/4] power_supply: twl4030_madc: Check return value of power_supply_register
Date: Wed, 25 Feb 2015 22:22:27 +0100 [thread overview]
Message-ID: <20150225212227.GI13695@earth> (raw)
In-Reply-To: <1424439145-16895-1-git-send-email-k.kozlowski@samsung.com>
[-- Attachment #1: Type: text/plain, Size: 687 bytes --]
Hi Krzysztof,
On Fri, Feb 20, 2015 at 02:32:22PM +0100, Krzysztof Kozlowski wrote:
> The return value of power_supply_register() call was not checked and
> even on error probe() function returned 0. If registering failed then
> during unbind the driver tried to unregister power supply which was not
> actually registered.
>
> This could lead to memory corruption because power_supply_unregister()
> unconditionally cleans up given power supply.
>
> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> Fixes: da0a00ebc239 ("power: Add twl4030_madc battery driver.")
> Cc: <stable@vger.kernel.org>
Thanks, added patches 1-4 to fixes branch.
-- Sebastian
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
prev parent reply other threads:[~2015-02-25 21:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-20 13:32 [RFT RESEND 1/4] power_supply: twl4030_madc: Check return value of power_supply_register Krzysztof Kozlowski
2015-02-20 13:32 ` [RFT RESEND 2/4] power_supply: ipaq_micro_battery: Fix leaking workqueue Krzysztof Kozlowski
2015-02-20 13:32 ` [RFT RESEND 3/4] power_supply: ipaq_micro_battery: Check return values in probe Krzysztof Kozlowski
2015-02-20 13:32 ` [RFT RESEND 4/4] power_supply: lp8788-charger: Fix leaked power supply on probe fail Krzysztof Kozlowski
2015-02-25 21:22 ` Sebastian Reichel [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=20150225212227.GI13695@earth \
--to=sre@kernel.org \
--cc=dbaryshkov@gmail.com \
--cc=dwmw2@infradead.org \
--cc=k.kozlowski@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mad_soft@inbox.ru \
--cc=marek@goldelico.com \
--cc=milo.kim@ti.com \
--cc=stable@vger.kernel.org \
/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