lkml.org 
[lkml]   [2005]   [Oct]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] release_resource() check for NULL resource
    On Sun, 2 Oct 2005 18:03:18 +0100 Ben Dooks wrote:

    > If release_resource() is passed a NULL resource
    > the kernel will OOPS.

    does this actually happen? you are fixing a real oops?
    if so, what driver caused it?

    btw, please use diff -p also (as in Documentation/SubmittingPatches)


    > Signed-off-by: Ben Dooks <ben-linux@fluff.org>
    >
    > diff -urN -X ../dontdiff linux-2.6.14-rc3/kernel/resource.c linux-2.6.14-rc3-bjd1/kernel/resource.c
    > --- linux-2.6.14-rc3/kernel/resource.c 2005-10-02 12:58:03.000000000 +0100
    > +++ linux-2.6.14-rc3-bjd1/kernel/resource.c 2005-10-02 17:58:09.000000000 +0100
    > @@ -181,6 +181,9 @@
    > {
    > struct resource *tmp, **p;
    >
    > + if (!old)
    > + return 0;
    > +
    > p = &old->parent->child;
    > for (;;) {
    > tmp = *p;
    >


    ---
    ~Randy

    -
    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: 2005-10-02 19:44    [W:3.493 / U:0.244 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site