All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Helgaas <bjorn.helgaas@hp.com>
To: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
Cc: trini@mvista.com, linux-kernel@vger.kernel.org
Subject: [PATCH] Fix 2.4 EFI RTC oops
Date: Wed, 17 Dec 2003 15:02:37 -0700	[thread overview]
Message-ID: <200312171502.37511.bjorn.helgaas@hp.com> (raw)

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;


                 reply	other threads:[~2003-12-17 22:02 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200312171502.37511.bjorn.helgaas@hp.com \
    --to=bjorn.helgaas@hp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo.tosatti@cyclades.com \
    --cc=trini@mvista.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.