xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Nyashka Surovski <nyashka.surovski@gmail.com>
To: xen-devel@lists.xen.org
Subject: xc_map_foreign_bulk() memory leak in ARM version?
Date: Thu, 16 May 2013 19:36:01 +0400	[thread overview]
Message-ID: <CAOM=f9_3VKKri9=vdC52hdOvqnX5jCyW5Swx4bKE=gCSfpgtcw@mail.gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 859 bytes --]

Hi Xen folks!

I've faced with one strange thing in ARM version of Xen: when I use
xc_map_foreign_bulk() to map some memory from domU to dom0, after unmap()
for previous returned address - memory is not freed at all.

Let's look at call stack:

xc_map_foreign() ->
  linux_privcmd_map_foreign_bulk() ->
    {
    addr = mmap(fd);
    ioctl(fd, IOCTL_PRIVCMD_MMAPBATCH_V2 );
    }  ->
      alloc_empty_pages() ->
        alloc_xenballoned_pages();

So, I think that unmap(addr) must call free_xenballoned_pages(), but this
doesn't happen. =(
Let me note, that mmap() knows about privcmd_close() function, and it is
the place where free_xenballoned_pages() is called, So we have that unmap()
doesn't call privcmd_close() at all. It's something strange for me.

Can somebody show me the place of my misunderstanding, or is it a real bug?

Best regards,
Nyashka

[-- Attachment #1.2: Type: text/html, Size: 1073 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

             reply	other threads:[~2013-05-16 15:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-16 15:36 Nyashka Surovski [this message]
2013-05-17 10:14 ` xc_map_foreign_bulk() memory leak in ARM version? Ian Campbell
2013-05-17 19:13   ` Mukesh Rathor
2013-05-20  7:55     ` Nyashka Surovski
2013-05-20  9:19       ` Ian Campbell
2013-05-20 19:39       ` Konrad Rzeszutek Wilk

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='CAOM=f9_3VKKri9=vdC52hdOvqnX5jCyW5Swx4bKE=gCSfpgtcw@mail.gmail.com' \
    --to=nyashka.surovski@gmail.com \
    --cc=xen-devel@lists.xen.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;
as well as URLs for NNTP newsgroup(s).