diff options
author | Michael Neuling <mikey@neuling.org> | 2006-03-14 07:11:51 +0100 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-03-16 06:55:03 +0100 |
commit | 0e8ed479125a6d246e17cfe6c24e140bfeb01972 (patch) | |
tree | cf5ef655ed77c8f7c797e3aab696dbe2e90aedfb | |
parent | [PATCH] powerpc: enable NAP only on cpus who support it to avoid memory corru... (diff) | |
download | linux-0e8ed479125a6d246e17cfe6c24e140bfeb01972.tar.xz linux-0e8ed479125a6d246e17cfe6c24e140bfeb01972.zip |
[PATCH] powerpc: RTC memory corruption
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>
Diffstat (limited to '')
-rw-r--r-- | arch/powerpc/kernel/rtas-rtc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/rtas-rtc.c b/arch/powerpc/kernel/rtas-rtc.c index 635d3b9a8811..34d073fb6091 100644 --- a/arch/powerpc/kernel/rtas-rtc.c +++ b/arch/powerpc/kernel/rtas-rtc.c @@ -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 */ |