01 Jun, 2011

3 commits

  • If the peer restart the asoc, we should not only fail any unsent/unacked
    data, but also stop the T3-rtx, SACK, T4-rto timers, and teardown ASCONF
    queues.

    Signed-off-by: Wei Yongjun
    Signed-off-by: David S. Miller

    Wei Yongjun
     
  • This patch fixes a driver crash during packet reception due to not enough
    bytes allocated in the skb. Since the loop reads out 4 bytes at a time, we
    need to allow for up to 3 bytes of slack space.

    Signed-off-by: Dennis Aberilla
    Signed-off-by: David S. Miller

    Dennis Aberilla
     
  • The current code takes an unaligned pointer and does htonl() on it to
    make it big-endian, then does a memcpy(). The problem is that the
    compiler decides that since the pointer is to a __be32, it is legal
    to optimize the copy into a processor word store. However, on an
    architecture that does not handled unaligned writes in kernel space,
    this produces an unaligned exception fault.

    The solution is to track the pointer as a "char *" (which removes a bunch
    of unpleasant casts in any case), and then just use put_unaligned_be32()
    to write the value to memory.

    Signed-off-by: Chris Metcalf
    Signed-off-by: David S. Miller

    Chris Metcalf
     

28 May, 2011

12 commits


27 May, 2011

