public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sylwester Nawrocki <s.nawrocki@samsung.com>
To: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Cc: Tomasz Figa <tomasz.figa@gmail.com>,
	Mike Turquette <mturquette@linaro.org>,
	Kukjin Kim <kgene@kernel.org>,
	linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	Javier Martinez Canillas <javier.martinez@collabora.co.uk>,
	Vivek Gautam <gautam.vivek@samsung.com>,
	Kevin Hilman <khilman@kernel.org>,
	Russell King <linux@arm.linux.org.uk>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Subject: Re: [PATCH v2 1/5] clk: samsung: Fix double add of syscore ops after driver rebind
Date: Wed, 03 Dec 2014 13:10:55 +0100	[thread overview]
Message-ID: <547EFDCF.2030404@samsung.com> (raw)
In-Reply-To: <1417011857-10419-2-git-send-email-k.kozlowski@samsung.com>

On 26/11/14 15:24, Krzysztof Kozlowski wrote:
> During driver unbind the syscore ops were not unregistered which lead to
> double add on syscore list:
> 
> $ echo "3810000.audss-clock-controller" > /sys/bus/platform/drivers/exynos-audss-clk/unbind
> $ echo "3810000.audss-clock-controller" > /sys/bus/platform/drivers/exynos-audss-clk/bind
> [ 1463.044061] ------------[ cut here ]------------
> [ 1463.047255] WARNING: CPU: 0 PID: 1 at lib/list_debug.c:36 __list_add+0x8c/0xc0()
> [ 1463.054613] list_add double add: new=c06e52c0, prev=c06e52c0, next=c06d5f84.
> [ 1463.061625] Modules linked in:
> [ 1463.064623] CPU: 0 PID: 1 Comm: bash Tainted: G        W      3.18.0-rc5-next-20141121-00005-ga8fab06eab42-dirty #1022
> [ 1463.075338] [<c0014e2c>] (unwind_backtrace) from [<c0011d80>] (show_stack+0x10/0x14)
> [ 1463.083046] [<c0011d80>] (show_stack) from [<c048bb70>] (dump_stack+0x70/0xbc)
> [ 1463.090236] [<c048bb70>] (dump_stack) from [<c00233d4>] (warn_slowpath_common+0x74/0xb0)
> [ 1463.098295] [<c00233d4>] (warn_slowpath_common) from [<c00234a4>] (warn_slowpath_fmt+0x30/0x40)
> [ 1463.106962] [<c00234a4>] (warn_slowpath_fmt) from [<c020fe80>] (__list_add+0x8c/0xc0)
> [ 1463.114760] [<c020fe80>] (__list_add) from [<c0282094>] (register_syscore_ops+0x30/0x3c)
> [ 1463.122819] [<c0282094>] (register_syscore_ops) from [<c0392f20>] (exynos_audss_clk_probe+0x36c/0x460)
> [ 1463.132091] [<c0392f20>] (exynos_audss_clk_probe) from [<c0283084>] (platform_drv_probe+0x48/0xa4)
> [ 1463.141013] [<c0283084>] (platform_drv_probe) from [<c0281a14>] (driver_probe_device+0x13c/0x37c)
> [ 1463.149852] [<c0281a14>] (driver_probe_device) from [<c0280560>] (bind_store+0x90/0xe0)
> [ 1463.157822] [<c0280560>] (bind_store) from [<c027fd10>] (drv_attr_store+0x20/0x2c)
> [ 1463.165363] [<c027fd10>] (drv_attr_store) from [<c0143898>] (sysfs_kf_write+0x4c/0x50)
> [ 1463.173252] [<c0143898>] (sysfs_kf_write) from [<c0142c80>] (kernfs_fop_write+0xbc/0x198)
> [ 1463.181395] [<c0142c80>] (kernfs_fop_write) from [<c00e2be0>] (vfs_write+0xa0/0x1a8)
> [ 1463.189104] [<c00e2be0>] (vfs_write) from [<c00e2f00>] (SyS_write+0x40/0x8c)
> [ 1463.196122] [<c00e2f00>] (SyS_write) from [<c000f2a0>] (ret_fast_syscall+0x0/0x48)
> [ 1463.203655] ---[ end trace 08f6710c9bc8d8f3 ]---
> [ 1463.208244] exynos-audss-clk 3810000.audss-clock-controller: setup completed
> 
> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> Fixes: 1241ef94ccc3 ("clk: samsung: register audio subsystem clocks using common clock framework")
> Cc: <stable@vger.kernel.org>

Thanks for the fix, I applied the patch to my tree.

> ---
>  drivers/clk/samsung/clk-exynos-audss.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/clk/samsung/clk-exynos-audss.c b/drivers/clk/samsung/clk-exynos-audss.c
> index acce708ace18..7c4368e75ede 100644
> --- a/drivers/clk/samsung/clk-exynos-audss.c
> +++ b/drivers/clk/samsung/clk-exynos-audss.c
> @@ -210,6 +210,10 @@ static int exynos_audss_clk_remove(struct platform_device *pdev)
>  {
>  	int i;
>  
> +#ifdef CONFIG_PM_SLEEP
> +	unregister_syscore_ops(&exynos_audss_clk_syscore_ops);
> +#endif
> +

--
Regards,
Sylwester


  reply	other threads:[~2014-12-03 12:11 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-26 14:24 [PATCH v2 0/5] Fix Arndale Octa/Peach Pi boot on Audio subsystem clocks Krzysztof Kozlowski
2014-11-26 14:24 ` [PATCH v2 1/5] clk: samsung: Fix double add of syscore ops after driver rebind Krzysztof Kozlowski
2014-12-03 12:10   ` Sylwester Nawrocki [this message]
2014-11-26 14:24 ` [PATCH v2 2/5] clk: samsung: Fix clock disable failure because domain being gated Krzysztof Kozlowski
2014-12-03 14:12   ` Sylwester Nawrocki
2014-12-04  9:46     ` Krzysztof Kozlowski
2014-11-26 14:24 ` [PATCH v2 3/5] pinctrl: exynos: Fix GPIO setup failure because domain clock " Krzysztof Kozlowski
2014-11-28 14:04   ` Linus Walleij
2014-11-28 14:08     ` Krzysztof Kozlowski
2014-11-30 12:19       ` Tomasz Figa
2014-12-01  8:37         ` Krzysztof Kozlowski
2014-12-01 14:34           ` Tomasz Figa
2014-12-01 14:52             ` Krzysztof Kozlowski
2015-01-12 14:11             ` Krzysztof Kozlowski
2014-11-26 14:24 ` [PATCH v2 4/5] ARM: dts: exynos5420: Add clock for audss pinctrl Krzysztof Kozlowski
2014-11-26 14:24 ` [PATCH v2 5/5] clk: samsung: Fix memory leak of clock gate/divider/mux structures Krzysztof Kozlowski
2014-11-26 16:31 ` [PATCH v2 0/5] Fix Arndale Octa/Peach Pi boot on Audio subsystem clocks Javier Martinez Canillas

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=547EFDCF.2030404@samsung.com \
    --to=s.nawrocki@samsung.com \
    --cc=b.zolnierkie@samsung.com \
    --cc=gautam.vivek@samsung.com \
    --cc=javier.martinez@collabora.co.uk \
    --cc=k.kozlowski@samsung.com \
    --cc=kgene@kernel.org \
    --cc=khilman@kernel.org \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=m.szyprowski@samsung.com \
    --cc=mturquette@linaro.org \
    --cc=tomasz.figa@gmail.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