[lkml]   [2001]   [Oct]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: oops on 2.4.13-pre5 in prune_dcache

    On Tue, 30 Oct 2001, Alexander Viro wrote:
    > Frankly, it looks like adding magic to struct dentry and struct inode
    > might be a good idea. Both icache and dcache lists tend to be long,
    > so any memory corruption is very likely to show up in the code that
    > walks them.

    I don't like magic numbers. They showed that somebody corrupted something,
    but little else. There's nothing sane you can do except warn about magic
    mismatch (and ignore it or exit early), and quite frankly, an oops dump
    tends to be as useful as the warning.

    We used to have magic numbers for tty's and some other things, and they
    never helped anybody.

    Now, doing _poisoning_ etc of dynamical memory allocation, _that_ is a
    magic number use I heartily agree with (if your oops dump has pointers
    that look like the poison pattern, that's a useful piece of information)

    If you only want to use magic numbers for memory sanity testing, you're
    better off doing things like poisoning, and checking that the poison
    pattern is there when you re-allocate etc.


    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

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