1. 07 Mar, 2010 6 commits
  2. 05 Mar, 2010 14 commits
  3. 04 Mar, 2010 13 commits
    • Jiri Pirko's avatar
      rndis_wlan: correct multicast_list handling V3 · 12c3400a
      Jiri Pirko authored
      My previous patch (655ffee2) added locking in
      a bad way. Because rndis_set_oid can sleep, there is need to prepare multicast
      addresses into local buffer under netif_addr_lock first, then call
      rndis_set_oid outside. This caused reorganizing of the whole function.
      Signed-off-by: default avatarJiri Pirko <jpirko@redhat.com>
      Reported-by: default avatarJussi Kivilinna <jussi.kivilinna@mbnet.fi>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      12c3400a
    • David S. Miller's avatar
      MAINTAINERS: Add netdev to bridge entry. · 4c325313
      David S. Miller authored
      Noticed by Ingo Molnar.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4c325313
    • Divy Le Ray's avatar
      cxgb3: fix hot plug removal crash · a6f018e3
      Divy Le Ray authored
      queue restart tasklets need to be stopped after napi handlers are stopped
      since the latter can restart them.  So stop them after stopping napi.
      Signed-off-by: default avatarDivy Le Ray <divy@chelsio.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a6f018e3
    • Anton Vorontsov's avatar
      gianfar: Fix TX ring processing on SMP machines · 0eddba52
      Anton Vorontsov authored
      Starting with commit a3bc1f11 ("gianfar: Revive SKB
      recycling") gianfar driver sooner or later stops transmitting any
      packets on SMP machines.
      
      start_xmit() prepares new skb for transmitting, generally it does
      three things:
      
      1. sets up all BDs (marks them ready to send), except the first one.
      2. stores skb into tx_queue->tx_skbuff so that clean_tx_ring()
         would cleanup it later.
      3. sets up the first BD, i.e. marks it ready.
      
      Here is what clean_tx_ring() does:
      
      1. reads skbs from tx_queue->tx_skbuff
      2. checks if the *last* BD is ready. If it's still ready [to send]
         then it it isn't transmitted, so clean_tx_ring() returns.
         Otherwise it actually cleanups BDs. All is OK.
      
      Now, if there is just one BD, code flow:
      
      - start_xmit(): stores skb into tx_skbuff. Note that the first BD
        (which is also the last one) isn't marked as ready, yet.
      - clean_tx_ring(): sees that skb is not null, *and* its lstatus
        says that it is NOT ready (like if BD was sent), so it cleans
        it up (bad!)
      - start_xmit(): marks BD as ready [to send], but it's too late.
      
      We can fix this simply by reordering lstatus/tx_skbuff writes.
      Reported-by: default avatarMartyn Welch <martyn.welch@ge.com>
      Bisected-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: default avatarAnton Vorontsov <avorontsov@ru.mvista.com>
      Tested-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
      Tested-by: default avatarMartyn Welch <martyn.welch@ge.com>
      Cc: Sandeep Gopalpet <Sandeep.Kumar@freescale.com>
      Cc: Stable <stable@vger.kernel.org> [2.6.33]
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0eddba52
    • David Dillow's avatar
      r8169: use correct barrier between cacheable and non-cacheable memory · 4c020a96
      David Dillow authored
      r8169 needs certain writes to be visible to other CPUs or the NIC before
      touching the hardware, but was using smp_wmb() which is only required to
      order cacheable memory access. Switch to wmb() which is required to
      order both cacheable and non-cacheable memory.
      
      Noticed by Catalin Marinas and Paul Mackerras.
      Signed-off-by: default avatarDavid Dillow <dave@thedillows.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4c020a96
    • Neil Horman's avatar
      tipc: Fix oops on send prior to entering networked mode (v3) · d0021b25
      Neil Horman authored
      Fix TIPC to disallow sending to remote addresses prior to entering NET_MODE
      
      user programs can oops the kernel by sending datagrams via AF_TIPC prior to
      entering networked mode.  The following backtrace has been observed:
      
      ID: 13459  TASK: ffff810014640040  CPU: 0   COMMAND: "tipc-client"
      [exception RIP: tipc_node_select_next_hop+90]
      RIP: ffffffff8869d3c3  RSP: ffff81002d9a5ab8  RFLAGS: 00010202
      RAX: 0000000000000001  RBX: 0000000000000001  RCX: 0000000000000001
      RDX: 0000000000000000  RSI: 0000000000000001  RDI: 0000000001001001
      RBP: 0000000001001001   R8: 0074736575716552   R9: 0000000000000000
      R10: ffff81003fbd0680  R11: 00000000000000c8  R12: 0000000000000008
      R13: 0000000000000001  R14: 0000000000000001  R15: ffff810015c6ca00
      ORIG_RAX: ffffffffffffffff  CS: 0010  SS: 0018
      RIP: 0000003cbd8d49a3  RSP: 00007fffc84e0be8  RFLAGS: 00010206
      RAX: 000000000000002c  RBX: ffffffff8005d116  RCX: 0000000000000000
      RDX: 0000000000000008  RSI: 00007fffc84e0c00  RDI: 0000000000000003
      RBP: 0000000000000000   R8: 00007fffc84e0c10   R9: 0000000000000010
      R10: 0000000000000000  R11: 0000000000000246  R12: 0000000000000000
      R13: 00007fffc84e0d10  R14: 0000000000000000  R15: 00007fffc84e0c30
      ORIG_RAX: 000000000000002c  CS: 0033  SS: 002b
      
      What happens is that, when the tipc module in inserted it enters a standalone
      node mode in which communication to its own address is allowed <0.0.0> but not
      to other addresses, since the appropriate data structures have not been
      allocated yet (specifically the tipc_net pointer).  There is nothing stopping a
      client from trying to send such a message however, and if that happens, we
      attempt to dereference tipc_net.zones while the pointer is still NULL, and
      explode.  The fix is pretty straightforward.  Since these oopses all arise from
      the dereference of global pointers prior to their assignment to allocated
      values, and since these allocations are small (about 2k total), lets convert
      these pointers to static arrays of the appropriate size.  All the accesses to
      these bits consider 0/NULL to be a non match when searching, so all the lookups
      still work properly, and there is no longer a chance of a bad dererence
      anywhere.  As a bonus, this lets us eliminate the setup/teardown routines for
      those pointers, and elimnates the need to preform any locking around them to
      prevent access while their being allocated/freed.
      
      I've updated the tipc_net structure to behave this way to fix the exact reported
      problem, and also fixed up the tipc_bearers and media_list arrays to fix an
      obvious simmilar problem that arises from issuing tipc-config commands to
      manipulate bearers/links prior to entering networked mode
      
      I've tested this for a few hours by running the sanity tests and stress test
      with the tipcutils suite, and nothing has fallen over.  There have been a few
      lockdep warnings, but those were there before, and can be addressed later, as
      they didn't actually result in any deadlock.
      Signed-off-by: default avatarNeil Horman <nhorman@tuxdriver.com>
      CC: Allan Stephens <allan.stephens@windriver.com>
      CC: David S. Miller <davem@davemloft.net>
      CC: tipc-discussion@lists.sourceforge.net
      
       bearer.c |   37 ++++++-------------------------------
       bearer.h |    2 +-
       net.c    |   25 ++++---------------------
       3 files changed, 11 insertions(+), 53 deletions(-)
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d0021b25
    • Timo Teräs's avatar
      gre: fix hard header destination address checking · 6d55cb91
      Timo Teräs authored
      ipgre_header() can be called with zero daddr when the gre device is
      configured as multipoint tunnel and still has the NOARP flag set (which is
      typically cleared by the userspace arp daemon).  If the NOARP packets are
      not dropped, ipgre_tunnel_xmit() will take rt->rt_gateway (= NBMA IP) and
      use that for route look up (and may lead to bogus xfrm acquires).
      
      The multicast address check is removed as sending to multicast group should
      be ok.  In fact, if gre device has a multicast address as destination
      ipgre_header is always called with multicast address.
      Signed-off-by: default avatarTimo Teras <timo.teras@iki.fi>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6d55cb91
    • Mike Galbraith's avatar
      net: add scheduler sync hint to tcp_prequeue(). · c839d30a
      Mike Galbraith authored
      Decreases the odds wakee will suffer from frequent cache misses.
      Signed-off-by: default avatarMike Galbraith <efault@gmx.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c839d30a
    • stephen hemminger's avatar
      IPv6: fix race between cleanup and add/delete address · 8f37ada5
      stephen hemminger authored
      This solves a potential race problem during the cleanup process.
      The issue is that addrconf_ifdown() needs to traverse address list,
      but then drop lock to call the notifier. The version in -next
      could get confused if add/delete happened during this window.
      Original code (2.6.32 and earlier) was okay because all addresses
      were always deleted.
      Signed-off-by: default avatarStephen Hemminger <shemminger@vyatta.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8f37ada5
    • stephen hemminger's avatar
      IPv6: addrconf notify when address is unavailable · 84e8b803
      stephen hemminger authored
      My recent change in net-next to retain permanent addresses caused regression.
      Device refcount would not go to zero when device was unregistered because
      left over anycast reference would hold ipv6 dev reference which would hold
      device references...
      
      The correct procedure is to call notify chain when address is no longer
      available for use.  When interface comes back DAD timer will notify
      back that address is available.
      
      Also, link local addresses should be purged when interface is brought
      down. The address might be changed.
      Signed-off-by: default avatarStephen Hemminger <shemminger@vyatta.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      84e8b803
    • stephen hemminger's avatar
      IPv6: addrconf timer race · 5b2a1953
      stephen hemminger authored
      The Router Solicitation timer races with device state changes
      because it doesn't lock the device. Use local variable to avoid
      one repeated dereference.
      Signed-off-by: default avatarStephen Hemminger <shemminger@vyatta.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5b2a1953
    • stephen hemminger's avatar
      IPv6: addrconf dad timer unnecessary bh_disable · 122e4519
      stephen hemminger authored
      Timer code runs in bottom half, so there is no need for
      using _bh form of locking.  Also check if device is not ready
      to avoid race with address that is no longer active.
      Signed-off-by: default avatarStephen Hemminger <shemminger@vyatta.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      122e4519
    • David S. Miller's avatar
  4. 03 Mar, 2010 7 commits