All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Cc: Sebastian Reichel <sre@kernel.org>,
	Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>,
	David Woodhouse <dwmw2@infradead.org>,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Len Brown <lenb@kernel.org>, Jiri Kosina <jkosina@suse.cz>,
	David Herrmann <dh.herrmann@googlemail.com>,
	Cezary Jackiewicz <cezary.jackiewicz@gmail.com>,
	Darren Hart <dvhart@infradead.org>,
	Support Opensource <support.opensource@diasemi.com>,
	Milo Kim <milo.kim@ti.com>,
	Julian Andres Klode <jak@jak-linux.org>,
	Marc Dietrich <marvin24@gmx.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-acpi@vger.kernel.org, linux-input@vger.kernel.org,
	platform-driver-x86@vger.kernel.org,
	patches@opensource.wolfsonmicro.com, ac100@lists.launchpad.net,
	linux-tegra@vger.kernel.org, devel@driverdev.osuosl.org,
	Linus Walleij <linus.walleij@linaro.org>,
	Samuel
Subject: Re: [PATCH v3 03/20] power_supply: Add API for safe access of power supply function attrs
Date: Wed, 4 Feb 2015 14:44:56 +0100	[thread overview]
Message-ID: <20150204134456.GA8312@amd> (raw)
In-Reply-To: <1422629278-12202-4-git-send-email-k.kozlowski@samsung.com>

On Fri 2015-01-30 15:47:41, Krzysztof Kozlowski wrote:
> Add simple wrappers for accessing power supply's function attributes:
>  - get_property -> power_supply_get_property
>  - set_property -> power_supply_set_property
>  - property_is_writeable -> power_supply_property_is_writeable
>  - external_power_changed -> power_supply_external_power_changed
> 
> This API along with atomic usage counter adds a safe way of accessing a
> power supply from another driver. If power supply is unregistered after
> obtaining reference to it by some driver, then the API wrappers won't be
> executed in invalid (freed) context.
> 
> Next patch changing the ownership of power supply class is still needed
> to fully fix race conditions in accessing freed power supply.
> 
> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
> Reviewed-by: Sebastian Reichel <sre@kernel.org>

For 1-3: Acked-by: Pavel Machek <pavel@ucw.cz>

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

WARNING: multiple messages have this Message-ID (diff)
From: pavel@ucw.cz (Pavel Machek)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 03/20] power_supply: Add API for safe access of power supply function attrs
Date: Wed, 4 Feb 2015 14:44:56 +0100	[thread overview]
Message-ID: <20150204134456.GA8312@amd> (raw)
In-Reply-To: <1422629278-12202-4-git-send-email-k.kozlowski@samsung.com>

On Fri 2015-01-30 15:47:41, Krzysztof Kozlowski wrote:
> Add simple wrappers for accessing power supply's function attributes:
>  - get_property -> power_supply_get_property
>  - set_property -> power_supply_set_property
>  - property_is_writeable -> power_supply_property_is_writeable
>  - external_power_changed -> power_supply_external_power_changed
> 
> This API along with atomic usage counter adds a safe way of accessing a
> power supply from another driver. If power supply is unregistered after
> obtaining reference to it by some driver, then the API wrappers won't be
> executed in invalid (freed) context.
> 
> Next patch changing the ownership of power supply class is still needed
> to fully fix race conditions in accessing freed power supply.
> 
> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
> Reviewed-by: Sebastian Reichel <sre@kernel.org>

For 1-3: Acked-by: Pavel Machek <pavel@ucw.cz>

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

WARNING: multiple messages have this Message-ID (diff)
From: Pavel Machek <pavel@ucw.cz>
To: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Cc: Sebastian Reichel <sre@kernel.org>,
	Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>,
	David Woodhouse <dwmw2@infradead.org>,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Len Brown <lenb@kernel.org>, Jiri Kosina <jkosina@suse.cz>,
	David Herrmann <dh.herrmann@googlemail.com>,
	Cezary Jackiewicz <cezary.jackiewicz@gmail.com>,
	Darren Hart <dvhart@infradead.org>,
	Support Opensource <support.opensource@diasemi.com>,
	Milo Kim <milo.kim@ti.com>,
	Julian Andres Klode <jak@jak-linux.org>,
	Marc Dietrich <marvin24@gmx.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-acpi@vger.kernel.org, linux-input@vger.kernel.org,
	platform-driver-x86@vger.kernel.org,
	patches@opensource.wolfsonmicro.com, ac100@lists.launchpad.net,
	linux-tegra@vger.kernel.org, devel@driverdev.osuosl.org,
	Linus Walleij <linus.walleij@linaro.org>,
	Samuel Ortiz <sameo@linux.intel.com>,
	Lee Jones <lee.jones@linaro.org>,
	linux-arm-kernel@lists.infradead.org,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	x86@kernel.org, Daniel Mack <daniel@zonque.org>,
	Haojian Zhuang <haojian.zhuang@gmail.com>,
	Robert Jarzmik <robert.jarzmik@free.fr>,
	Russell King <linux@arm.linux.org.uk>,
	Thomas Gleixner <tglx@linutronix.de>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Subject: Re: [PATCH v3 03/20] power_supply: Add API for safe access of power supply function attrs
