public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Suparna Bhattacharya <suparna@in.ibm.com>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Andy Pfiffer <andyp@osdl.org>,
	linux-kernel@vger.kernel.org, lkcd-devel@lists.sourceforge.net,
	fastboot@osdl.org
Subject: Re: [Fastboot] Re: Kexec on 2.5.59 problems ?
Date: Tue, 11 Feb 2003 12:51:44 +0530	[thread overview]
Message-ID: <20030211125144.A2355@in.ibm.com> (raw)
In-Reply-To: <m13cmwyppx.fsf@frodo.biederman.org>; from ebiederm@xmission.com on Mon, Feb 10, 2003 at 11:07:06AM -0700

[-- Attachment #1: Type: text/plain, Size: 1270 bytes --]

On Mon, Feb 10, 2003 at 11:07:06AM -0700, Eric W. Biederman wrote:
> Andy Pfiffer <andyp@osdl.org> writes:
> 
> > On Mon, 2003-02-10 at 03:14, Suparna Bhattacharya wrote:
> > > Surprisingly though, when I tried just a simple 
> > > kexec -e today (having loaded the kernel earlier on), 
> > > I ran into the following Oops, consistently:
> > > 
> > > I'm using kexec-tools-1.8, and this has worked for me
> > > earlier. The test system is a 4way SMP machine.
> > > 
> > > Has anyone seen this as well ?  (I'd already issued init 1 
> > > and unmounted filesystems by this point)
> 
> Hmm.  Would love to know which cpu this is on...
> 
> I think the primary candidate if this only occurs in smp is
> the switch_mm.  It may be that modifying the init_mm is not safe,
> or it gets zapped somewhere else.
> 

The following patch from Anton Blanchard's WIP kexec tree 
for ppc64 seems to fix this for me. It just does a use_mm() 
(routine from fs/aio.c) instead of switch_mm(). 

Andy could you try this out and see if it helps  ?

The other change in Anton's tree that we should probably
include uses a separate kexec_mm rather than init_mm
for the mapping. 

Regards
Suparna

-- 
Suparna Bhattacharya (suparna@in.ibm.com)
Linux Technology Center
IBM Software Labs, India


[-- Attachment #2: kexec-usemm.patch --]
[-- Type: text/plain, Size: 828 bytes --]

diff -u -X ../dontdiff linux-2.5.59/fs/aio.c linux-2.5.59-kexecdump/fs/aio.c
--- linux-2.5.59/fs/aio.c	Fri Jan 17 07:52:06 2003
+++ linux-2.5.59-kexecdump/fs/aio.c	Tue Feb 11 09:14:25 2003
@@ -539,7 +539,7 @@
 	return ioctx;
 }
 
-static void use_mm(struct mm_struct *mm)
+void use_mm(struct mm_struct *mm)
 {
 	struct mm_struct *active_mm = current->active_mm;
 	atomic_inc(&mm->mm_count);
--- linux-2.5.59/arch/i386/kernel/machine_kexec.c	Thu Feb  6 16:31:14 2003
+++ linux-2.5.59-kexecdump/arch/i386/kernel/machine_kexec.c	Tue Feb 11 09:14:05 2003
@@ -80,7 +80,8 @@
 	relocate_new_kernel_t rnk;
 
 	/* switch to an mm where the reboot_code_buffer is identity mapped */
-	switch_mm(current->active_mm, &init_mm, current, smp_processor_id());
+	extern void use_mm(struct mm_struct *mm);
+	use_mm(&init_mm);
 
 	stop_apics();
 

  reply	other threads:[~2003-02-11  7:06 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <3E448745.9040707@mvista.com>
     [not found] ` <m1isvuzjj2.fsf@frodo.biederman.org>
2003-02-08 20:18   ` Kexec, DMA, and SMP Corey Minyard
2003-02-09 18:39     ` Eric W. Biederman
2003-02-10 11:14       ` Kexec on 2.5.59 problems ? Suparna Bhattacharya
2003-02-10 17:09         ` [Fastboot] " Andy Pfiffer
2003-02-10 18:07           ` Eric W. Biederman
2003-02-11  7:21             ` Suparna Bhattacharya [this message]
2003-02-11 17:04               ` Andy Pfiffer
2003-02-11 23:46                 ` Andy Pfiffer
2003-02-12  4:29                   ` Eric W. Biederman
2003-02-12 22:31                     ` Andy Pfiffer
2003-02-13  9:50                       ` Suparna Bhattacharya
2003-02-13 15:10                         ` Eric W. Biederman
2003-02-18 10:59                           ` Suparna Bhattacharya
2003-02-18 15:06                             ` Eric W. Biederman
2003-02-10 12:12       ` Kexec, DMA, and SMP Suparna Bhattacharya
2003-02-10 13:56         ` Corey Minyard
2003-02-10 15:07           ` Suparna Bhattacharya
2003-02-10 15:22             ` Corey Minyard
2003-02-10 17:56         ` Eric W. Biederman
2003-02-11  1:35           ` Kenneth Sumrall
2003-02-11  5:08             ` Eric W. Biederman
2003-02-11 17:09               ` Stephen Hemminger
2003-02-11 12:55           ` Suparna Bhattacharya
2003-02-11 13:40             ` Suparna Bhattacharya
2003-02-11 14:06               ` Corey Minyard
2003-02-11 14:40                 ` Suparna Bhattacharya
2003-02-11 15:20                   ` Corey Minyard
2003-02-12  4:28                     ` Eric W. Biederman
2003-02-12 14:17                       ` Corey Minyard
2003-02-12 14:51                         ` Eric W. Biederman
2003-02-12 16:06                           ` Corey Minyard
2003-02-13 11:13                             ` Suparna Bhattacharya
2003-02-14  3:13                             ` Werner Almesberger
2003-02-14 14:20                               ` Corey Minyard
2003-02-14 18:10                                 ` Werner Almesberger
2003-02-14 18:23                                   ` Corey Minyard
2003-02-14 19:26                                     ` Zwane Mwaikambo
2003-02-14 19:44                                       ` Werner Almesberger
2003-02-14 20:00                                         ` Corey Minyard
2003-02-15  6:03                                           ` Eric W. Biederman
2003-02-16 16:22                                             ` Corey Minyard
2003-02-16 21:48                                               ` Eric W. Biederman
2003-02-17  4:26                                                 ` Corey Minyard
2003-02-17  7:18                                                   ` Eric W. Biederman
2003-02-17 17:32                                                     ` Corey Minyard
2003-02-12  4:47                     ` Suparna Bhattacharya

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=20030211125144.A2355@in.ibm.com \
    --to=suparna@in.ibm.com \
    --cc=andyp@osdl.org \
    --cc=ebiederm@xmission.com \
    --cc=fastboot@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkcd-devel@lists.sourceforge.net \
    /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