From: Michael Ellerman <patch-notifications@ellerman.id.au>
To: Anshuman Khandual <khandual@linux.vnet.ibm.com>,
linuxppc-dev@lists.ozlabs.org
Subject: Re: [V2] powerpc/fscr: Enable interrupts earlier before calling get_user()
Date: Thu, 12 Apr 2018 00:49:28 +1000 (AEST) [thread overview]
Message-ID: <40Ln4T02ZMz9s3B@ozlabs.org> (raw)
In-Reply-To: <20180329062337.29437-1-khandual@linux.vnet.ibm.com>
On Thu, 2018-03-29 at 06:23:37 UTC, Anshuman Khandual wrote:
> The function get_user() can sleep while trying to fetch instruction
> from user address space and causes the following warning from the
> scheduler.
>
> BUG: sleeping function called from invalid context
>
> Though interrupts get enabled back but it happens bit later after
> get_user() is called. This change moves enabling these interrupts
> earlier covering the function get_user(). While at this, lets check
> for kernel mode and crash as this interrupt should not have been
> triggered from the kernel context.
>
> Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com>
Applied to powerpc fixes, thanks.
https://git.kernel.org/powerpc/c/709b973c844c0b4d115ac3a227a2e5
cheers
prev parent reply other threads:[~2018-04-11 14:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-29 6:23 [PATCH V2] powerpc/fscr: Enable interrupts earlier before calling get_user() Anshuman Khandual
2018-04-11 14:49 ` Michael Ellerman [this message]
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=40Ln4T02ZMz9s3B@ozlabs.org \
--to=patch-notifications@ellerman.id.au \
--cc=khandual@linux.vnet.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.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 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).