1. 01 6月, 2005 1 次提交
  2. 31 5月, 2005 2 次提交
    • H
      [IPV4]: Fix BUG() in 2.6.x, udp_poll(), fragments + CONFIG_HIGHMEM · 208d8984
      Herbert Xu 提交于
      Steven Hand <Steven.Hand@cl.cam.ac.uk> wrote:
      > 
      > Reconstructed forward trace: 
      > 
      >   net/ipv4/udp.c:1334   spin_lock_irq() 
      >   net/ipv4/udp.c:1336   udp_checksum_complete() 
      > net/core/skbuff.c:1069   skb_shinfo(skb)->nr_frags > 1
      > net/core/skbuff.c:1086   kunmap_skb_frag()
      > net/core/skbuff.h:1087   local_bh_enable()
      > kernel/softirq.c:0140   WARN_ON(irqs_disabled());
      
      The receive queue lock is never taken in IRQs (and should never be) so
      we can simply substitute bh for irq.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      208d8984
    • H
      [NETFILTER]: Fix deadlock with ip_queue and tcp local input path. · 9bb7bc94
      Harald Welte 提交于
      When we have ip_queue being used from LOCAL_IN, then we end up with a
      situation where the verdicts coming back from userspace traverse the TCP
      input path from syscall context.  While this seems to work most of the
      time, there's an ugly deadlock:
      
      syscall context is interrupted by the timer interrupt.  When the timer
      interrupt leaves, the timer softirq get's scheduled and calls
      tcp_delack_timer() and alike.  They themselves do bh_lock_sock(sk),
      which is already held from somewhere else -> boom.
      
      I've now tested the suggested solution by Patrick McHardy and Herbert Xu to
      simply use local_bh_{en,dis}able().
      Signed-off-by: NHarald Welte <laforge@netfilter.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9bb7bc94
  3. 30 5月, 2005 10 次提交
  4. 27 5月, 2005 6 次提交
  5. 24 5月, 2005 2 次提交
  6. 20 5月, 2005 8 次提交
  7. 19 5月, 2005 2 次提交
    • H
      [IPV4/IPV6] Ensure all frag_list members have NULL sk · 2fdba6b0
      Herbert Xu 提交于
      Having frag_list members which holds wmem of an sk leads to nightmares
      with partially cloned frag skb's.  The reason is that once you unleash
      a skb with a frag_list that has individual sk ownerships into the stack
      you can never undo those ownerships safely as they may have been cloned
      by things like netfilter.  Since we have to undo them in order to make
      skb_linearize happy this approach leads to a dead-end.
      
      So let's go the other way and make this an invariant:
      
      	For any skb on a frag_list, skb->sk must be NULL.
      
      That is, the socket ownership always belongs to the head skb.
      It turns out that the implementation is actually pretty simple.
      
      The above invariant is actually violated in the following patch
      for a short duration inside ip_fragment.  This is OK because the
      offending frag_list member is either destroyed at the end of the
      slow path without being sent anywhere, or it is detached from
      the frag_list before being sent.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2fdba6b0
    • E
      [XFRM]: skb_cow_data() does not set proper owner for new skbs. · d4810200
      Evgeniy Polyakov 提交于
      It looks like skb_cow_data() does not set 
      proper owner for newly created skb.
      
      If we have several fragments for skb and some of them
      are shared(?) or cloned (like in async IPsec) there 
      might be a situation when we require recreating skb and 
      thus using skb_copy() for it.
      Newly created skb has neither a destructor nor a socket
      assotiated with it, which must be copied from the old skb.
      As far as I can see, current code sets destructor and socket
      for the first one skb only and uses truesize of the first skb
      only to increment sk_wmem_alloc value.
      
      If above "analysis" is correct then attached patch fixes that.
      Signed-off-by: NEvgeniy Polyakov <johnpol@2ka.mipt.ru>
      Acked-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d4810200
  8. 06 5月, 2005 5 次提交
  9. 04 5月, 2005 4 次提交