Date: Wed, 4 Feb 2015 14:44:56 +0100	[thread overview]
Message-ID: <20150204134456.GA8312@amd> (raw)
In-Reply-To: <1422629278-12202-4-git-send-email-k.kozlowski@samsung.com>

On Fri 2015-01-30 15:47:41, Krzysztof Kozlowski wrote:
> Add simple wrappers for accessing power supply's function attributes:
>  - get_property -> power_supply_get_property
>  - set_property -> power_supply_set_property
>  - property_is_writeable -> power_supply_property_is_writeable
>  - external_power_changed -> power_supply_external_power_changed
> 
> This API along with atomic usage counter adds a safe way of accessing a
> power supply from another driver. If power supply is unregistered after
> obtaining reference to it by some driver, then the API wrappers won't be
> executed in invalid (freed) context.
> 
> Next patch changing the ownership of power supply class is still needed
> to fully fix race conditions in accessing freed power supply.
> 
> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
> Reviewed-by: Sebastian Reichel <sre@kernel.org>

For 1-3: Acked-by: Pavel Machek <pavel@ucw.cz>

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

  reply	other threads:[~2015-02-04 13:44 UTC|newest]

Thread overview: 95+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-30 14:47 [PATCH v3 00/20] power_supply: Allow safe usage of power supply Krzysztof Kozlowski
2015-01-30 14:47 ` Krzysztof Kozlowski
2015-01-30 14:47 ` Krzysztof Kozlowski
2015-01-30 14:47 ` [PATCH v3 01/20] power_supply: Add driver private data Krzysztof Kozlowski
2015-01-30 14:47   ` Krzysztof Kozlowski
2015-01-30 14:47   ` Krzysztof Kozlowski
     [not found] ` <1422629278-12202-1-git-send-email-k.kozlowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2015-01-30 14:47   ` [PATCH v3 02/20] power_supply: Move run-time configuration to separate structure Krzysztof Kozlowski
2015-01-30 14:47     ` Krzysztof Kozlowski
2015-01-30 14:47     ` Krzysztof Kozlowski
2015-02-07  2:19     ` Darren Hart
2015-02-07  2:19       ` Darren Hart
2015-02-07  2:19       ` Darren Hart
2015-01-30 14:47   ` [PATCH v3 17/20] power_supply: 88pm860x_charger: Decrement the power supply's device reference counter Krzysztof Kozlowski
2015-01-30 14:47     ` Krzysztof Kozlowski
2015-01-30 14:47     ` Krzysztof Kozlowski
2015-02-02  8:58   ` [PATCH v3 00/20] power_supply: Allow safe usage of power supply Marc Dietrich
2015-02-02  8:58     ` Marc Dietrich
2015-02-02  8:58     ` Marc Dietrich
2015-01-30 14:47 ` [PATCH v3 03/20] power_supply: Add API for safe access of power supply function attrs Krzysztof Kozlowski
2015-01-30 14:47   ` Krzysztof Kozlowski
2015-01-30 14:47   ` Krzysztof Kozlowski
2015-02-04 13:44   ` Pavel Machek [this message]
2015-02-04 13:44     ` Pavel Machek
2015-02-04 13:44     ` Pavel Machek
2015-01-30 14:47 ` [PATCH v3 04/20] power_supply: sysfs: Use power_supply_*() API for accessing " Krzysztof Kozlowski
2015-01-30 14:47   ` Krzysztof Kozlowski
2015-01-30 14:47   ` Krzysztof Kozlowski
2015-02-09 19:02   ` Stefan Wahren
2015-02-09 19:02     ` Stefan Wahren
2015-02-09 19:02     ` Stefan Wahren
     [not found]     ` <70066540.345820.1423508541546.JavaMail.open-xchange-h4m1HHXQYNHZ78VGacPtK8gmgJlYmuWJ@public.gmane.org>
2015-02-10  7:39       ` Krzysztof Kozlowski
2015-02-10  7:39         ` Krzysztof Kozlowski
2015-02-10  7:39         ` Krzysztof Kozlowski
2015-01-30 14:47 ` [PATCH v3 05/20] power_supply: 88pm860x_charger: " Krzysztof Kozlowski
2015-01-30 14:47   ` Krzysztof Kozlowski
2015-01-30 14:47   ` Krzysztof Kozlowski
2015-01-30 14:47 ` [PATCH v3 06/20] power_supply: ab8500: " Krzysztof Kozlowski
2015-01-30 14:47   ` Krzysztof Kozlowski
2015-01-30 14:47   ` Krzysztof Kozlowski
2015-01-30 14:47 ` [PATCH v3 07/20] mfd: " Krzysztof Kozlowski
2015-01-30 14:47   ` Krzysztof Kozlowski
2015-01-30 14:47   ` Krzysztof Kozlowski
2015-01-30 14:47 ` [PATCH v3 08/20] power_supply: apm_power: " Krzysztof Kozlowski
2015-01-30 14:47   ` Krzysztof Kozlowski
2015-01-30 14:47   ` Krzysztof Kozlowski
2015-01-30 14:47 ` [PATCH v3 09/20] power_supply: bq2415x_charger: " Krzysztof Kozlowski
2015-01-30 14:47   ` Krzysztof Kozlowski
2015-01-30 14:47   ` Krzysztof Kozlowski
2015-01-30 14:47 ` [PATCH v3 10/20] power_supply: charger-manager: " Krzysztof Kozlowski
2015-01-30 14:47   ` Krzysztof Kozlowski
2015-01-30 14:47   ` Krzysztof Kozlowski
2015-01-30 14:47 ` [PATCH v3 11/20] power_supply: Change ownership from driver to core Krzysztof Kozlowski
2015-01-30 14:47   ` Krzysztof Kozlowski
2015-01-30 14:47 ` [PATCH v3 12/20] power_supply: Add power_supply_put for decrementing device reference counter Krzysztof Kozlowski
2015-01-30 14:47   ` Krzysztof Kozlowski
2015-01-30 14:47   ` Krzysztof Kozlowski
2015-01-30 14:47 ` [PATCH v3 13/20] power_supply: Increment power supply use counter when obtaining references Krzysztof Kozlowski
2015-01-30 14:47   ` Krzysztof Kozlowski
2015-01-30 14:47   ` Krzysztof Kozlowski
2015-01-30 14:47 ` [PATCH v3 14/20] power_supply: charger-manager: Decrement the power supply's device reference counter Krzysztof Kozlowski
2015-01-30 14:47   ` Krzysztof Kozlowski
2015-01-30 14:47   ` Krzysztof Kozlowski
2015-01-30 14:47 ` [PATCH v3 15/20] x86/olpc/xo1/sci: Use newly added power_supply_put API Krzysztof Kozlowski
2015-01-30 14:47   ` Krzysztof Kozlowski
2015-01-30 14:47   ` Krzysztof Kozlowski
2015-01-30 14:47 ` [PATCH v3 16/20] x86/olpc/xo15/sci: " Krzysztof Kozlowski
2015-01-30 14:47   ` Krzysztof Kozlowski
2015-01-30 14:47   ` Krzysztof Kozlowski
2015-01-30 14:47 ` [PATCH v3 18/20] power_supply: bq2415x_charger: Decrement the power supply's device reference counter Krzysztof Kozlowski
2015-01-30 14:47   ` Krzysztof Kozlowski
2015-01-30 14:47   ` Krzysztof Kozlowski
2015-01-30 14:47 ` [PATCH v3 19/20] mfd: ab8500: " Krzysztof Kozlowski
2015-01-30 14:47   ` Krzysztof Kozlowski
2015-01-30 14:47   ` Krzysztof Kozlowski
2015-01-30 14:47 ` [PATCH v3 20/20] arm: mach-pxa: " Krzysztof Kozlowski
2015-01-30 14:47   ` Krzysztof Kozlowski
2015-01-30 14:47   ` Krzysztof Kozlowski
2015-02-06 13:49   ` Pavel Machek
2015-02-06 13:49     ` Pavel Machek
2015-02-06 13:49     ` Pavel Machek
2015-02-06 14:43     ` Krzysztof Kozlowski
2015-02-06 14:43       ` Krzysztof Kozlowski
2015-02-06 14:43       ` Krzysztof Kozlowski
2015-02-06 14:59       ` Pavel Machek
2015-02-06 14:59         ` Pavel Machek
2015-02-06 14:59         ` Pavel Machek
2015-02-09 10:07         ` Krzysztof Kozlowski
2015-02-09 10:07           ` Krzysztof Kozlowski
2015-02-09 10:07           ` Krzysztof Kozlowski
2015-02-11 22:12           ` Pavel Machek
2015-02-11 22:12             ` Pavel Machek
2015-02-11 22:12             ` Pavel Machek
2015-02-07 12:54   ` Robert Jarzmik
2015-02-07 12:54     ` Robert Jarzmik
2015-02-07 12:54     ` Robert Jarzmik

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=20150204134456.GA8312@amd \
    --to=pavel@ucw.cz \
    --cc=ac100@lists.launchpad.net \
    --cc=cezary.jackiewicz@gmail.com \
    --cc=dbaryshkov@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=dh.herrmann@googlemail.com \
    --cc=dvhart@infradead.org \
    --cc=dwmw2@infradead.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jak@jak-linux.org \
    --cc=jkosina@suse.cz \
    --cc=k.kozlowski@samsung.com \
    --cc=lenb@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=marvin24@gmx.de \
    --cc=milo.kim@ti.com \
    --cc=patches@opensource.wolfsonmicro.com \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=sre@kernel.org \
    --cc=support.opensource@diasemi.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.