9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Sam <sah@softcardsystems.com>
To: 9fans@cse.psu.edu
Subject: [9fans] page fault with lock held
Date: Tue, 12 Apr 2005 12:13:00 -0500	[thread overview]
Message-ID: <Pine.LNX.4.60.0504121201250.9022@athena> (raw)

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:13 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-12 17:13 Sam [this message]
2005-04-12 17:28 ` jmk
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=Pine.LNX.4.60.0504121201250.9022@athena \
    --to=sah@softcardsystems.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).