From: Wei Liu <wei.liu2@citrix.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Ian Campbell <ian.campbell@citrix.com>,
xen-devel@lists.xensource.com, netdev@vger.kernel.org,
kernel-janitors@vger.kernel.org, wei.liu2@citrix.com
Subject: Re: [patch] xen-netback: double free on unload
Date: Fri, 21 Jun 2013 09:51:01 +0000 [thread overview]
Message-ID: <20130621095101.GA14648@zion.uk.xensource.com> (raw)
In-Reply-To: <20130621062008.GA10873@elgon.mountain>
On Fri, Jun 21, 2013 at 09:20:08AM +0300, Dan Carpenter wrote:
> 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]);
Nice catch, thanks.
Wei.
next prev parent reply other threads:[~2013-06-21 9:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-21 6:20 [patch] xen-netback: double free on unload Dan Carpenter
2013-06-21 9:51 ` Wei Liu [this message]
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=20130621095101.GA14648@zion.uk.xensource.com \
--to=wei.liu2@citrix.com \
--cc=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