All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Frank Mehnert <Frank.Mehnert@Sun.COM>,
	linux-kernel@vger.kernel.org,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Nick Piggin <npiggin@suse.de>
Subject: Re: [PATCH] x86: add might_sleep() to do_page_fault()
Date: Thu, 29 Jan 2009 15:59:21 +0100	[thread overview]
Message-ID: <20090129145921.GC6512@elte.hu> (raw)
In-Reply-To: <1233241003.4495.97.camel@laptop>


* Peter Zijlstra <peterz@infradead.org> wrote:

> VirtualBox calls do_page_fault() from an atomic context but runs into a
> might_sleep() way pas this point, cure that.
> 
> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
> ---
>  arch/x86/mm/fault.c |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
> index 67e4df5..bb7f946 100644
> --- a/arch/x86/mm/fault.c
> +++ b/arch/x86/mm/fault.c
> @@ -908,6 +908,11 @@ void __kprobes do_page_fault(struct pt_regs *regs, unsigned long error_code)
>  		}
>  		down_read(&mm->mmap_sem);
>  	}
> +	/*
> +	 * The above down_read_trylock() might have succeeded in which case
> +	 * we'll have missed the might_sleep() from down_read().
> +	 */
> +	might_sleep();

should go into the 'else' branch i guess? In the down_read() case we 
already had the check.

	Ingo

  reply	other threads:[~2009-01-29 15:00 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-29  8:05 PFs on pages pinned with get_user_pages() Frank Mehnert
2009-01-29 12:28 ` Peter Zijlstra
2009-01-29 13:08   ` Frank Mehnert
2009-01-29 13:43     ` Peter Zijlstra
2009-01-29 14:02       ` Frank Mehnert
2009-01-29 14:20         ` Peter Zijlstra
2009-01-29 14:41           ` Frank Mehnert
2009-01-29 14:52             ` Peter Zijlstra
2009-01-29 16:03               ` Frank Mehnert
2009-01-29 16:11                 ` Peter Zijlstra
2009-01-30 10:34                   ` Frank Mehnert
2009-01-30 10:45                     ` Peter Zijlstra
2009-01-29 14:56             ` [PATCH] x86: add might_sleep() to do_page_fault() Peter Zijlstra
2009-01-29 14:59               ` Ingo Molnar [this message]
2009-01-29 15:02                 ` [PATCH v2] " Peter Zijlstra
2009-01-29 15:03                   ` Ingo Molnar

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=20090129145921.GC6512@elte.hu \
    --to=mingo@elte.hu \
    --cc=Frank.Mehnert@Sun.COM \
    --cc=linux-kernel@vger.kernel.org \
    --cc=npiggin@suse.de \
    --cc=peterz@infradead.org \
    --cc=torvalds@linux-foundation.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.