All of lore.kernel.org
 help / color / mirror / Atom feed
From: jonghwa3.lee@samsung.com
To: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	Samuel Ortiz <sameo@linux.intel.com>,
	Lee Jones <lee.jones@linaro.org>,
	Sebastian Reichel <sre@kernel.org>,
	Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>,
	David Woodhouse <dwmw2@infradead.org>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
	Anton Vorontsov <anton@enomsg.org>,
	Guenter Roeck <linux@roeck-us.net>, Pavel Machek <pavel@ucw.cz>,
	Myungjoo Ham <myungjoo.ham@samsung.com>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Subject: Re: [PATCH 0/8] power_supply: Add API for safe access of get_property-like function attrs
Date: Wed, 15 Oct 2014 11:22:05 +0900	[thread overview]
Message-ID: <543DDA4D.2060103@samsung.com> (raw)
In-Reply-To: <1413289246-31650-1-git-send-email-k.kozlowski@samsung.com>

Hi,
On 2014년 10월 14일 21:20, Krzysztof Kozlowski wrote:

> Hi,
> 
> 
> After fixing issue with referencing old power supply after driver
> unbind in charger manager [1] I noticed that the race condition in such
> case may still exist. It would be harder to trigger but still possible.
> 
> The race is between using a reference to power supply (obtained
> with power_supply_get_by_name()) and removing the driver.
> 
> This patchset aims to fix the race by introducing wrappers for
> accessing the power supply function attributes.
> 
> Patch 1 introduces new API. Other patches replace direct calls in
> drivers.
> 
> Rebased on next-20141007.
> Tested on Trats2 board (max77693 + charger manager).
> 
> 
> Kindly asking for reviewing/testing the drivers, although the changes
> are straightforward.
> 


Looks good to me, but need someone to comment on this.

Acked-by : Jonghwa Lee <jonghwa3.lee@samusng.com>

Thanks,
Jonghwa

> 
> Best regards,
> Krzysztof
> 
> 
> [1] https://lkml.org/lkml/2014/10/13/272
> 
> 
> 
> Krzysztof Kozlowski (8):
>   power_supply: Add API for safe access of power supply function attrs
>   power_supply: sysfs: Use power_supply_*() API for accessing function
>     attrs
>   power: 88pm860x_charger: Use power_supply_*() API for accessing
>     function attrs
>   power: ab8500: Use power_supply_*() API for accessing function attrs
>   mfd: ab8500: Use power_supply_*() API for accessing function attrs
>   power: apm_power: Use power_supply_*() API for accessing function
>     attrs
>   power: bq2415x_charger: Use power_supply_*() API for accessing
>     function attrs
>   power: charger-manager: Use power_supply_*() API for accessing
>     function attrs
> 
>  drivers/mfd/ab8500-sysctrl.c       |  7 +++--
>  drivers/power/88pm860x_charger.c   | 13 +++++----
>  drivers/power/ab8500_btemp.c       |  2 +-
>  drivers/power/ab8500_charger.c     |  2 +-
>  drivers/power/ab8500_fg.c          |  2 +-
>  drivers/power/abx500_chargalg.c    |  4 +--
>  drivers/power/apm_power.c          |  4 +--
>  drivers/power/bq2415x_charger.c    |  3 +-
>  drivers/power/charger-manager.c    | 37 +++++++++++++------------
>  drivers/power/power_supply_core.c  | 57 ++++++++++++++++++++++++++++++++++++--
>  drivers/power/power_supply_sysfs.c |  6 ++--
>  include/linux/power_supply.h       | 16 +++++++++++
>  12 files changed, 115 insertions(+), 38 deletions(-)
> 



WARNING: multiple messages have this Message-ID (diff)
From: jonghwa3.lee@samsung.com (jonghwa3.lee at samsung.com)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 0/8] power_supply: Add API for safe access of get_property-like function attrs
Date: Wed, 15 Oct 2014 11:22:05 +0900	[thread overview]
Message-ID: <543DDA4D.2060103@samsung.com> (raw)
In-Reply-To: <1413289246-31650-1-git-send-email-k.kozlowski@samsung.com>

Hi,
On 2014? 10? 14? 21:20, Krzysztof Kozlowski wrote:

> Hi,
> 
> 
> After fixing issue with referencing old power supply after driver
> unbind in charger manager [1] I noticed that the race condition in such
> case may still exist. It would be harder to trigger but still possible.
> 
> The race is between using a reference to power supply (obtained
> with power_supply_get_by_name()) and removing the driver.
> 
> This patchset aims to fix the race by introducing wrappers for
> accessing the power supply function attributes.
> 
> Patch 1 introduces new API. Other patches replace direct calls in
> drivers.
> 
> Rebased on next-20141007.
> Tested on Trats2 board (max77693 + charger manager).
> 
> 
> Kindly asking for reviewing/testing the drivers, although the changes
> are straightforward.
> 


Looks good to me, but need someone to comment on this.

Acked-by : Jonghwa Lee <jonghwa3.lee@samusng.com>

Thanks,
Jonghwa