20 commits

  • When ip_vs was adapted to netns the ftp application was not adapted
    in a correct way.
    However this is a fix to avoid kernel errors. In the long term another solution
    might be chosen. I.e the ports that the ftp appl, uses should be per netns.

    Signed-off-by: Hans Schillstrom
    Acked-by: Julian Anastasov
    Signed-off-by: Pablo Neira Ayuso

    Hans Schillstrom
     
  • Stop tx queues before updating rate control to ensure
    proper rate selection. Otherwise packets can be transmitted
    in 40 Mhz whereas hw is configured in HT20.

    Signed-off-by: Rajkumar Manoharan
    Signed-off-by: John W. Linville

    Rajkumar Manoharan
     
  • Whenever there is a channel width change from 40 Mhz to 20 Mhz,
    the hardware is reconfigured to ht20. Meantime before doing
    the rate control updation, the packets are being transmitted are
    selected rate with IEEE80211_TX_RC_40_MHZ_WIDTH.

    While transmitting ht40 rate packets in ht20 mode is causing
    baseband panic with AR9003 based chips.

    ==== BB update: BB status=0x02001109 ====
    ath: ** BB state: wd=1 det=1 rdar=0 rOFDM=1 rCCK=1 tOFDM=0 tCCK=0 agc=2
    src=0 **
    ath: ** BB WD cntl: cntl1=0xffff0085 cntl2=0x00000004 **
    ath: ** BB mode: BB_gen_controls=0x000033c0 **
    ath: ** BB busy times: rx_clear=99%, rx_frame=0%, tx_frame=0% **
    ath: ==== BB update: done ====

    Cc: stable@kernel.org
    Signed-off-by: Rajkumar Manoharan
    Signed-off-by: John W. Linville

    Rajkumar Manoharan
     
  • While receiving unsupported rate frame rx state machine
    gets into a state 0xb and if phy_restart happens in that
    state, BB would go hang. If RXSM is in 0xb state after
    first bb panic, ensure to disable the phy_restart.

    Signed-off-by: Rajkumar Manoharan
    Signed-off-by: John W. Linville

    Rajkumar Manoharan
     
  • Resetting hardware helps to recover from baseband
    hang/panic for AR9003 based chips.

    Cc: stable@kernel.org
    Signed-off-by: Rajkumar Manoharan
    Signed-off-by: John W. Linville

    Rajkumar Manoharan
     
  • Reported-by: Larry Finger
    Signed-off-by: Rafał Miłecki
    Signed-off-by: John W. Linville

    Rafał Miłecki
     
  • Although a previous fix handles the kernel panics that result from
    failure to allocate a new RX buffer, memory fragmentation can be
    reduced if the amsdu_8k capability is disabled as new buffers need only
    be of O(0), not O(2).

    Signed-off-by: Larry Finger
    Signed-off-by: John W. Linville

    Larry Finger
     
  • To handle amsdu_8k capability, the PCI routine of this driver must
    allocate receive buffers of order 2. Under heavy load, this causes
    fragmentation of memory. The present code releases the current buffer
    before checking to see if a new one is availble. Recovery from
    allocation failures is not possible, which results in kernel panics.

    The fix is to reorder the code to check that a new buffer can be
    allocated before the old one is released. If not possible, the
    received frame is dropped and the old one is reused. Without this
    change, it is impossible to transfer a 2 GB file without a kernel panic.

    Signed-off-by: Larry Finger
    Cc: Stable [2.6.{37,38,39}]
    Signed-off-by: John W. Linville

    Larry Finger
     
  • In both trigger_scan and sched_scan operations, we were checking for
    the SSID length before assigning the value correctly. Since the
    memory was just kzalloc'ed, the check was always failing and SSID with
    over 32 characters were allowed to go through.

    This was causing a buffer overflow when copying the actual SSID to the
    proper place.

    This bug has been there since 2.6.29-rc4.

    Cc: stable@kernel.org
    Signed-off-by: Luciano Coelho
    Signed-off-by: John W. Linville

    Luciano Coelho
     
  • While decoding received event packet from firmware, 4 bytes
    of interface header are already removed unconditionally.
    So for handling event only 4 more bytes needs to be pulled.
    This is achieved by changing event header length to 4.

    Almost all the events, except BA stream related and AMSDU
    aggregation control events, do not have the payload in their
    event skb. Such events handling depends only on the event ID.
    This event ID is the first four bytes of the event skb, which
    is copied to a separate variable before pulling the skb header.
    Hence event handling worked only for those events that didn't
    have payload in event skb.

    This patch fixes the broken event path of the events with
    payload in their event skb without harming existing working
    event path for the events without payload.

    Signed-off-by: Yogesh Ashok Powar
    Signed-off-by: Kiran Divekar
    Signed-off-by: Bing Zhao
    Signed-off-by: John W. Linville

    Yogesh Ashok Powar
     
  • As reported by Ingo Molnar, we still have configuration combinations
    where use of the WARN_RATELIMIT interfaces break the build because
    dependencies don't get met.

    Instead of going down the long road of trying to make it so that
    ratelimit.h can get included by kernel.h or asm-generic/bug.h,
    just move the interface into ratelimit.h and make users have
    to include that.

    Reported-by: Ingo Molnar
    Signed-off-by: David S. Miller
    Acked-by: Randy Dunlap

    David S. Miller
     
  • Weiping Pan noticed that the module option description for
    xmit_hash_policy was incorrect and was nice enough to post a patch to
    fix it. The text was correct, but created a line over 80 characters and
    I would rather not add those. I realized I could take a few minutes and
    clean up all the descriptions and things would look much better. This
    is the result.

    Based on patch from Weiping Pan .

    Signed-off-by: Andy Gospodarek
    CC: Weiping Pan
    Reviewed-by: Weiping Pan
    Signed-off-by: David S. Miller

    Andy Gospodarek
     
  • The below patch removes vlan_buggyright and vlan_copyright from vlan_proto_init,
    so that it prints out just the fullname of vlan and the version number.

    before:

    [ 30.438203] 802.1Q VLAN Support v1.8 Ben Greear
    [ 30.441542] All bugs added by David S. Miller

    after:

    [ 31.513910] 802.1Q VLAN Support v1.8

    Signed-off-by: Justin P. Mattock
    CC: Joe Perches
    CC: David S. Miller
    CC: Ben Greear
    Signed-off-by: David S. Miller

    Justin Mattock
     
  • Use platform device rather than net device in dev_err calls before net
    device has been registered to avoid messages such as

    (null): DaVinci EMAC: Failed to get EMAC clock

    Also replace remaining printks in probe with dev_{err,warn}.

    Signed-off-by: Johan Hovold
    Signed-off-by: David S. Miller

    Johan Hovold
     
  • As these pointers have been printed without using %p they were missed in the
    big network kptr_restrict conversion patch %p -> %pK from Dan Rosenberg.

    Signed-off-by: Oliver Hartkopp
    Signed-off-by: David S. Miller

    Oliver Hartkopp
     
  • Current code squashes flags to bool - this makes set_flags fail whenever
    some ETH_FLAG_* equivalent features are set. Fix this.

    Signed-off-by: Michał Mirosław
    Signed-off-by: David S. Miller

    Michał Mirosław
     
  • Kill set but not used 'entry_offset'.

    Add a default case to the switch statement so the compiler
    can see that we always initialize off and size_kern before
    using them.

    Signed-off-by: David S. Miller
    Signed-off-by: Pablo Neira Ayuso

    David Miller
     
  • ip_set_flush returned -EPROTO instead of -IPSET_ERR_PROTOCOL, fixed

    Signed-off-by: Jozsef Kadlecsik
    Signed-off-by: Pablo Neira Ayuso

    Jozsef Kadlecsik
     
  • Variable 'ret' is set in type_pf_tdel() but not used, remove.

    Signed-off-by: Jozsef Kadlecsik
    Signed-off-by: Pablo Neira Ayuso

    Jozsef Kadlecsik
     
  • Signed-off-by: Jozsef Kadlecsik
    Signed-off-by: Pablo Neira Ayuso

    Jozsef Kadlecsik
     

26 May, 2011

