aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Neuling <mikey@neuling.org>2006-03-14 01:11:51 -0500
committerPaul Mackerras <paulus@samba.org>2006-03-16 00:55:03 -0500
commit0e8ed479125a6d246e17cfe6c24e140bfeb01972 (patch)
treecf5ef655ed77c8f7c797e3aab696dbe2e90aedfb
parentc6cb3b5f368bae67c0b258cfebc0b9dbd8e1d929 (diff)
[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>
-rw-r--r--arch/powerpc/kernel/rtas-rtc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/rtas-rtc.c b/arch/powerpc/kernel/rtas-rtc.c
index 635d3b9a881..34d073fb609 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)
52 error = rtas_call(rtas_token("get-time-of-day"), 0, 8, ret); 52 error = rtas_call(rtas_token("get-time-of-day"), 0, 8, ret);
53 if (error == RTAS_CLOCK_BUSY || rtas_is_extended_busy(error)) { 53 if (error == RTAS_CLOCK_BUSY || rtas_is_extended_busy(error)) {
54 if (in_interrupt() && printk_ratelimit()) { 54 if (in_interrupt() && printk_ratelimit()) {
55 memset(&rtc_tm, 0, sizeof(struct rtc_time)); 55 memset(rtc_tm, 0, sizeof(struct rtc_time));
56 printk(KERN_WARNING "error: reading clock" 56 printk(KERN_WARNING "error: reading clock"
57 " would delay interrupt\n"); 57 " would delay interrupt\n");
58 return; /* delay not allowed */ 58 return; /* delay not allowed */