9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: jmk@plan9.bell-labs.com
To: 9fans@cse.psu.edu
Subject: Re: [9fans] page fault with lock held
Date: Tue, 12 Apr 2005 13:28:26 -0400	[thread overview]
Message-ID: <b0d473d59e11b59bb5c6771f7678ad35@plan9.bell-labs.com> (raw)
In-Reply-To: <Pine.LNX.4.60.0504121201250.9022@athena>

no, you should not be holding a spinlock when trying that.
why is your driver trying to copy directly to user space,
isn't it a subdevice of devsd? (i'm not saying that's the way
to do it, just curious).

On Tue Apr 12 13:20:53 EDT 2005, sah@softcardsystems.com wrote:
> Hello 9fans,
> 
> I'm testing my AoE driver and have hit something curious.
> 
> On devaoe.c read, after getting the sectors from the
> remote disk and when trying to copy the data to the
> user process using memmove, I get a write page fault.
> At the time, I happen to be holding a spinlock over
> the device structure, which causes both
> port/fault.c:/^fault/ and port/fault.c/^seg/ (via qlock)
> to squawk at me about up->nlocks.ref > 0.
> 
> The user address in question is 7fffaedc.  Firstly, does
> this address seem appropriate and secondly, is dropping
> the spinlock during the memmove appropriate?
> 
> All signs point to yes, but I'd like some reassurance.
> 
> Cheers,
> 
> Sam


  reply	other threads:[~2005-04-12 17:28 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-12 17:13 Sam
2005-04-12 17:28 ` jmk [this message]
2005-04-12 17:31   ` Russ Cox
2005-04-12 17:37     ` Brantley Coile
     [not found]     ` <154c5e08c9c69f0f288db9ae8050a015@coraid.com>
2005-04-12 17:47       ` Russ Cox
2005-04-12 17:48   ` Charles Forsyth
2005-04-12 18:23   ` Sam
2005-04-12 20:33     ` geoff
2005-04-12 20:41       ` Dan Cross
2005-04-12 20:58         ` Russ Cox
2005-04-13 13:13           ` Dan Cross
2005-04-13 13:20             ` Brantley Coile
2005-04-13 18:48               ` Tim Newsham
2005-04-13 21:09                 ` Dan Cross
2005-04-12 22:07       ` Christopher Nielsen
2005-04-12 22:57         ` Brantley Coile
2005-04-13  7:46           ` Charles Forsyth

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=b0d473d59e11b59bb5c6771f7678ad35@plan9.bell-labs.com \
    --to=jmk@plan9.bell-labs.com \
    --cc=9fans@cse.psu.edu \
    /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).