22 Nov, 2011

1 commit

  • The "tmp" variable here is used to store the result of cpu_to_le16()
    so it should be an __le16 instead of an int. We want the high bits
    set and the current code works on little endian systems but not on
    big endian systems.

    Signed-off-by: Dan Carpenter
    Acked-by: Sjur Brændeland
    Signed-off-by: David S. Miller

    Dan Carpenter
     

01 Nov, 2011

2 commits


26 Oct, 2011

1 commit

  • The caif code will register its own pernet_operations, and then register
    a netdevice_notifier. Each time the netdevice_notifier is triggered,
    it'll do some stuff... including a lookup of its own pernet stuff with
    net_generic().

    If the net_generic() call ever returns NULL, the caif code will BUG().
    That doesn't seem *so* unreasonable, I suppose — it does seem like it
    should never happen.

    However, it *does* happen. When we clone a network namespace,
    setup_net() runs through all the pernet_operations one at a time. It
    gets to loopback before it gets to caif. And loopback_net_init()
    registers a netdevice... while caif hasn't been initialised. So the caif
    netdevice notifier triggers, and immediately goes BUG().

    We could imagine a complex and overengineered solution to this generic
    class of problems, but this patch takes the simple approach. It just
    makes caif_device_notify() *not* go looking for its pernet data
    structures if the device it's being notified about isn't a caif device
    in the first place.

    Cc: stable@kernel.org
    Signed-off-by: David Woodhouse
    Acked-by: Sjur Brændeland
    Signed-off-by: David S. Miller

    David Woodhouse
     

04 Oct, 2011

1 commit

  • The allocation of "phyinfo" wasn't checked, and also the allocation
    wasn't freed on error paths. Sjur Brændeland pointed out as well
    that "phy_driver" should be freed on the error path too.

    Signed-off-by: Dan Carpenter
    Acked-by: Sjur Brændeland
    Signed-off-by: David S. Miller

    Dan Carpenter
     

22 Sep, 2011

1 commit

  • Conflicts:
    MAINTAINERS
    drivers/net/Kconfig
    drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
    drivers/net/ethernet/broadcom/tg3.c
    drivers/net/wireless/iwlwifi/iwl-pci.c
    drivers/net/wireless/iwlwifi/iwl-trans-tx-pcie.c
    drivers/net/wireless/rt2x00/rt2800usb.c
    drivers/net/wireless/wl12xx/main.c

    David S. Miller
     

17 Sep, 2011

1 commit

  • Commit bd30ce4bc0b7 (caif: Use RCU instead of spin-lock in caif_dev.c)
    added a potential NULL dereference in case alloc_percpu() fails.

    caif_device_alloc() can also use GFP_KERNEL instead of GFP_ATOMIC.

    Signed-off-by: Eric Dumazet
    CC: Sjur Brændeland
    Acked-by: Sjur Brændeland
    Signed-off-by: David S. Miller

    Eric Dumazet
     

29 Aug, 2011

1 commit

  • Remove per site OOM messages because they duplicate
    the generic mm subsystem OOM message.

    Use kzalloc instead of kmalloc/memset
    when next to the OOM message removals.

    Reduces object size (allyesconfig ~2%)

    $ size -t drivers/net/caif/built-in.o.old net/caif/built-in.o.old
    text data bss dec hex filename
    32297 700 8224 41221 a105 drivers/net/caif/built-in.o.old
    72159 1317 20552 94028 16f4c net/caif/built-in.o.old
    104456 2017 28776 135249 21051 (TOTALS)
    $ size -t drivers/net/caif/built-in.o.new net/caif/built-in.o.new
    text data bss dec hex filename
    31975 700 8184 40859 9f9b drivers/net/caif/built-in.o.new
    70748 1317 20152 92217 16839 net/caif/built-in.o.new
    102723 2017 28336 133076 207d4 (TOTALS)

    Signed-off-by: Joe Perches
    Signed-off-by: David S. Miller

    Joe Perches
     

02 Aug, 2011

1 commit

  • When assigning a NULL value to an RCU protected pointer, no barrier
    is needed. The rcu_assign_pointer, used to handle that but will soon
    change to not handle the special case.

    Convert all rcu_assign_pointer of NULL value.

    //smpl
    @@ expression P; @@

    - rcu_assign_pointer(P, NULL)
    + RCU_INIT_POINTER(P, NULL)

    //

    Signed-off-by: Stephen Hemminger
    Acked-by: Paul E. McKenney
    Signed-off-by: David S. Miller

    Stephen Hemminger
     

22 Jun, 2011

1 commit

  • It was suggested by "make versioncheck" that the follwing includes of
    linux/version.h are redundant:

    /home/jj/src/linux-2.6/net/caif/caif_dev.c: 14 linux/version.h not needed.
    /home/jj/src/linux-2.6/net/caif/chnl_net.c: 10 linux/version.h not needed.
    /home/jj/src/linux-2.6/net/ipv4/gre.c: 19 linux/version.h not needed.
    /home/jj/src/linux-2.6/net/netfilter/ipset/ip_set_core.c: 20 linux/version.h not needed.
    /home/jj/src/linux-2.6/net/netfilter/xt_set.c: 16 linux/version.h not needed.

    and it seems that it is right.

    Beyond manually inspecting the source files I also did a few build
    tests with various configs to confirm that including the header in
    those files is indeed not needed.

    Here's a patch to remove the pointless includes.

    Signed-off-by: Jesper Juhl
    Acked-by: Jozsef Kadlecsik
    Signed-off-by: David S. Miller

    Jesper Juhl
     

21 Jun, 2011

1 commit


17 Jun, 2011

1 commit


07 Jun, 2011

1 commit


02 Jun, 2011

1 commit


23 May, 2011

4 commits


16 May, 2011

10 commits


18 Apr, 2011

1 commit


12 Apr, 2011

5 commits


31 Mar, 2011

1 commit


09 Feb, 2011

2 commits


20 Jan, 2011

1 commit

  • Clean up some unused macros in net/*.
    1. be left for code change. e.g. PGV_FROM_VMALLOC, PGV_FROM_VMALLOC, KMEM_SAFETYZONE.
    2. never be used since introduced to kernel.
    e.g. P9_RDMA_MAX_SGE, UTIL_CTRL_PKT_SIZE.

    Signed-off-by: Shan Wei
    Acked-by: Sjur Braendeland
    Signed-off-by: David S. Miller

    Shan Wei
     

16 Jan, 2011

1 commit

  • In the original code we check if (servl == NULL) twice. The first time
    should print the message that cfmuxl_remove_uplayer() failed and set
    "ret" correctly, but instead it just returns success. The second check
    should be checking the value of "ret" instead of "servl".

    Signed-off-by: Dan Carpenter
    Acked-by: Sjur Braendeland
    Signed-off-by: David S. Miller

    Dan Carpenter
     

11 Jan, 2011

1 commit