From: Dan Carpenter <error27@gmail.com>
To: balajirrao@openmoko.org
Cc: rtc-linux@googlegroups.com, linux-kernel@vger.kernel.org
Subject: [patch] rtc: use after free in pcf50633_rtc_probe()
Date: Wed, 18 Nov 2009 10:30:14 +0200 (SAST) [thread overview]
Message-ID: <alpine.DEB.2.00.0911161312140.12810@bicker> (raw)
"rtc" is freed and then dereferenced on the next line. This patch fixes
that.
This is a resend. I have been offline for the last few months so I may
have missed a reply or something. Not sure what the status was.
regards,
dan carpenter
Signed-off-by: Dan Carpenter <error27@gmail.com>
--- orig/drivers/rtc/rtc-pcf50633.c 2009-07-17 16:21:52.000000000 +0300
+++ new/drivers/rtc/rtc-pcf50633.c 2009-07-17 16:22:56.000000000 +0300
@@ -291,8 +291,9 @@
&pcf50633_rtc_ops, THIS_MODULE);
if (IS_ERR(rtc->rtc_dev)) {
+ int ret = PTR_ERR(rtc->rtc_dev);
kfree(rtc);
- return PTR_ERR(rtc->rtc_dev);
+ return ret;
}
pcf50633_register_irq(rtc->pcf, PCF50633_IRQ_ALARM,
next reply other threads:[~2009-11-18 8:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-18 8:30 Dan Carpenter [this message]
2009-11-18 10:06 ` [rtc-linux] " Alessandro Zummo
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=alpine.DEB.2.00.0911161312140.12810@bicker \
--to=error27@gmail.com \
--cc=balajirrao@openmoko.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rtc-linux@googlegroups.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 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®