1. 03 8月, 2009 1 次提交
    • B
      ppp: fix lost fragments in ppp_mp_explode() (resubmit) · a53a8b56
      Ben McKeegan 提交于
      This patch fixes the corner cases where the sum of MTU of the free
      channels (adjusted for fragmentation overheads) is less than the MTU
      of PPP link.  There are at least 3 situations where this case might
      arise:
      
      - some of the channels are busy
      
      - the multilink session is running in a degraded state (i.e. with less
      than its full complement of active channels)
      
      - by design, where multilink protocol is being used to artificially
      increase the effective link MTU of a single link.
      
      Without this patch, at most 1 fragment is ever sent per free channel
      for a given PPP frame and any remaining part of the PPP frame that
      does not fit into those fragments is silently discarded.
      
      This patch restores the original behaviour which was broken by commit
      9c705260 'ppp:ppp_mp_explode()
      redesign'.  Once all 'free' channels have been given a fragment, an
      additional fragment is queued to each available channel in turn, as many
      times as necessary, until the entire PPP frame has been consumed.
      Signed-off-by: NBen McKeegan <ben@netservers.co.uk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a53a8b56
  2. 31 7月, 2009 7 次提交
  3. 30 7月, 2009 2 次提交
  4. 28 7月, 2009 7 次提交
    • R
      iwlwifi: Read outside array bounds · 082e708a
      Roel Kluin 提交于
      tid is bounded (above) by the size of default_tid_to_tx_fifo (17 elements), but
      the size of priv->stations[].tid[] is MAX_TID_COUNT (9) elements.
      Signed-off-by: NRoel Kluin <roel.kluin@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      082e708a
    • R
      ath9k: Read outside array bounds · 008749fc
      Roel Kluin 提交于
      Incorrect limits leads to reads outside array bounds.
      Signed-off-by: NRoel Kluin <roel.kluin@gmail.com>
      Acked-by: NLuis R. Rodriguez <lrodriguez@atheros.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      008749fc
    • R
      airo: Buffer overflow · 3d0ccd02
      Roel Kluin 提交于
      SSID_rid has space for only 3 ssids.
      txPowerLevels[i] is read before the bounds check for i
      Signed-off-by: NRoel Kluin <roel.kluin@gmail.com>
      Acked-by: NDan Williams <dcbw@redhat.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      3d0ccd02
    • D
      wireless: ERR_PTR vs null · 2a21f869
      Dan Carpenter 提交于
      iwm_wdev_alloc() returns an ERR_PTR on failure and not null.  It also
      prints its own dev_err() message so I removed that as well.
      
      Compile tested only.  Sorry.
      Found by smatch (http://repo.or.cz/w/smatch.git).
      Signed-off-by: NDan Carpenter <error27@gmail.com>
      Acked-by: NZhu Yi <yi.zhu@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      2a21f869
    • R
      iwlagn: fix minimum number of queues setting · 45f5fa32
      reinette chatre 提交于
      We need to provide a reasonable minimum that will result in a
      working setup if used. Set minimum to be 10 to provide for
      4 standard TX queues + 1 command queue + 2 (unused) HCCA queues +
      4 HT queues (one per AC).
      
      We allow the user to change the number of queues used via a module
      parameter and use this minimum value to check if it is valid. Without
      this patch a user can select a value for the number of queues that
      will result in a failing setup.
      Signed-off-by: NReinette Chatre <reinette.chatre@intel.com>
      Reviewed-by: NTomas Winkler <tomas.winkler@intel.com>
      Acked-by: NTomas Winkler <tomas.winkler@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      45f5fa32
    • J
      iwlwifi: fix TX queue race · 3995bd93
      Johannes Berg 提交于
      I had a problem on 4965 hardware (well, probably other hardware too,
      but others don't survive my stress testing right now, unfortunately)
      where the driver was sending invalid commands to the device, but no
      such thing could be seen from the driver's point of view. I could
      reproduce this fairly easily by sending multiple TCP streams with
      iperf on different TIDs, though sometimes a single iperf stream was
      sufficient. It even happened with a single core, but I have forced
      preemption turned on.
      
      The culprit was a queue overrun, where we advanced the queue's write
      pointer over the read pointer. After careful analysis I've come to
      the conclusion that the cause is a race condition between iwlwifi
      and mac80211.
      
      mac80211, of course, checks whether the queue is stopped, before
      transmitting a frame. This effectively looks like this:
      
              lock(queues)
              if (stopped(queue)) {
                      unlock(queues)
                      return busy;
      	}
              unlock(queues)
              ...             <-- this place will be important
      			    there is some more code here
              drv_tx(frame)
      
      The driver, on the other hand, can stop and start queues, which does
      
              lock(queues)
              mark_running/stopped(queue)
              unlock(queues)
      
      	[if marked running: wake up tasklet to send pending frames]
      
      Now, however, once the driver starts the queue, mac80211 can see that
      and end up at the marked place above, at which point for some reason the
      driver seems to stop the queue again (I don't understand that) and then
      we end up transmitting while the queue is actually full.
      
      Now, this shouldn't actually matter much, but for some reason I've seen
      it happen multiple times in a row and the queue actually overflows, at
      which point the queue bites itself in the tail and things go completely
      wrong.
      
      This patch fixes this by just dropping the packet should this have
      happened, and making the lock in iwlwifi cover everything so iwlwifi
      can't race against itself (dropping the lock there might make it more
      likely, but it did seem to happen without that too).
      
      Since we can't hold the lock across drv_tx() above, I see no way to fix
      this in mac80211, but I also don't understand why I haven't seen this
      before -- maybe I just never stress tested it this badly.
      
      With this patch, the device has survived many minutes of simultanously
      sending two iperf streams on different TIDs with combined throughput
      of about 60 Mbps.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NReinette Chatre <reinette.chatre@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      3995bd93
    • M
      cnic: Fix ISCSI_KEVENT_IF_DOWN message handling. · 6d7760a8
      Michael Chan 提交于
      When a net device goes down or when the bnx2i driver is unloaded,
      the code was not generating the ISCSI_KEVENT_IF_DOWN message
      properly and this could cause the userspace driver to crash.
      
      This is fixed by sending the message properly in the shutdown path.
      cnic_uio_stop() is also added to send the message when bnx2i is
      unregistering.
      Signed-off-by: NMichael Chan <mchan@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6d7760a8
  5. 27 7月, 2009 8 次提交
  6. 24 7月, 2009 4 次提交
  7. 23 7月, 2009 7 次提交
  8. 22 7月, 2009 4 次提交