The patch titled
     Subject: drivers/rtc/rtc-spear.c: fix use-after-free in spear_rtc_remove()
has been added to the -mm tree.  Its filename is
     drivers-rtc-rtc-spearc-fix-use-after-free-in-spear_rtc_remove.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Devendra Naga <[email protected]>
Subject: drivers/rtc/rtc-spear.c: fix use-after-free in spear_rtc_remove()

`config' is freed and is then used in the rtc_device_unregister() call,
causing a kernel panic.

Signed-off-by: Devendra Naga <[email protected]>
Reviewed-by: Viresh Kumar <[email protected]>
Cc: Alessandro Zummo <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
---

 drivers/rtc/rtc-spear.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN 
drivers/rtc/rtc-spear.c~drivers-rtc-rtc-spearc-fix-use-after-free-in-spear_rtc_remove
 drivers/rtc/rtc-spear.c
--- 
a/drivers/rtc/rtc-spear.c~drivers-rtc-rtc-spearc-fix-use-after-free-in-spear_rtc_remove
+++ a/drivers/rtc/rtc-spear.c
@@ -458,12 +458,12 @@ static int __devexit spear_rtc_remove(st
        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;
 }
_
Subject: Subject: drivers/rtc/rtc-spear.c: fix use-after-free in 
spear_rtc_remove()

Patches currently in -mm which might be from [email protected] are

origin.patch
linux-next.patch
drivers-rtc-rtc-spearc-fix-use-after-free-in-spear_rtc_remove.patch

--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to