> 
> Best regards,
> Krzysztof
> 
> 
> [1] https://lkml.org/lkml/2014/10/13/272
> 
> 
> 
> Krzysztof Kozlowski (8):
>   power_supply: Add API for safe access of power supply function attrs
>   power_supply: sysfs: Use power_supply_*() API for accessing function
>     attrs
>   power: 88pm860x_charger: Use power_supply_*() API for accessing
>     function attrs
>   power: ab8500: Use power_supply_*() API for accessing function attrs
>   mfd: ab8500: Use power_supply_*() API for accessing function attrs
>   power: apm_power: Use power_supply_*() API for accessing function
>     attrs
>   power: bq2415x_charger: Use power_supply_*() API for accessing
>     function attrs
>   power: charger-manager: Use power_supply_*() API for accessing
>     function attrs
> 
>  drivers/mfd/ab8500-sysctrl.c       |  7 +++--
>  drivers/power/88pm860x_charger.c   | 13 +++++----
>  drivers/power/ab8500_btemp.c       |  2 +-
>  drivers/power/ab8500_charger.c     |  2 +-
>  drivers/power/ab8500_fg.c          |  2 +-
>  drivers/power/abx500_chargalg.c    |  4 +--
>  drivers/power/apm_power.c          |  4 +--
>  drivers/power/bq2415x_charger.c    |  3 +-
>  drivers/power/charger-manager.c    | 37 +++++++++++++------------
>  drivers/power/power_supply_core.c  | 57 ++++++++++++++++++++++++++++++++++++--
>  drivers/power/power_supply_sysfs.c |  6 ++--
>  include/linux/power_supply.h       | 16 +++++++++++
>  12 files changed, 115 insertions(+), 38 deletions(-)
> 

  parent reply	other threads:[~2014-10-15  2:22 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-14 12:20 [PATCH 0/8] power_supply: Add API for safe access of get_property-like function attrs Krzysztof Kozlowski
2014-10-14 12:20 ` Krzysztof Kozlowski
2014-10-14 12:20 ` [PATCH 1/8] power_supply: Add API for safe access of power supply " Krzysztof Kozlowski
2014-10-14 12:20   ` Krzysztof Kozlowski
2014-10-15 10:30   ` Pavel Machek
2014-10-15 10:30     ` Pavel Machek
2014-10-14 12:20 ` [PATCH 2/8] power_supply: sysfs: Use power_supply_*() API for accessing " Krzysztof Kozlowski
2014-10-14 12:20   ` Krzysztof Kozlowski
2014-10-14 12:20   ` Krzysztof Kozlowski
2014-10-15 10:32   ` Pavel Machek
2014-10-15 10:32     ` Pavel Machek
2014-10-15 10:49     ` Krzysztof Kozlowski
2014-10-15 10:49       ` Krzysztof Kozlowski
2014-10-15 12:19       ` Pavel Machek
2014-10-15 12:19         ` Pavel Machek
2014-10-14 12:20 ` [PATCH 3/8] power: 88pm860x_charger: " Krzysztof Kozlowski
2014-10-14 12:20   ` Krzysztof Kozlowski
2014-10-14 12:20   ` Krzysztof Kozlowski
2014-10-15 10:33   ` Pavel Machek
2014-10-15 10:33     ` Pavel Machek
2014-10-14 12:20 ` [PATCH 4/8] power: ab8500: " Krzysztof Kozlowski
2014-10-14 12:20   ` Krzysztof Kozlowski
2014-10-28  9:58   ` Linus Walleij
2014-10-28  9:58     ` Linus Walleij
2014-10-14 12:20 ` [PATCH 5/8] mfd: " Krzysztof Kozlowski
2014-10-14 12:20   ` Krzysztof Kozlowski
2014-10-14 12:20   ` Krzysztof Kozlowski
2014-10-15  9:07   ` Lee Jones
2014-10-15  9:07     ` Lee Jones
2014-10-14 12:20 ` [PATCH 6/8] power: apm_power: " Krzysztof Kozlowski
2014-10-14 12:20   ` Krzysztof Kozlowski
2014-10-14 12:20 ` [PATCH 7/8] power: bq2415x_charger: " Krzysztof Kozlowski
2014-10-14 12:20   ` Krzysztof Kozlowski
2014-10-14 12:20 ` [PATCH 8/8] power: charger-manager: " Krzysztof Kozlowski
2014-10-14 12:20   ` Krzysztof Kozlowski
2014-10-15  2:22 ` jonghwa3.lee [this message]
2014-10-15  2:22   ` [PATCH 0/8] power_supply: Add API for safe access of get_property-like " jonghwa3.lee at samsung.com
2014-10-15 10:35 ` Pavel Machek
2014-10-15 10:35   ` Pavel Machek

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=543DDA4D.2060103@samsung.com \
    --to=jonghwa3.lee@samsung.com \
    --cc=anton@enomsg.org \
    --cc=b.zolnierkie@samsung.com \
    --cc=dbaryshkov@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=k.kozlowski@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=lee.jones@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=m.szyprowski@samsung.com \
    --cc=myungjoo.ham@samsung.com \
    --cc=pavel@ucw.cz \
    --cc=sameo@linux.intel.com \
    --cc=sre@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 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.