5 commits

  • Improves the documentation about how IGMP resend parameter
    works, fix two missing checks and coding style issues.

    Signed-off-by: Flavio Leitner
    Acked-by: Rick Jones
    Signed-off-by: David S. Miller

    Flavio Leitner
     
  • This soft lockup was recently reported:

    [root@dell-per715-01 ~]# echo +bond5 > /sys/class/net/bonding_masters
    [root@dell-per715-01 ~]# echo +eth1 > /sys/class/net/bond5/bonding/slaves
    bonding: bond5: doing slave updates when interface is down.
    bonding bond5: master_dev is not up in bond_enslave
    [root@dell-per715-01 ~]# echo -eth1 > /sys/class/net/bond5/bonding/slaves
    bonding: bond5: doing slave updates when interface is down.

    BUG: soft lockup - CPU#12 stuck for 60s! [bash:6444]
    CPU 12:
    Modules linked in: bonding autofs4 hidp rfcomm l2cap bluetooth lockd sunrpc
    be2d
    Pid: 6444, comm: bash Not tainted 2.6.18-262.el5 #1
    RIP: 0010:[] []
    .text.lock.spinlock+0x26/00
    RSP: 0018:ffff810113167da8 EFLAGS: 00000286
    RAX: ffff810113167fd8 RBX: ffff810123a47800 RCX: 0000000000ff1025
    RDX: 0000000000000000 RSI: ffff810123a47800 RDI: ffff81021b57f6f8
    RBP: ffff81021b57f500 R08: 0000000000000000 R09: 000000000000000c
    R10: 00000000ffffffff R11: ffff81011d41c000 R12: ffff81021b57f000
    R13: 0000000000000000 R14: 0000000000000282 R15: 0000000000000282
    FS: 00002b3b41ef3f50(0000) GS:ffff810123b27940(0000) knlGS:0000000000000000
    CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
    CR2: 00002b3b456dd000 CR3: 000000031fc60000 CR4: 00000000000006e0

    Call Trace:
    [] _spin_lock_bh+0x9/0x14
    [] :bonding:tlb_clear_slave+0x22/0xa1
    [] :bonding:bond_alb_deinit_slave+0xba/0xf0
    [] :bonding:bond_release+0x1b4/0x450
    [] __down_write_nested+0x12/0x92
    [] :bonding:bonding_store_slaves+0x25c/0x2f7
    [] sysfs_write_file+0xb9/0xe8
    [] vfs_write+0xce/0x174
    [] sys_write+0x45/0x6e
    [] tracesys+0xd5/0xe0

    It occurs because we are able to change the slave configuarion of a bond while
    the bond interface is down. The bonding driver initializes some data structures
    only after its ndo_open routine is called. Among them is the initalization of
    the alb tx and rx hash locks. So if we add or remove a slave without first
    opening the bond master device, we run the risk of trying to lock/unlock a
    spinlock that has garbage for data in it, which results in our above softlock.

    Note that sometimes this works, because in many cases an unlocked spinlock has
    the raw_lock parameter initialized to zero (meaning that the kzalloc of the
    net_device private data is equivalent to calling spin_lock_init), but thats not
    true in all cases, and we aren't guaranteed that condition, so we need to pass
    the relevant spinlocks through the spin_lock_init function.

    Fix it by moving the spin_lock_init calls for the tx and rx hashtable locks to
    the ndo_init path, so they are ready for use by the bond_store_slaves path.

    Change notes:
    v2) Based on conversation with Jay and Nicolas it seems that the ability to
    enslave devices while the bond master is down should be safe to do. As such
    this is an outlier bug, and so instead we'll just initalize the errant spinlocks
    in the init path rather than the open path, solving the problem. We'll also
    remove the warnings about the bond being down during enslave operations, since
    it should be safe

    v3) Fix spelling error

    Signed-off-by: Neil Horman
    Reported-by: jtluka@redhat.com
    CC: Jay Vosburgh
    CC: Andy Gospodarek
    CC: nicolas.2p.debian@gmail.com
    CC: "David S. Miller"
    Signed-off-by: Jay Vosburgh
    Signed-off-by: David S. Miller

    Neil Horman
     
  • Commit e67f88dd12f6 (dont hold rtnl mutex during netlink dump callbacks)
    missed fact that rtnl_fill_ifinfo() must be called with rtnl held.

    Because of possible deadlocks between two mutexes (cb_mutex and rtnl),
    its not easy to solve this problem, so revert this part of the patch.

    It also forgot one rcu_read_unlock() in FIB dump_rules()

    Add one ASSERT_RTNL() in rtnl_fill_ifinfo() to remind us the rule.

    Signed-off-by: Eric Dumazet
    CC: Patrick McHardy
    CC: Stephen Hemminger
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • This patch adds the PCI ID of Fujitsu 1000base-SX NIC to tg3 driver.
    Tested to detect the card, MAC and serdes, not tested with link at the
    moment since I have no fiber switch here. I did not add new constants to
    the pci_ids.h header file since these constants are used only here.

    Signed-off-by: Meelis Roos
    Signed-off-by: David S. Miller

    Meelis Roos
     
  • Signed-off-by: Dmitry Kravkov
    Signed-off-by: Eilon Greenstein
    Signed-off-by: David S. Miller

    Dmitry Kravkov