mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] rtc/rtc-spear: free the config right after the rtc_device_unregister
@ 2012-06-03  6:24 Devendra Naga
  2012-06-20 13:32 ` devendra.aaru
       [not found] ` <e9129201-3636-49f6-9e97-156cb9823fd3@googlegroups.com>
  0 siblings, 2 replies; 5+ messages in thread
From: Devendra Naga @ 2012-06-03  6:24 UTC (permalink / raw)
  To: Alessandro Zummo, rtc-linux, linux-kernel; +Cc: Devendra Naga

the config was freed and its used again at rtc_device_unregister which leads
to a kernel panic. so, do it right after the rtc_device_unregister

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
---
 drivers/rtc/rtc-spear.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/rtc/rtc-spear.c b/drivers/rtc/rtc-spear.c
index 1f76320..e278547 100644
--- a/drivers/rtc/rtc-spear.c
+++ b/drivers/rtc/rtc-spear.c
@@ -458,12 +458,12 @@ static int __devexit spear_rtc_remove(struct platform_device *pdev)
 	clk_disable(config->clk);
 	clk_put(config->clk);
 	iounmap(config->ioaddr);
-	kfree(config);
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	if (res)
 		release_mem_region(res->start, resource_size(res));
 	platform_set_drvdata(pdev, NULL);
 	rtc_device_unregister(config->rtc);
+	kfree(config);
 
 	return 0;
 }
-- 
1.7.9.5


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] rtc/rtc-spear: free the config right after the rtc_device_unregister
  2012-06-03  6:24 [PATCH] rtc/rtc-spear: free the config right after the rtc_device_unregister Devendra Naga
@ 2012-06-20 13:32 ` devendra.aaru
       [not found] ` <e9129201-3636-49f6-9e97-156cb9823fd3@googlegroups.com>
  1 sibling, 0 replies; 5+ messages in thread
From: devendra.aaru @ 2012-06-20 13:32 UTC (permalink / raw)
  To: Alessandro Zummo, rtc-linux, linux-kernel; +Cc: Devendra Naga



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] rtc/rtc-spear: free the config right after the rtc_device_unregister
       [not found] ` <e9129201-3636-49f6-9e97-156cb9823fd3@googlegroups.com>
@ 2012-06-20 14:39   ` devendra.aaru
  2012-06-20 14:44     ` viresh kumar
  0 siblings, 1 reply; 5+ messages in thread
From: devendra.aaru @ 2012-06-20 14:39 UTC (permalink / raw)
  To: Viresh Kumar
  Cc: rtc-linux, Alessandro Zummo, linux-kernel, spear-devel, rajeev

Hi Viresh,

On Wed, Jun 20, 2012 at 7:57 PM, Viresh Kumar <viresh.linux@gmail.com> wrote:
> Reviewed-by: Viresh Kumar <viresh.linux@gmail.com>

Thanks, at last :-).

Is there any tree through which it can reach torvalds?

Thanks,
Devendra.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] rtc/rtc-spear: free the config right after the rtc_device_unregister
  2012-06-20 14:39   ` devendra.aaru
@ 2012-06-20 14:44     ` viresh kumar
  2012-06-20 16:49       ` devendra.aaru
  0 siblings, 1 reply; 5+ messages in thread
From: viresh kumar @ 2012-06-20 14:44 UTC (permalink / raw)
  To: devendra.aaru, Andrew Morton
  Cc: rtc-linux, Alessandro Zummo, linux-kernel, spear-devel, rajeev

On Wed, Jun 20, 2012 at 3:39 PM, devendra.aaru <devendra.aaru@gmail.com> wrote:
> On Wed, Jun 20, 2012 at 7:57 PM, Viresh Kumar <viresh.linux@gmail.com> wrote:
>> Reviewed-by: Viresh Kumar <viresh.linux@gmail.com>
>
> Thanks, at last :-).
>
> Is there any tree through which it can reach torvalds?

The way I would have found this information about any driver is by
looking at its
git-log and check via which path patches have been going till date. Maintainers
normally adds there signed-off's to patches that go through them.

Andrew Morton, is the one who applied rtc-spear patches till now. Added in cc.

--
viresh

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] rtc/rtc-spear: free the config right after the rtc_device_unregister
  2012-06-20 14:44     ` viresh kumar
@ 2012-06-20 16:49       ` devendra.aaru
  0 siblings, 0 replies; 5+ messages in thread
From: devendra.aaru @ 2012-06-20 16:49 UTC (permalink / raw)
  To: viresh kumar
  Cc: Andrew Morton, rtc-linux, Alessandro Zummo, linux-kernel,
	spear-devel, rajeev

Hi Viresh,

On Wed, Jun 20, 2012 at 8:14 PM, viresh kumar <viresh.linux@gmail.com> wrote:
> On Wed, Jun 20, 2012 at 3:39 PM, devendra.aaru <devendra.aaru@gmail.com> wrote:
>> On Wed, Jun 20, 2012 at 7:57 PM, Viresh Kumar <viresh.linux@gmail.com> wrote:
>>> Reviewed-by: Viresh Kumar <viresh.linux@gmail.com>
>>
>> Thanks, at last :-).
>>
>> Is there any tree through which it can reach torvalds?
>
> The way I would have found this information about any driver is by
> looking at its
> git-log and check via which path patches have been going till date. Maintainers
> normally adds there signed-off's to patches that go through them.
>
> Andrew Morton, is the one who applied rtc-spear patches till now. Added in cc.
>
Thanks a lot for the information.
> --
> viresh

Devendra.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-06-20 16:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-03  6:24 [PATCH] rtc/rtc-spear: free the config right after the rtc_device_unregister Devendra Naga
2012-06-20 13:32 ` devendra.aaru
     [not found] ` <e9129201-3636-49f6-9e97-156cb9823fd3@googlegroups.com>
2012-06-20 14:39   ` devendra.aaru
2012-06-20 14:44     ` viresh kumar
2012-06-20 16:49       ` devendra.aaru

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome