From: Dan Carpenter <dan.carpenter@oracle.com>
To: Ian Campbell <ian.campbell@citrix.com>
Cc: xen-devel@lists.xensource.com, netdev@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: [patch] xen-netback: double free on unload
Date: Fri, 21 Jun 2013 09:20:08 +0300 [thread overview]
Message-ID: <20130621062008.GA10873@elgon.mountain> (raw)
There is a typo here, "i" vs "j", so we would crash on module_exit().
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/net/xen-netback/netback.c b/drivers/net/xen-netback/netback.c
index a0b50ad..130bcb2 100644
--- a/drivers/net/xen-netback/netback.c
+++ b/drivers/net/xen-netback/netback.c
@@ -1968,8 +1968,8 @@ static void __exit netback_fini(void)
del_timer_sync(&netbk->net_timer);
kthread_stop(netbk->task);
for (j = 0; j < MAX_PENDING_REQS; j++) {
- if (netbk->mmap_pages[i])
- __free_page(netbk->mmap_pages[i]);
+ if (netbk->mmap_pages[j])
+ __free_page(netbk->mmap_pages[j]);
}
}
next reply other threads:[~2013-06-21 6:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-21 6:20 Dan Carpenter [this message]
2013-06-21 9:51 ` [patch] xen-netback: double free on unload Wei Liu
2013-06-24 7:26 ` David Miller
2013-06-24 7:31 ` Julia Lawall
2013-06-24 8:44 ` David Miller
2013-06-24 8:57 ` Dan Carpenter
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=20130621062008.GA10873@elgon.mountain \
--to=dan.carpenter@oracle.com \
--cc=ian.campbell@citrix.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=xen-devel@lists.xensource.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;
as well as URLs for NNTP newsgroup(s).