lkml.org 
[lkml]   [2009]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    SubjectRe: BUG: using rootfstype=ext4 causes oops
    Date
    On Thursday 16 April 2009 19:05:56 Andrew Price wrote:
    > On Thu, Apr 16, 2009 at 06:02:21PM +0200, Bartlomiej Zolnierkiewicz wrote:
    > > Freeing non-slab objects is bad.
    > >
    > > Andrew, does this patch help?
    >
    > Yes, that seems to fix it. I tested it with gfs2 and ext4 the usual way
    > and I couldn't reproduce the panic.
    >
    > Thanks Bartlomiej.

    Great, I'll queue the following patch for the next round of IDE fixes.

    From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
    Subject: [PATCH] ide: fix barriers support

    Freeing non-slab objects is bad and results in an oops. Fix it.

    Reported-and-tested-by: Andrew Price <andy@andrewprice.me.uk>
    Cc: Theodore Tso <tytso@mit.edu>
    Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
    Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
    ---
    drivers/ide/ide-io.c | 11 +++++++----
    1 file changed, 7 insertions(+), 4 deletions(-)

    Index: b/drivers/ide/ide-io.c
    ===================================================================
    --- a/drivers/ide/ide-io.c
    +++ b/drivers/ide/ide-io.c
    @@ -102,11 +102,14 @@ void ide_complete_cmd(ide_drive_t *drive
    drive->dev_flags |= IDE_DFLAG_PARKED;
    }

    - if (rq && rq->cmd_type == REQ_TYPE_ATA_TASKFILE)
    - memcpy(rq->special, cmd, sizeof(*cmd));
    + if (rq && rq->cmd_type == REQ_TYPE_ATA_TASKFILE) {
    + struct ide_cmd *orig_cmd = rq->special;

    - if (cmd->tf_flags & IDE_TFLAG_DYN)
    - kfree(cmd);
    + if (cmd->tf_flags & IDE_TFLAG_DYN)
    + kfree(orig_cmd);
    + else
    + memcpy(orig_cmd, cmd, sizeof(*cmd));
    + }
    }

    /* obsolete, blk_rq_bytes() should be used instead */

    \
     
     \ /
      Last update: 2009-04-16 21:43    [W:0.031 / U:30.912 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site