All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nick Piggin <nickpiggin@yahoo.com.au>
To: Sam Abu-Nassar <djanssen1@hotmail.com>
Cc: linux-kernel@vger.kernel.org, karl.kiniger@med.ge.com
Subject: Re: Using remap_pfn_range causes system hang on app close in 2.6.15 & up
Date: Thu, 27 Apr 2006 13:36:20 +1000	[thread overview]
Message-ID: <44503C34.3070901@yahoo.com.au> (raw)
In-Reply-To: <BAY101-F13D9FEC07E274B8565DD3BF4BC0@phx.gbl>

Sam Abu-Nassar wrote:

>>
>> Nick Piggin wrote:
>> Well, I think I said it shouldn't oops like this... I don't think it
>> is particularly robust WRT error cases or concurrent page faults
>> (between mmap and ioctl).
>>
>> As we established earlier with a debug patch, the reason for the oops
>> is that VM_PFNMAP has been cleared from your vma->vm_flags for some
>> reason. This is causing the unmap code to mistakenly try to remove
>> reverse maps and refcounts from the struct pages.
>>
>> I don't know why VM_PFNMAP should be getting cleared. But if it
>> remains set then the oops should go away.
>
>
>
> As one of my tests, I manually added the VM_PFNMAP flag before calling 
> remap_pfn_range().  This did not resolve the issue.  Also, I checked 
> the kernel source (vanilla Fedora Core 5) and VM_PFNMAP is always 
> added inside remap_pfn_range() anyway, along with VM_IO & VM_RESERVED.


Yes, VM_PFNMAP is being removed after the remap_pfn_range.

> Note that the kernel oops I posted only happened rarely.  Most of the 
> time, the system completely froze immediately when the file descriptor 
> was closed and I didn't get any oops message.


Quite likely to do all sorts of weird stuff because it will attempt to free
these pages to the page allocator which may get allocated for kernel 
internal
use for example.

--

Send instant messages to your online friends http://au.messenger.yahoo.com 

  reply	other threads:[~2006-04-27  3:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <5.1.0.14.2.20060425130439.00bc0008@exchange.plxtech.com>
2006-04-25 20:30 ` Using remap_pfn_range causes system hang on app close in 2.6.15 & up Sam Abu-Nassar
2006-04-26 10:27   ` Nick Piggin
2006-04-26 18:47     ` Sam Abu-Nassar
2006-04-27  3:36       ` Nick Piggin [this message]
2006-04-11 23:39 Sam Abu-Nassar

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=44503C34.3070901@yahoo.com.au \
    --to=nickpiggin@yahoo.com.au \
    --cc=djanssen1@hotmail.com \
    --cc=karl.kiniger@med.ge.com \
    --cc=linux-kernel@vger.kernel.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 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.