12 Feb, 2007

1 commit

  • A variety of (mostly) innocuous fixes to the embedded kernel-doc content in
    source files, including:

    * make multi-line initial descriptions single line
    * denote some function names, constants and structs as such
    * change erroneous opening '/*' to '/**' in a few places
    * reword some text for clarity

    Signed-off-by: Robert P. J. Day
    Cc: "Randy.Dunlap"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Robert P. J. Day
     

08 Dec, 2006

1 commit

  • Replace all uses of kmem_cache_t with struct kmem_cache.

    The patch was generated using the following script:

    #!/bin/sh
    #
    # Replace one string by another in all the kernel sources.
    #

    set -e

    for file in `find * -name "*.c" -o -name "*.h"|xargs grep -l $1`; do
    quilt add $file
    sed -e "1,\$s/$1/$2/g" $file >/tmp/$$
    mv /tmp/$$ $file
    quilt refresh
    done

    The script was run like this

    sh replace kmem_cache_t "struct kmem_cache"

    Signed-off-by: Christoph Lameter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     

15 Jul, 2006

1 commit

  • Currently, the code in lib/idr.c uses a bare spin_lock(&idp->lock) to do
    internal locking. This is a nasty trap for code that might call idr
    functions from different contexts; for example, it seems perfectly
    reasonable to call idr_get_new() from process context and idr_remove() from
    interrupt context -- but with the current locking this would lead to a
    potential deadlock.

    The simplest fix for this is to just convert the idr locking to use
    spin_lock_irqsave().

    In particular, this fixes a very complicated locking issue detected by
    lockdep, involving the ib_ipoib driver's priv->lock and dev->_xmit_lock,
    which get involved with the ib_sa module's query_idr.lock.

    Cc: Arjan van de Ven
    Cc: Ingo Molnar
    Cc: Zach Brown ,
    Signed-off-by: Roland Dreier
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roland Dreier
     

27 Jun, 2006

1 commit

  • This patch adds idr_replace() to replace an existing pointer in a single
    operation.

    Device-mapper will use this to update the pointer it stored against a given
    id.

    Signed-off-by: Jeff Mahoney
    Signed-off-by: Alasdair G Kergon
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Mahoney
     

26 Jun, 2006

1 commit

  • I ran into a bug where the kernel died in the idr code:

    cpu 0x1d: Vector: 300 (Data Access) at [c000000b7096f710]
    pc: c0000000001f8984: .idr_get_new_above_int+0x140/0x330
    lr: c0000000001f89b4: .idr_get_new_above_int+0x170/0x330
    sp: c000000b7096f990
    msr: 800000000000b032
    dar: 0
    dsisr: 40010000
    current = 0xc000000b70d43830
    paca = 0xc000000000556900
    pid = 2022, comm = hwup
    1d:mon> t
    [c000000b7096f990] c0000000000d2ad8 .expand_files+0x2e8/0x364 (unreliable)
    [c000000b7096faa0] c0000000001f8bf8 .idr_get_new_above+0x18/0x68
    [c000000b7096fb20] c00000000002a054 .init_new_context+0x5c/0xf0
    [c000000b7096fbc0] c000000000049dc8 .copy_process+0x91c/0x1404
    [c000000b7096fcd0] c00000000004a988 .do_fork+0xd8/0x224
    [c000000b7096fdc0] c00000000000ebdc .sys_clone+0x5c/0x74
    [c000000b7096fe30] c000000000008950 .ppc_clone+0x8/0xc

    Sonny Rao
     

31 Oct, 2005

1 commit


28 Oct, 2005

1 commit


24 Oct, 2005

1 commit

  • Fix a bug which was reported and diagnosed by
    Stefan Jones

    IDR trees include a cache of idr_layer objects. There's no way to destroy
    this cache, so when we discard an overall idr tree we end up leaking some
    memory.

    Add and use idr_destroy() for this. v9fs and infiniband also need to use
    idr_destroy() to avoid leaks.

    Or, we make the cache global, like radix_tree_preload(). Which is probably
    better. Later.

    Cc: Eric Van Hensbergen
    Cc: Roland Dreier
    Cc: Robert Love
    Cc: John McCutchan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     

27 Aug, 2005

1 commit

  • There is an off by one problem with idr_get_new_above.

    The comment and function name suggest that it will return an id >
    starting_id, but it actually returned an id >= starting_id, and kernel
    callers other than inotify treated it as such.

    The patch below fixes the comment, and fixes inotifys usage. The
    function name still doesn't match the behaviour, but it never did.

    Signed-off-by: John McCutchan
    Signed-off-by: Linus Torvalds

    John McCutchan
     

22 Jun, 2005

1 commit

  • This patch fixes overrun of array pa:
    92 struct idr_layer *pa[MAX_LEVEL];

    in

    98 l = idp->layers;
    99 pa[l--] = NULL;

    by passing idp->layers, set in
    202 idp->layers = layers;
    to function sub_alloc in
    203 v = sub_alloc(idp, ptr, &id);

    Signed-off-by: Zaur Kambarov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Zaur Kambarov
     

17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds