mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Fix 2.4 EFI RTC oops
@ 2003-12-17 22:02 Bjorn Helgaas
  0 siblings, 0 replies; only message in thread
From: Bjorn Helgaas @ 2003-12-17 22:02 UTC (permalink / raw)
  To: Marcelo Tosatti; +Cc: trini, linux-kernel

This recent change to 2.4:

	ChangeSet@1.1069.155.3, 2003-12-10 18:30:50-02:00, trini@mvista.com
	  [PATCH] Fix rtc leak

	  ===== arch/cris/drivers/ds1302.c 1.6 vs edited =====

broke efirtc.c (it causes a null pointer dereference on ia64).
The fix is below.  Please apply.

Bjorn

P.S.  The changeset above doesn't appear to be in 2.6 yet.  If/when
you submit it for 2.6, you might consider using this style:

	memset(&wtime, 0, sizeof(wtime));
	memset(wtime, 0, sizeof(*wtime));

which is more obviously correct than:

	memset(&wtime, 0, sizeof(struct rtc_time));
	memset(wtime, 0, sizeof(struct rtc_time));


===== drivers/char/efirtc.c 1.6 vs edited =====
--- 1.6/drivers/char/efirtc.c	Fri Oct 24 04:35:10 2003
+++ edited/drivers/char/efirtc.c	Wed Dec 17 14:33:08 2003
@@ -118,7 +118,7 @@
 static void
 convert_from_efi_time(efi_time_t *eft, struct rtc_time *wtime)
 {
-	memset(&wtime, 0, sizeof(struct rtc_time));
+	memset(wtime, 0, sizeof(struct rtc_time));
 	wtime->tm_sec  = eft->second;
 	wtime->tm_min  = eft->minute;
 	wtime->tm_hour = eft->hour;


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-12-17 22:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-17 22:02 [PATCH] Fix 2.4 EFI RTC oops Bjorn Helgaas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®