lkml.org 
[lkml]   [2001]   [Feb]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: 2.4.2-pre3 compile error in 6pack.c
    David Weinehall wrote:
    >
    > On Sun, Feb 11, 2001 at 02:59:13PM -0500, Jeff Garzik wrote:
    > > Alan Cox wrote:
    > > >
    > > > > 2.4.2-pre3 doesn't compile with 6pack as a module; I had to disable it;
    > > > > now it compiles (and so far, works fine).
    > > >
    > > > It has a slight dependancy on -ac right now.
    > > >
    > > > KMALLOC_MAXSIZE is the alloc size limit - 131072. It checks this as kmalloc
    > > > now panics if called with an oversize request
    > >
    > > Would it be costly/reasonable to have kmalloc -not- panic if given a
    > > too-large size? Principle of Least Surprises says it should return NULL
    > > at the very least.
    >
    > It's on purpose; to find the erroneous drivers.

    Oh good grief. You will never find all such drivers. Dynamic memory
    allocation is by its definition dynamic. Alloc size is often selected
    at runtime based on a variety of factors.

    printk a message and fail the call. Don't panic.

    We have a system in place to notify calls when kmalloc fails -- return
    value. Use that, it's what its there for...

    Jeff


    --
    Jeff Garzik | "You see, in this world there's two kinds of
    Building 1024 | people, my friend: Those with loaded guns
    MandrakeSoft | and those who dig. You dig." --Blondie
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 13:17    [W:0.020 / U:4.240 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site