11 Feb, 2010

3 commits


10 Feb, 2010

3 commits


09 Feb, 2010

11 commits

  • David S. Miller
     
  • Test the value that was just allocated rather than the previously tested one.

    A simplified version of the semantic match that finds this problem is as
    follows: (http://coccinelle.lip6.fr/)

    //
    @r@
    expression *x;
    expression e;
    identifier l;
    @@

    if (x == NULL || ...) {
    ... when forall
    return ...; }
    ... when != goto l;
    when != x = e
    when != &x
    *x == NULL
    //

    Signed-off-by: Julia Lawall
    Signed-off-by: David S. Miller

    Julia Lawall
     
  • During the rc period, patches that are not bugfixes
    should be done using the net-next tree.

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

    Joe Perches
     
  • The action modules have been prefixed with 'act_', but the Kconfig
    description was not changed.

    Signed-off-by: Jan Luebbe
    Acked-by: Jamal Hadi Salim
    Signed-off-by: David S. Miller

    Jan Luebbe
     
  • Verify the HW checksum state for frames handed to GRO processing.

    Signed-off-by: Divy Le Ray
    Signed-off-by: David S. Miller

    Divy Le Ray
     
  • Kernel bugzilla #15239

    On some workloads, it is quite possible to get a huge dst list to
    process in dst_gc_task(), and trigger soft lockup detection.

    Fix is to call cond_resched(), as we run in process context.

    Reported-by: Pawel Staszewski
    Tested-by: Pawel Staszewski
    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • As noticed by Jon Masters , the conntrack hash
    size is global and not per namespace, but modifiable at runtime through
    /sys/module/nf_conntrack/hashsize. Changing the hash size will only
    resize the hash in the current namespace however, so other namespaces
    will use an invalid hash size. This can cause crashes when enlarging
    the hashsize, or false negative lookups when shrinking it.

    Move the hash size into the per-namespace data and only use the global
    hash size to initialize the per-namespace value when instanciating a
    new namespace. Additionally restrict hash resizing to init_net for
    now as other namespaces are not handled currently.

    Cc: stable@kernel.org
    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Patrick McHardy
     
  • As per C99 6.2.4(2) when temporary table data goes out of scope,
    the behaviour is undefined:

    if (compat) {
    struct foo tmp;
    ...
    private = &tmp;
    }
    [dereference private]

    Signed-off-by: Alexey Dobriyan
    Cc: stable@kernel.org
    Signed-off-by: Patrick McHardy

    Alexey Dobriyan
     
  • Expectation hashtable size was simply glued to a variable with no code
    to rehash expectations, so it was a bug to allow writing to it.
    Make "expect_hashsize" readonly.

    Signed-off-by: Alexey Dobriyan
    Cc: stable@kernel.org
    Signed-off-by: Patrick McHardy

    Alexey Dobriyan
     
  • nf_conntrack_cachep is currently shared by all netns instances, but
    because of SLAB_DESTROY_BY_RCU special semantics, this is wrong.

    If we use a shared slab cache, one object can instantly flight between
    one hash table (netns ONE) to another one (netns TWO), and concurrent
    reader (doing a lookup in netns ONE, 'finding' an object of netns TWO)
    can be fooled without notice, because no RCU grace period has to be
    observed between object freeing and its reuse.

    We dont have this problem with UDP/TCP slab caches because TCP/UDP
    hashtables are global to the machine (and each object has a pointer to
    its netns).

    If we use per netns conntrack hash tables, we also *must* use per netns
    conntrack slab caches, to guarantee an object can not escape from one
    namespace to another one.

    Signed-off-by: Eric Dumazet
    [Patrick: added unique slab name allocation]
    Cc: stable@kernel.org
    Signed-off-by: Patrick McHardy

    Eric Dumazet
     
  • As discovered by Jon Masters , the "untracked"
    conntrack, which is located in the data section, might be accidentally
    freed when a new namespace is instantiated while the untracked conntrack
    is attached to a skb because the reference count it re-initialized.

    The best fix would be to use a seperate untracked conntrack per
    namespace since it includes a namespace pointer. Unfortunately this is
    not possible without larger changes since the namespace is not easily
    available everywhere we need it. For now move the untracked conntrack
    initialization to the init_net setup function to make sure the reference
    count is not re-initialized and handle cleanup in the init_net cleanup
    function to make sure namespaces can exit properly while the untracked
    conntrack is in use in other namespaces.

    Cc: stable@kernel.org
    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Patrick McHardy
     

08 Feb, 2010

1 commit


06 Feb, 2010

6 commits


05 Feb, 2010

15 commits

  • Reported by Stephen Rothwell.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • This patch removes the unused age_list member from the net_bridge
    structure.

    Signed-off-by: Herbert Xu
    Acked-by: Stephen Hemminger
    Signed-off-by: David S. Miller

    Herbert Xu
     
  • This patch adds GSO/checksum offload to af_packet sockets using
    virtio_net_hdr. Based on Rusty's patch to add this support to tun.
    It allows GSO/checksum offload to be enabled when using raw socket
    backend with virtio_net.
    Adds PACKET_VNET_HDR socket option to prepend virtio_net_hdr in the
    receive path and process/skip virtio_net_hdr in the send path. This
    option is only allowed with SOCK_RAW sockets attached to ethernet
    type devices.

    v2 updates
    ----------
    Michael's Comments
    - Perform length check in packet_snd() when GSO is off even when
    vnet_hdr is present.
    - Check for SKB_GSO_FCOE type and return -EINVAL
    - don't allow tx/rx ring when vnet_hdr is enabled.
    Herbert's Comments
    - Removed ethernet specific code.
    - protocol value is assumed to be passed in by the caller.

    Signed-off-by: Sridhar Samudrala
    Signed-off-by: David S. Miller

    Sridhar Samudrala
     
  • Just reordering this assignment that doesn't depend on any
    condition.

    Signed-off-by: Breno Leitao
    Signed-off-by: Ron Mercer
    Signed-off-by: David S. Miller

    Breno Leitao
     
  • Currently the qlge_change_mtu() is never called if the new_mtu is
    equal current MTU, due this condition on dev_set_mtu():

    if (new_mtu == dev->mtu)
    return 0;

    So, this block of code is never reached and is being removed.

    Signed-off-by: Breno Leitao
    Signed-off-by: Ron Mercer
    Signed-off-by: David S. Miller

    Breno Leitao
     
  • CONFIG_IP_ROUTE_PERVASIVE is missing a corresponding config
    IP_ROUTE_PERVASIVE somewhere in KConfig (and missing it for ages
    already) so it looks like some aging artefact no longer needed.

    Therefor this patch kills of the only remaining reference to that
    config Item removing the already unrechable code snipet.

    Signed-off-by: Christoph Egger
    Signed-off-by: David S. Miller

    Christoph Egger
     
  • Add missing try_to_freeze() to one of the pktgen_thread_worker() code
    paths so that it doesn't block suspend/hibernation.

    Fixes http://bugzilla.kernel.org/show_bug.cgi?id=15006

    Signed-off-by: Rafael J. Wysocki
    Reported-and-tested-by: Ciprian Dorin Craciun
    Signed-off-by: David S. Miller

    Rafael J. Wysocki
     
  • Update documentation to describe IPv6 parameters.
    Reported by .

    Signed-off-by: Brian Haley
    Signed-off-by: David S. Miller

    Brian Haley
     
  • Add periodic heartbeat register read to trigger the eeh
    recovery process.
    We see cases where an eeh error was injected and the slot was
    suspended. An asic access attempt is required to flush the recovery process,
    but without interrupts the process can stall.
    Adding this periodic register read causes the recovery process to begin.

    Signed-off-by: Ron Mercer
    Signed-off-by: David S. Miller

    Ron Mercer
     
  • Many drivers do this in them manually. Now they can use this function.

    Signed-off-by: Jiri Pirko
    Signed-off-by: David S. Miller

    Jiri Pirko
     
  • This patch introduces the similar helpers as those already done for uc list.
    However multicast lists are no list_head lists but "mademanually". The three
    macros added by this patch will make the transition of mc_list to list_head
    smooth in two steps:

    1) convert all drivers to use these macros (with the original iterator of type
    "struct dev_mc_list")
    2) once all drivers are converted, convert list type and iterators to "struct
    netdev_hw_addr" in one patch.

    >From now on, drivers can (and should) use "netdev_for_each_mc_addr" to iterate
    over the addresses with iterator of type "struct netdev_hw_addr". Also macros
    "netdev_mc_count" and "netdev_mc_empty" to read list's length. This is the state
    which should be reached in all drivers.

    Signed-off-by: Jiri Pirko
    Signed-off-by: David S. Miller

    Jiri Pirko
     
  • This change corrects an issue that will cause false hangs when using either
    82575 or 82580 in legacy interrupt mode. The issue is caused when there is
    a slow traffic flow and an "ethtool -r" is executed while using legacy or
    MSI interrupts. MSI-X is not affected by this issue due to the fact that
    we were already reconfiguring the vectors after reset.

    If possible it would be best to push this for net-2.6 since it is resolving
    a bug but if that is not possible then net-next-2.6 will be fine.

    Signed-off-by: Alexander Duyck
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Alexander Duyck
     
  • Signed-off-by: Giuseppe Cavallaro
    Signed-off-by: David S. Miller

    Giuseppe Cavallaro
     
  • Signed-off-by: Thadeu Lima de Souza Cascardo
    Signed-off-by: David S. Miller

    Thadeu Lima de Souza Cascardo
     
  • David S. Miller
     

04 Feb, 2010

1 commit