LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Sebastian Andrzej Siewior <linuxppc-dev@ml.breakpoint.cc>
To: Kumar Gala <galak@kernel.crashing.org>
Cc: linuxppc-dev@ozlabs.org, linux-kernel@vger.kernel.org
Subject: "booke: Fix problem with _tlbil_va being interrupted" causes BUG()
Date: Wed, 17 Dec 2008 22:34:48 +0100	[thread overview]
Message-ID: <20081217213448.GA27343@Chamillionaire.breakpoint.cc> (raw)

I just pulled from Linus and the Kernel I booted gave me this:
| Freeing unused kernel memory: 152k init
| BUG: sleeping function called from invalid context at /home/bigeasy/git/linux-2.6-powerpc/fs/exec.c:417
| in_atomic(): 0, irqs_disabled(): 1, pid: 1, name: swapper
| Call Trace:
| [ef831dd0] [c0007764] show_stack+0x48/0x154 (unreliable)
| [ef831e00] [c002b4d0] __might_sleep+0x118/0x11c
| [ef831e10] [c009bcfc] copy_strings+0x70/0x324
| [ef831e70] [c009bfd0] copy_strings_kernel+0x20/0x38
| [ef831e90] [c009d3b8] do_execve+0x15c/0x1ec
| [ef831ec0] [c00084ac] sys_execve+0x58/0x84
| [ef831ee0] [c000f0e8] ret_from_syscall+0x0/0x3c
| [ef831fa0] [c0001d68] init_post+0x54/0x174
| [ef831fc0] [c038a1c0] kernel_init+0xdc/0x104
| [ef831ff0] [c000ee68] kernel_thread+0x4c/0x68
| ------------[ cut here ]------------

It looks like userspace starts here. A bisect leads to

|commit e5e774d8833de1a0037be2384efccadf16935675
|Author: Kumar Gala <galak@kernel.crashing.org>
|Date:   Sat Dec 13 17:01:37 2008 -0600
|
|    powerpc/fsl-booke: Fix problem with _tlbil_va being interrupted
|    
|    An example calling sequence which we did see:
|    
|    copy_user_highpage -> kmap_atomic -> flush_tlb_page -> _tlbil_va
|    
|    We got interrupted after setting up the MAS registers before the
|    tlbwe and the interrupt handler that caused the interrupt also did
|    a kmap_atomic (ide code) and thus on returning from the interrupt
|    the MAS registers no longer contained the proper values.
|    
|    Since we dont save/restore MAS registers for normal interrupts we
|    need to disable interrupts in _tlbil_va to ensure atomicity.
|    
|    Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
|
|:040000 040000 1f298a8930bd2704f4481307f3d22589943bb5c0 7e3847dab748c332c8533111de32d23731ec778b M      arch

as the guilty commit.
This box has highmem.

Sebastian

             reply	other threads:[~2008-12-17 21:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-17 21:34 Sebastian Andrzej Siewior [this message]
2008-12-17 21:41 ` "booke: Fix problem with _tlbil_va being interrupted" causes BUG() Kumar Gala
2008-12-17 21:54   ` Sebastian Andrzej Siewior

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=20081217213448.GA27343@Chamillionaire.breakpoint.cc \
    --to=linuxppc-dev@ml.breakpoint.cc \
    --cc=galak@kernel.crashing.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@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