lkml.org 
[lkml]   [2003]   [Feb]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    SubjectRe: [Fastboot] Re: Kexec on 2.5.59 problems ?
    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

    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();
    \
     
     \ /
      Last update: 2005-03-22 13:33    [W:0.032 / U:95.016 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site