lkml.org 
[lkml]   [2009]   [Mar]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [PATCH] module: fix refptr allocation and release order
    Date
    On Tuesday 17 March 2009 13:54:36 Eric Dumazet wrote:
    > Rusty Russell a écrit :
    > > From: Masami Hiramatsu <mhiramat@redhat.com>
    > >
    > > Impact: fix ref-after-free crash on failed module load
    > >
    > > Fix refptr bug: Change refptr allocation and release order not to access a module
    > > data structure pointed by 'mod' after freeing mod->module_core.
    > > This bug will cause kernel panic(e.g. failed to find undefined symbols).
    > >
    > > This bug was reported on systemtap bugzilla.
    > > http://sources.redhat.com/bugzilla/show_bug.cgi?id=9927
    > >
    > > Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
    > > Cc: Eric Dumazet <dada1@cosmosbay.com>
    > > Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    >
    >
    > My original patch did not have this problem, because I used a local variable
    > to hold refptr.
    >
    > http://www.archivum.info/linux-kernel@vger.kernel.org/2008-05/msg07400.html
    >
    > A simpler patch could just use a local variable again, since we are very
    > late in rc phase ?

    Right, it was my mistake. But the extra #ifdef is still ugly: moving the code
    is a larger patch, but it's not complicated.

    Thanks,
    Rusty.
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2009-03-17 22:25    [W:0.026 / U:31.908 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site