28 Oct, 2010

9 commits

  • Add __rcu annotations to :
    (struct ip_tunnel)->prl
    (struct ip_tunnel_prl_entry)->next
    (struct xfrm_tunnel)->next
    struct xfrm_tunnel *tunnel4_handlers
    struct xfrm_tunnel *tunnel64_handlers

    And use appropriate rcu primitives to reduce sparse warnings if
    CONFIG_SPARSE_RCU_POINTER=y

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • Add __rcu annotations to :
    struct net_protocol *inet_protos
    struct net_protocol *inet6_protos

    And use appropriate casts to reduce sparse warnings if
    CONFIG_SPARSE_RCU_POINTER=y

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • Add __rcu annotations to :
    (struct dst_entry)->rt_next
    (struct rt_hash_bucket)->chain

    And use appropriate rcu primitives to reduce sparse warnings if
    CONFIG_SPARSE_RCU_POINTER=y

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • Signed-off-by: Jitendra Kalsaria
    Signed-off-by: Ron Mercer
    Signed-off-by: David S. Miller

    Ron Mercer
     
  • When async mcc compls are rcvd on an i/f that is down (and so interrupts are disabled)
    they just lie unprocessed in the compl queue.The compl queue can eventually get filled
    up and cause the BE to lock up.The fix is to use be_worker to reap mcc compls when the
    i/f is down.be_worker is now launched in be_probe() and canceled in be_remove().

    Signed-off-by: Somnath Kotur
    Signed-off-by: David S. Miller

    Somnath Kotur
     
  • After running this bonding setup script
    modprobe bonding miimon=100 mode=0 max_bonds=1
    ifconfig bond0 10.1.1.1/16
    ifenslave bond0 eth1
    ifenslave bond0 eth3
    on s390 with qeth-driven slaves, modprobe -r fails with this message
    unregister_netdevice: waiting for bond0 to become free. Usage count = 1
    due to twice detection of duplicate address.
    Problem is caused by a missing decrease of ifp->refcnt in addrconf_dad_failure.
    An extra call of in6_ifa_put(ifp) solves it.
    Problem has been introduced with commit f2344a131bccdbfc5338e17fa71a807dee7944fa.

    Signed-off-by: Ursula Braun
    Cc: David S. Miller
    Cc: Herbert Xu
    Acked-by: Herbert Xu
    Signed-off-by: David S. Miller

    Ursula Braun
     
  • NETIF_F_HW_CSUM indicates the ability to update an TCP/IP-style 16-bit
    checksum with the checksum of an arbitrary part of the packet data,
    whereas the FCoE CRC is something entirely different.

    Signed-off-by: Ben Hutchings
    Cc: stable@kernel.org [2.6.32+]
    Signed-off-by: David S. Miller

    Ben Hutchings
     
  • dev_can_checksum() incorrectly returns true in these cases:

    1. The skb has both out-of-band and in-band VLAN tags and the device
    supports checksum offload for the encapsulated protocol but only with
    one layer of encapsulation.
    2. The skb has a VLAN tag and the device supports generic checksumming
    but not in conjunction with VLAN encapsulation.

    Rearrange the VLAN tag checks to avoid these.

    Signed-off-by: Ben Hutchings
    Signed-off-by: David S. Miller

    Ben Hutchings
     
  • …36-rc5 crash with gianfar ethernet at full line rate traffic)

    The rx_recycle queue is global per device but can be accesed by many
    napi handlers at the same time, so it needs full skb_queue primitives
    (with locking). Otherwise, various crashes caused by broken skbs are
    possible.

    This patch resolves, at least partly, bugzilla bug 19692. (Because of
    some doubts that there could be still something around which is hard
    to reproduce my proposal is to leave this bug opened for a month.)

    Fixes commit: 0fd56bb5be6455d0d42241e65aed057244665e5e ("gianfar: Add
    support for skb recycling")

    Reported-by: emin ak <eminak71@gmail.com>
    Tested-by: emin ak <eminak71@gmail.com>
    Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
    CC: Andy Fleming <afleming@freescale.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>

    Jarek Poplawski
     

27 Oct, 2010

11 commits


26 Oct, 2010

20 commits

  • Fix pch_can build when CONFIG_PCI is not enabled. It uses pci interfaces
    and data structures, so it should depend on PCI.

    drivers/net/can/pch_can.c:1044: error: implicit declaration of function 'pci_enable_msi'
    drivers/net/can/pch_can.c:1079: error: implicit declaration of function 'pci_disable_msi'

    Signed-off-by: Randy Dunlap
    Signed-off-by: David S. Miller

    Randy Dunlap
     
  • Add __rcu annotations to :
    (struct ip_ra_chain)->next
    struct ip_ra_chain *ip_ra_chain;

    And use appropriate rcu primitives.

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • Add __rcu annotation to :
    (struct sock)->sk_filter

    And use appropriate rcu primitives to reduce sparse warnings if
    CONFIG_SPARSE_RCU_POINTER=y

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • add __rcu annotation to (struct net)->gen, and use
    rcu_dereference_protected() in net_assign_generic()

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • Add __rcu annotations to :
    (struct netdev_rx_queue)->rps_map
    (struct netdev_rx_queue)->rps_flow_table
    struct rps_sock_flow_table *rps_sock_flow_table;

    And use appropriate rcu primitives.

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • One of the previous tproxy related patches split IPv6 defragmentation and
    connection tracking, but did not correctly add Kconfig stanzas to handle the
    new dependencies correctly. This patch fixes that by making the config options
    mirror the setup we have for IPv4: a distinct config option for defragmentation
    that is automatically selected by both connection tracking and
    xt_TPROXY/xt_socket.

    The patch also changes the #ifdefs enclosing IPv6 specific code in xt_socket
    and xt_TPROXY: we only compile these in case we have ip6tables support enabled.

    Signed-off-by: KOVACS Krisztian
    Signed-off-by: David S. Miller

    KOVACS Krisztian
     
  • (struct ip6_tnl)->next is rcu protected :
    (struct ip_tunnel)->next is rcu protected :
    (struct xfrm6_tunnel)->next is rcu protected :

    add __rcu annotation and proper rcu primitives.

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • (struct net_device)->garp_port is rcu protected :
    (struct garp_port)->applicants is rcu protected :

    add __rcu annotation and proper rcu primitives.

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • (struct net_device)->ip6_ptr is rcu protected :

    add __rcu annotation and proper rcu primitives.

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • (struct net_device)->vlgrp is rcu protected :

    add __rcu annotation and proper rcu primitives.

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • This driver tries to do up to half-second udelay()
    calls, which overflows on x86-64.

    Reported-by: Andi Kleen
    Signed-off-by: David S. Miller

    David S. Miller
     
  • Three is definitely too low, and we know from reports that GRE tunnels
    stacked as deeply as 37 levels cause stack overflows, so pick some
    reasonable value between those two.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • When searching for a free entry in either mlx4_register_vlan() or
    mlx4_register_mac(), and there is no free entry, the loop terminates without
    updating the local variable free thus causing out of array bounds access. Fix
    this by adding a proper check outside the loop.

    Signed-off-by: Eli Cohen
    Signed-off-by: David S. Miller

    Eli Cohen
     
  • On a busy network, the macb driver could get stuck in the interrupt
    handler, quickly triggering the watchdog, due to a confluence of
    factors:

    1. macb_poll re-enables interrupts unconditionally, even when it will
    be called again because it exhausted its rx budget

    2. macb_interrupt only disables interrupts after scheduling
    macb_poll, but scheduling fails when macb_poll is already scheduled
    because it didn't call napi_complete

    3. macb_interrupt loops until the interrupt status register is clear,
    which will never happen in this case if the driver doesn't disable
    the RX interrupt

    Since macb_interrupt runs in interrupt context, this effectively locks
    up the machine, triggering the hardware watchdog.

    This issue was readily reproducible on a flooded network with a
    modified 2.6.27.48 kernel. The same problem appears to still be in the
    2.6.36-rc8 driver code, so I am submitting this patch against that
    version. I have not tested this version of the patch except to make
    sure the kernel compiles.

    Signed-off-by: Joshua Hoke
    Signed-off-by: David S. Miller

    Joshua Hoke
     
  • We're setting skb->ip_summed to CHECKSUM_NONE for all non-TCP pkts, making the stack
    recompute checksum.This is a bug for UDP pkts for which cso must be used.

    Signed-off-by: Somnath Kotur
    Signed-off-by: David S. Miller

    Somnath Kotur
     
  • Calling netif_carrier_off before register_netdev was causing the network interface
    to miss a linkwatch pending event leading to an inconsistent state if the link
    is not up when interface is initialized.This is now invoked after register_netdev.

    Signed-off-by: Somnath Kotur
    Signed-off-by: David S. Miller

    Somnath Kotur
     
  • Only negative return from bind_qsets() should be considered an error and
    propagated.
    It fixes an issue reported by IBM on P Series platform.

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

    Divy Le Ray
     
  • Timing issues in microcode for some devices can cause a compressed BA to
    be sent to the driver prior to returning any a-MPDU notification.
    Traces show RTS-CTS is exchanged and then the timer fires which causes an
    empty BA to be sent which acknowledges nothing. This results in a noisy
    printk. Only print the message if the bitmap is non-zero.

    Signed-off-by: Don Fry
    Signed-off-by: Wey-Yi Guy
    Signed-off-by: John W. Linville

    Don Fry
     
  • Since aggregation is usually triggered by tx completion, a hardware
    reset (because of beacon stuck, tx hang or baseband hang) can
    significantly delay the transmission of the next AMPDU (until the next
    tx completion event).
    Fix this by rescheduling aggregation after such a reset.

    Signed-off-by: Felix Fietkau
    Cc: stable@kernel.org
    Signed-off-by: John W. Linville

    Felix Fietkau
     
  • This patch fixes the following mishap:

    BUG: scheduling while atomic: wpa_supplicant/4164/0x00000002
    Modules linked in: carl9170 mac80211 [...]
    Pid: 4164, comm: wpa_supplicant Not tainted 2.6.36-wl+ #119
    Call Trace:
    [] ? schedule+0x349/0x4c0
    [] ? schedule_timeout+0x106/0x1e0
    [] ? process_timeout+0x0/0x10
    [] ? wait_for_common+0x9d/0x140
    [] ? default_wake_function+0x0/0x10
    [] ? carl9170_exec_cmd+0xf0/0x250 [carl9170]
    [] ? carl9170_set_mac_reg+0x5e/0x70 [carl9170]
    [] ? carl9170_op_add_interface+0x176/0x310 [carl9170]
    [...]

    rcu_read_unlock() call was erroneously placed after the
    sync. function carl9170_mod_virtual_mac.

    Signed-off-by: Christian Lamparter
    Signed-off-by: John W. Linville

    Christian Lamparter