]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] powerpc: RTC memory corruption
authorMichael Neuling <mikey@neuling.org>
Tue, 14 Mar 2006 06:11:51 +0000 (17:11 +1100)
committerPaul Mackerras <paulus@samba.org>
Thu, 16 Mar 2006 05:55:03 +0000 (16:55 +1100)
We should be memset'ing the data we are pointing to, not the pointer
itself.  This is in an error path so we probably don't hit it much.

Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/kernel/rtas-rtc.c

index 635d3b9a88115ce78a1de332a7270a6d9cf799bc..34d073fb60911aff9f672971275bbe8c44e09386 100644 (file)
@@ -52,7 +52,7 @@ void rtas_get_rtc_time(struct rtc_time *rtc_tm)
                error = rtas_call(rtas_token("get-time-of-day"), 0, 8, ret);
                if (error == RTAS_CLOCK_BUSY || rtas_is_extended_busy(error)) {
                        if (in_interrupt() && printk_ratelimit()) {
-                               memset(&rtc_tm, 0, sizeof(struct rtc_time));
+                               memset(rtc_tm, 0, sizeof(struct rtc_time));
                                printk(KERN_WARNING "error: reading clock"
                                       " would delay interrupt\n");
                                return; /* delay not allowed */