Skip to content

Commit

Permalink
[PATCH] powerpc: RTC memory corruption
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Michael Neuling authored and Paul Mackerras committed Mar 16, 2006
1 parent c6cb3b5 commit 0e8ed47
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/powerpc/kernel/rtas-rtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 0e8ed47

Please sign in to comment.