All of lore.kernel.org
 help / color / mirror / Atom feed
From: Keir Fraser <keir.fraser@eu.citrix.com>
To: Dan Magenheimer <dan.magenheimer@oracle.com>,
	"Xen-Devel (E-mail)" <xen-devel@lists.xensource.com>
Subject: Re: crash in page_list_* macro
Date: Thu, 12 Feb 2009 08:38:35 +0000	[thread overview]
Message-ID: <C5B9908B.1A1A%keir.fraser@eu.citrix.com> (raw)
In-Reply-To: <ff2b2203-e524-4ab0-b171-33d125dd95e8@default>

On 12/02/2009 03:42, "Dan Magenheimer" <dan.magenheimer@oracle.com> wrote:

> Is the memory where the list header is stored overloaded and
> sometimes overwritten for other purposes?  Note all pages
> on my page_list have been gotten via pi=alloc_domheap_pages(0,0,0).
> Next I use va=page_to_virt(pi), use the page for awhile,
> use pi=virt_to_page(va) and put it on the page_list, then
> later when I page_list_remove_head(my_page_list), the
> list pointers are apparently corrupt.

So long as you allocate anonymous domheap memory, or xenheap memory, the
page_list fields should belong to you. The list structure is pretty simple
and I can't see anything wrong with the macros. An empty list is noted by
NULL head/tail pointers, otherwise point at head/tail pages within which
next/prev pointers are 32-bit MFNs. The head and tail pages do not point at
the page_list_head but instead contain ~0 sentinel next/prev link values.

 -- Keir

  reply	other threads:[~2009-02-12  8:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-12  3:42 crash in page_list_* macro Dan Magenheimer
2009-02-12  8:38 ` Keir Fraser [this message]
2009-02-12  9:11 ` Jan Beulich
2009-02-13  0:12   ` Dan Magenheimer

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=C5B9908B.1A1A%keir.fraser@eu.citrix.com \
    --to=keir.fraser@eu.citrix.com \
    --cc=dan.magenheimer@oracle.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.