1. 20 4月, 2009 14 次提交
    • H
      tun: Only free a netdev when all tun descriptors are closed · 9c3fea6a
      Herbert Xu 提交于
      The commit c70f1829 ("tun: Fix
      races between tun_net_close and free_netdev") fixed a race where
      an asynchronous deletion of a tun device can hose a poll(2) on
      a tun fd attached to that device.
      
      However, this came at the cost of moving the tun wait queue into
      the tun file data structure.  The problem with this is that it
      imposes restrictions on when and where the tun device can access
      the wait queue since the tun file may change at any time due to
      detaching and reattaching.
      
      In particular, now that we need to use the wait queue on the
      receive path it becomes difficult to properly synchronise this
      with the detachment of the tun device.
      
      This patch solves the original race in a different way.  Since
      the race is only because the underlying memory gets freed, we
      can prevent it simply by ensuring that we don't do that until
      all tun descriptors ever attached to the device (even if they
      have since be detached because they may still be sitting in poll)
      have been closed.
      
      This is done by using reference counting the attached tun file
      descriptors.  The refcount in tun->sk has been reappropriated
      for this purpose since it was already being used for that, albeit
      from the opposite angle.
      
      Note that we no longer zero tfile->tun since tun_get will return
      NULL anyway after the refcount on tfile hits zero.  Instead it
      represents whether this device has ever been attached to a device.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9c3fea6a
    • B
      net: Fix GRO for multiple page fragments · 5db8765a
      Ben Hutchings 提交于
      This loop over fragments in napi_fraginfo_skb() was "interesting".
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5db8765a
    • D
    • M
      net: fix "compatibility" typos · eb39c57f
      Marcin Slusarz 提交于
      Signed-off-by: NMarcin Slusarz <marcin.slusarz@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      eb39c57f
    • I
      tcp: fix mid-wq adjustment helper · 52cf3cc8
      Ilpo Järvinen 提交于
      Just noticed while doing some new work that the recent
      mid-wq adjustment logic will misbehave when FACK is not
      in use (happens either due sysctl'ed off or auto-detected
      reordering) because I forgot the relevant TCPCB tagbit.
      Signed-off-by: NIlpo Järvinen <ilpo.jarvinen@helsinki.fi>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      52cf3cc8
    • J
      net: sch_netem: Fix an inconsistency in ingress netem timestamps. · 8caf1539
      Jarek Poplawski 提交于
      Alex Sidorenko reported:
      
      "while experimenting with 'netem' we have found some strange behaviour. It
      seemed that ingress delay as measured by 'ping' command shows up on some
      hosts but not on others.
      
      After some investigation I have found that the problem is that skbuff->tstamp
      field value depends on whether there are any packet sniffers enabled. That
      is:
      
      - if any ptype_all handler is registered, the tstamp field is as expected
      - if there are no ptype_all handlers, the tstamp field does not show the delay"
      
      This patch prevents unnecessary update of tstamp in dev_queue_xmit_nit()
      on ingress path (with act_mirred) adding a check, so minimal overhead on
      the fast path, but only when sniffers etc. are active.
      
      Since netem at ingress seems to logically emulate a network before a host,
      tstamp is zeroed to trigger the update and pretend delays are from the
      outside.
      Reported-by: NAlex Sidorenko <alexandre.sidorenko@hp.com>
      Tested-by: NAlex Sidorenko <alexandre.sidorenko@hp.com>
      Signed-off-by: NJarek Poplawski <jarkao2@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8caf1539
    • A
      ax25: proc uid file misses header · c7c1a0f6
      Alan Cox 提交于
      This has been broken for a while. I happened to catch it testing because one
      app "knew" that the top line of the calls data was the policy line and got
      confused.
      
      Put the header back.
      Signed-off-by: NAlan Cox <alan@lxorguk.ukuu.org.uk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c7c1a0f6
    • D
      cxgb3: Fix EEH final recovery attempt · e8d19370
      Divy Le Ray 提交于
      EEH attempts to recover up 6 times.
      The last attempt leaves all the ports and adapter down.hen
      The driver is then unloaded, bringing the adapter down again
      unconditionally. The unload will hang.
      Check if the adapter is already down before trying to bring it down again.
      Signed-off-by: NDivy Le Ray <divy@chelsio.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e8d19370
    • D
      cxgb3: Fix potential msi-x vector leak · 2c2f409f
      Divy Le Ray 提交于
      Release vectors when a MSI-X allocation fails.
      Signed-off-by: NDivy Le Ray <divy@chelsio.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2c2f409f
    • D
      cxgb3: fix workqueue flush issues · c80b0c28
      Divy Le Ray 提交于
      The fatal error task can be scheduled while processing an offload packet
      in NAPI context when the connection handle is bogus. this can race
      with the ports being brought down and the cxgb3 workqueue being flushed.
      Stop napi processing before flushing the work queue.
      
      The ULP drivers (iSCSI, iWARP) might also schedule a task on keventd_wk
      while releasing a connection handle (cxgb3_offload.c::cxgb3_queue_tid_release()).
      The driver however does not flush any work on keventd_wq while being unloaded.
      This patch also fixes this.
      
      Also call cancel_delayed_work_sync in place of the the deprecated
      cancel_rearming_delayed_workqueue.
      Signed-off-by: NDivy Le Ray <divy@chelsio.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c80b0c28
    • D
      cxgb3: fix link fault handling · 3851c66c
      Divy Le Ray 提交于
      Use the existing periodic task to handle link faults.
      The link fault interrupt handler is also called in work queue context,
      which is wrong and might cause potential deadlocks.
      Signed-off-by: NDivy Le Ray <divy@chelsio.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3851c66c
    • M
      Bluetooth: Add workaround for wrong HCI event in eSCO setup · 9499237a
      Marcel Holtmann 提交于
      The Broadcom chips with 2.1 firmware handle the fallback case to a SCO
      link wrongly when setting up eSCO connections.
      
        < HCI Command: Setup Synchronous Connection (0x01|0x0028) plen 17
            handle 11 voice setting 0x0060
        > HCI Event: Command Status (0x0f) plen 4
            Setup Synchronous Connection (0x01|0x0028) status 0x00 ncmd 1
        > HCI Event: Connect Complete (0x03) plen 11
            status 0x00 handle 1 bdaddr 00:1E:3A:xx:xx:xx type SCO encrypt 0x01
      
      The Link Manager negotiates the fallback to SCO, but then sends out
      a Connect Complete event. This is wrong and the Link Manager should
      actually send a Synchronous Connection Complete event if the Setup
      Synchronous Connection has been used. Only the remote side is allowed
      to use Connect Complete to indicate the missing support for eSCO in
      the host stack.
      
      This patch adds a workaround for this which clearly should not be
      needed, but reality is that broken Broadcom devices are deployed.
      
      Based on a report by Ville Tervo <ville.tervo@nokia.com>
      Signed-off-by: NMarcel Holtman <marcel@holtmann.org>
      9499237a
    • M
      Bluetooth: Fallback from eSCO to SCO on unspecified error · 732547f9
      Marcel Holtmann 提交于
      Some Bluetooth chips (like the ones from Texas Instruments) don't do
      proper eSCO negotiations inside the Link Manager. They just return an
      error code and in case of the Kyocera ED-8800 headset it is just a
      random error.
      
        < HCI Command: Setup Synchronous Connection 0x01|0x0028) plen 17
          handle 1 voice setting 0x0060
        > HCI Event: Command Status (0x0f) plen 4
          Setup Synchronous Connection (0x01|0x0028) status 0x00 ncmd 1
        > HCI Event: Synchronous Connect Complete (0x2c) plen 17
          status 0x1f handle 257 bdaddr 00:14:0A:xx:xx:xx type eSCO
          Error: Unspecified Error
      
      In these cases it is up to the host stack to fallback to a SCO setup
      and so retry with SCO parameters.
      
      Based on a report by Nick Pelly <npelly@google.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      732547f9
    • J
      Bluetooth: Fix removing of RFCOMM DLC timer with DEFER_SETUP · e2139b32
      Johan Hedberg 提交于
      There is a missing call to rfcomm_dlc_clear_timer in the case that
      DEFER_SETUP is used and so the connection gets disconnected after the
      timeout even if it was successfully accepted previously.
      
      This patch adds a call to rfcomm_dlc_clear_timer to rfcomm_dlc_accept
      which will get called when the user accepts the connection by calling
      read() on the socket.
      Signed-off-by: NJohan Hedberg <johan.hedberg@nokia.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      e2139b32
  2. 18 4月, 2009 8 次提交
  3. 17 4月, 2009 16 次提交
  4. 16 4月, 2009 2 次提交