From: Alexander Nyberg <alexn@dsv.su.se>
To: joern@wh.fh-wedel.de
Cc: linux-mtd@lists.infradead.org
Subject: [PATCH] Use after free in mtd/phram.c: unregister_devices()
Date: Wed, 23 Feb 2005 09:43:25 +0100 [thread overview]
Message-ID: <1109148205.2249.3.camel@boxen> (raw)
Use after free, found by the Coverity tool
Signed-off-by: Alexander Nyberg <alexn@dsv.su.se>
===== drivers/mtd/devices/phram.c 1.6 vs edited =====
--- 1.6/drivers/mtd/devices/phram.c 2005-01-05 19:08:36 +01:00
+++ edited/drivers/mtd/devices/phram.c 2005-02-23 09:29:59 +01:00
@@ -107,9 +107,9 @@ static int phram_write(struct mtd_info *
static void unregister_devices(void)
{
- struct phram_mtd_list *this;
+ struct phram_mtd_list *this, *safe;
- list_for_each_entry(this, &phram_list, list) {
+ list_for_each_entry_safe(this, safe, &phram_list, list) {
del_mtd_device(&this->mtd);
iounmap(this->mtd.priv);
kfree(this);
next reply other threads:[~2005-02-23 8:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-23 8:43 Alexander Nyberg [this message]
2005-02-23 13:05 ` [PATCH] Use after free in mtd/phram.c: unregister_devices() Jörn Engel
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=1109148205.2249.3.camel@boxen \
--to=alexn@dsv.su.se \
--cc=joern@wh.fh-wedel.de \
--cc=linux-mtd@lists.infradead.org \
/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