1. 08 6月, 2010 1 次提交
    • E
      netfilter: nf_conntrack: IPS_UNTRACKED bit · 5bfddbd4
      Eric Dumazet 提交于
      NOTRACK makes all cpus share a cache line on nf_conntrack_untracked
      twice per packet. This is bad for performance.
      __read_mostly annotation is also a bad choice.
      
      This patch introduces IPS_UNTRACKED bit so that we can use later a
      per_cpu untrack structure more easily.
      
      A new helper, nf_ct_untracked_get() returns a pointer to
      nf_conntrack_untracked.
      
      Another one, nf_ct_untracked_status_or() is used by nf_nat_init() to add
      IPS_NAT_DONE_MASK bits to untracked status.
      
      nf_ct_is_untracked() prototype is changed to work on a nf_conn pointer.
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      5bfddbd4
  2. 04 6月, 2010 1 次提交
  3. 01 6月, 2010 2 次提交
  4. 31 5月, 2010 8 次提交
  5. 29 5月, 2010 7 次提交
  6. 28 5月, 2010 6 次提交
  7. 27 5月, 2010 2 次提交
    • E
      net: fix lock_sock_bh/unlock_sock_bh · 8a74ad60
      Eric Dumazet 提交于
      This new sock lock primitive was introduced to speedup some user context
      socket manipulation. But it is unsafe to protect two threads, one using
      regular lock_sock/release_sock, one using lock_sock_bh/unlock_sock_bh
      
      This patch changes lock_sock_bh to be careful against 'owned' state.
      If owned is found to be set, we must take the slow path.
      lock_sock_bh() now returns a boolean to say if the slow path was taken,
      and this boolean is used at unlock_sock_bh time to call the appropriate
      unlock function.
      
      After this change, BH are either disabled or enabled during the
      lock_sock_bh/unlock_sock_bh protected section. This might be misleading,
      so we rename these functions to lock_sock_fast()/unlock_sock_fast().
      Reported-by: NAnton Blanchard <anton@samba.org>
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Tested-by: NAnton Blanchard <anton@samba.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8a74ad60
    • J
      net/iucv: Add missing spin_unlock · a56635a5
      Julia Lawall 提交于
      Add a spin_unlock missing on the error path.  There seems like no reason
      why the lock should continue to be held if the kzalloc fail.
      
      The semantic match that finds this problem is as follows:
      (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @@
      expression E1;
      @@
      
      * spin_lock(E1,...);
        <+... when != E1
        if (...) {
          ... when != E1
      *   return ...;
        }
        ...+>
      * spin_unlock(E1,...);
      // </smpl>
      Signed-off-by: NJulia Lawall <julia@diku.dk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a56635a5
  8. 26 5月, 2010 3 次提交
  9. 25 5月, 2010 5 次提交
  10. 24 5月, 2010 5 次提交
    • L
      Revert "ath9k: Group Key fix for VAPs" · a69eee49
      Linus Torvalds 提交于
      This reverts commit 03ceedea, since it
      breaks resume from suspend-to-ram on Rafael's Acer Ferrari One.
      NetworkManager thinks everything is ok, but it can't connect to the AP
      to get an IP address after the resume.
      
      In fact, it even breaks resume for non-ath9k chipsets: reverting it also
      fixes Rafael's Toshiba Protege R500 with the iwlagn driver.  As Johannes
      says:
      
        "Indeed, this patch needs to be reverted. That mac80211 change is wrong
         and completely unnecessary."
      Reported-and-requested-by: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NJohannes Berg <johannes@sipsolutions.net>
      Cc: Daniel Yingqiang Ma <yma.cool@gmail.com>
      Cc: John W. Linville <linville@tuxdriver.com>
      Cc: David Miller <davem@davemloft.net>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a69eee49
    • H
      tun: Update classid on packet injection · 82862742
      Herbert Xu 提交于
      This patch makes tun update its socket classid every time we
      inject a packet into the network stack.  This is so that any
      updates made by the admin to the process writing packets to
      tun is effected.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      82862742
    • H
      cls_cgroup: Store classid in struct sock · f8451725
      Herbert Xu 提交于
      Up until now cls_cgroup has relied on fetching the classid out of
      the current executing thread.  This runs into trouble when a packet
      processing is delayed in which case it may execute out of another
      thread's context.
      
      Furthermore, even when a packet is not delayed we may fail to
      classify it if soft IRQs have been disabled, because this scenario
      is indistinguishable from one where a packet unrelated to the
      current thread is processed by a real soft IRQ.
      
      In fact, the current semantics is inherently broken, as a single
      skb may be constructed out of the writes of two different tasks.
      A different manifestation of this problem is when the TCP stack
      transmits in response of an incoming ACK.  This is currently
      unclassified.
      
      As we already have a concept of packet ownership for accounting
      purposes in the skb->sk pointer, this is a natural place to store
      the classid in a persistent manner.
      
      This patch adds the cls_cgroup classid in struct sock, filling up
      an existing hole on 64-bit :)
      
      The value is set at socket creation time.  So all sockets created
      via socket(2) automatically gains the ID of the thread creating it.
      Whenever another process touches the socket by either reading or
      writing to it, we will change the socket classid to that of the
      process if it has a valid (non-zero) classid.
      
      For sockets created on inbound connections through accept(2), we
      inherit the classid of the original listening socket through
      sk_clone, possibly preceding the actual accept(2) call.
      
      In order to minimise risks, I have not made this the authoritative
      classid.  For now it is only used as a backup when we execute
      with soft IRQs disabled.  Once we're completely happy with its
      semantics we can use it as the sole classid.
      
      Footnote: I have rearranged the error path on cls_group module
      creation.  If we didn't do this, then there is a window where
      someone could create a tc rule using cls_group before the cgroup
      subsystem has been registered.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f8451725
    • S
      caif: Bugfix - use MSG_TRUNC in receive · dcda138d
      Sjur Braendeland 提交于
      Fixed handling when skb don't fit in user buffer,
      instead of returning -EMSGSIZE, the buffer is truncated (just
      as unix seqpakcet does).
      Signed-off-by: NSjur Braendeland <sjur.brandeland@stericsson.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      dcda138d
    • S
      caif: Bugfix - missing spin_unlock · a9a8f107
      Sjur Braendeland 提交于
      Splint found missing spin_unlock.
      Corrected this an some other trivial split warnings.
      Signed-off-by: NSjur Braendeland <sjur.brandeland@stericsson.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a9a8f107