Skip to content
  1. Jun 02, 2009
  2. Jun 01, 2009
  3. May 30, 2009
  4. May 29, 2009
  5. May 28, 2009
  6. May 27, 2009
    • Pablo Neira Ayuso's avatar
      netfilter: nfnetlink_log: fix wrong skbuff size calculation · eeff9bee
      Pablo Neira Ayuso authored
      This problem was introduced in 72961ecf
      
      
      since no space was reserved for the new attributes NFULA_HWTYPE,
      NFULA_HWLEN and NFULA_HWHEADER.
      
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
      eeff9bee
    • Jesper Dangaard Brouer's avatar
      netfilter: xt_hashlimit does a wrong SEQ_SKIP · 683a04ce
      Jesper Dangaard Brouer authored
      
      
      The function dl_seq_show() returns 1 (equal to SEQ_SKIP) in case
      a seq_printf() call return -1.  It should return -1.
      
      This SEQ_SKIP behavior brakes processing the proc file e.g. via a
      pipe or just through less.
      
      Signed-off-by: default avatarJesper Dangaard Brouer <hawk@comx.dk>
      Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
      683a04ce
    • Dave Young's avatar
      Bluetooth: Remove useless flush_work() causing lockdep warnings · 4c713189
      Dave Young authored
      The calls to flush_work() are pointless in a single thread workqueue
      and they are actually causing a lockdep warning.
      
      =============================================
      [ INFO: possible recursive locking detected ]
      2.6.30-rc6-02911-gbb803cf #16
      ---------------------------------------------
      bluetooth/2518 is trying to acquire lock:
       (bluetooth){+.+.+.}, at: [<c0130c14>] flush_work+0x28/0xb0
      
      but task is already holding lock:
       (bluetooth){+.+.+.}, at: [<c0130424>] worker_thread+0x149/0x25e
      
      other info that might help us debug this:
      2 locks held by bluetooth/2518:
       #0:  (bluetooth){+.+.+.}, at: [<c0130424>] worker_thread+0x149/0x25e
       #1:  (&conn->work_del){+.+...}, at: [<c0130424>] worker_thread+0x149/0x25e
      
      stack backtrace:
      Pid: 2518, comm: bluetooth Not tainted 2.6.30-rc6-02911-gbb803cf #16
      Call Trace:
       [<c03d64d9>] ? printk+0xf/0x11
       [<c0140d96>] __lock_acquire+0x7ce/0xb1b
       [<c0141173>] lock_acquire+0x90/0xad
       [<c0130c14>] ? flush_work+0x28/0xb0
      ...
      4c713189
    • Mike Frysinger's avatar
      bfin_mac: fix build error due to net_device_ops convert · b63dc8fe
      Mike Frysinger authored
      
      
      The previous commit "convert to net_device_ops" broke the Blackfin MAC
      driver as it declared the new structure before the function it used:
        CC      drivers/net/bfin_mac.o
      drivers/net/bfin_mac.c:984: error: ‘bfin_mac_close’ undeclared here (not in a function)
      make[1]: *** [drivers/net/bfin_mac.o] Error 1
      
      Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b63dc8fe
    • Alex Chiang's avatar
      atlx: move modinfo data from atlx.h to atl1.c · 5ad18900
      Alex Chiang authored
      
      
      Both atl1.c and atl2.c include atlx.h, which defines some modinfo
      stuff. But atl2.c seems like it doesn't want the modinfo data
      from atlx.h, as it defines its own.
      
      Running modinfo on atl2.ko, we get conflicting information:
      
      $ /sbin/modinfo drivers/net/atlx/atl2.ko | egrep "version|description|author"
      version:        2.2.3
      description:    Atheros Fast Ethernet Network Driver
      author:         Atheros Corporation <xiong.huang@atheros.com>, Chris Snook <csnook@redhat.com>
      version:        2.1.3
      author:         Xiong Huang <xiong.huang@atheros.com>, 	Chris Snook <csnook@redhat.com>, Jay Cliburn <jcliburn@gmail.com>
      
      Move the modinfo data out of atlx.h and into atl1.c to eliminate
      the confusion:
      
      $ /sbin/modinfo drivers/net/atlx/atl1.ko | egrep "version|description|author"
      version:        2.1.3
      author:         Xiong Huang <xiong.huang@atheros.com>, 	Chris Snook <csnook@redhat.com>, Jay Cliburn <jcliburn@gmail.com>
      description:    Atheros L1 Gigabit Ethernet Driver
      
      $ /sbin/modinfo drivers/net/atlx/atl2.ko | egrep "version|description|author"
      version:        2.2.3
      description:    Atheros Fast Ethernet Network Driver
      author:         Atheros Corporation <xiong.huang@atheros.com>, Chris Snook <csnook@redhat.com>
      
      Reported-by: default avatarScott Scriven <scott.scriven@hp.com>
      Signed-off-by: default avatarAlex Chiang <achiang@hp.com>
      Acked-by: default avatarJay Cliburn <jcliburn@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5ad18900
    • Xiaotian Feng's avatar
      gianfar: fix babbling rx error event bug · 18a36c1a
      Xiaotian Feng authored
      
      
      Gianfar interrupt handler uses IEVENT_ERR_MASK to check and handle errors.
      Babbling RX error (IEVENT_BABR) should be included in IEVENT_ERROR_MASK.
      Otherwise if BABR is raised, it never gets handled nor cleared, and an
      interrupt storm results. This has been observed to happen on sending a
      burst of ethernet frames to a gianfar based board.
      
      Signed-off-by: default avatarXiaotian Feng <xiaotian.feng@windriver.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      18a36c1a
    • Paul Menage's avatar
      cls_cgroup: read classid atomically in classifier · e65fcfd6
      Paul Menage authored
      
      
      Avoid reading the unsynchronized value cs->classid multiple times,
      since it could change concurrently from non-zero to zero; this would
      result in the classifier returning a positive result with a bogus
      (zero) classid.
      
      Signed-off-by: default avatarPaul Menage <menage@google.com>
      Reviewed-by: default avatarLi Zefan <lizf@cn.fujitsu.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e65fcfd6
  7. May 26, 2009
  8. May 25, 2009
    • Pablo Neira Ayuso's avatar
      netfilter: nf_ct_dccp: add missing DCCP protocol changes in event cache · b38b1f61
      Pablo Neira Ayuso authored
      
      
      This patch adds the missing protocol state-change event reporting
      for DCCP.
      
      $ sudo conntrack -E
          [NEW] dccp     33 240 src=192.168.0.2 dst=192.168.1.2 sport=57040 dport=5001 [UNREPLIED] src=192.168.1.2 dst=192.168.1.100 sport=5001 dport=57040
      
      With this patch:
      
      $ sudo conntrack -E
          [NEW] dccp     33 240 REQUEST src=192.168.0.2 dst=192.168.1.2 sport=57040 dport=5001 [UNREPLIED] src=192.168.1.2 dst=192.168.1.100 sport=5001 dport=57040
      
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
      b38b1f61
    • Jozsef Kadlecsik's avatar
      netfilter: nf_ct_tcp: fix accepting invalid RST segments · bfcaa502
      Jozsef Kadlecsik authored
      
      
      Robert L Mathews discovered that some clients send evil TCP RST segments,
      which are accepted by netfilter conntrack but discarded by the
      destination. Thus the conntrack entry is destroyed but the destination
      retransmits data until timeout.
      
      The same technique, i.e. sending properly crafted RST segments, can easily
      be used to bypass connlimit/connbytes based restrictions (the sample
      script written by Robert can be found in the netfilter mailing list
      archives).
      
      The patch below adds a new flag and new field to struct ip_ct_tcp_state so
      that checking RST segments can be made more strict and thus TCP conntrack
      can catch the invalid ones: the RST segment is accepted only if its
      sequence number higher than or equal to the highest ack we seen from the
      other direction. (The last_ack field cannot be reused because it is used
      to catch resent packets.)
      
      Signed-off-by: default avatarJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
      Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
      bfcaa502
    • Lennert Buytenhek's avatar
      gianfar: fix BUG under load after introduction of skb recycling · 4e2fd555
      Lennert Buytenhek authored
      Since commit 0fd56bb5
      
       ("gianfar:
      Add support for skb recycling"), gianfar puts skbuffs that are in
      the rx ring back onto the recycle list as-is in case there was a
      receive error, but this breaks the following invariant: that all
      skbuffs on the recycle list have skb->data = skb->head + NET_SKB_PAD.
      
      The RXBUF_ALIGNMENT realignment done in gfar_new_skb() will be done
      twice on skbuffs recycled in this way, causing there not to be enough
      room in the skb anymore to receive a full packet, eventually leading
      to an skb_over_panic from gfar_clean_rx_ring() -> skb_put().
      
      Resetting the skb->data pointer to skb->head + NET_SKB_PAD before
      putting the skb back onto the recycle list restores the mentioned
      invariant, and should fix this issue.
      
      Reported-by: default avatarMichael Guntsche <mike@it-loops.com>
      Tested-by: default avatarMichael Guntsche <mike@it-loops.com>
      Signed-off-by: default avatarLennert Buytenhek <buytenh@wantstofly.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4e2fd555
  9. May 22, 2009
  10. May 21, 2009
    • Jean-Mickael Guerin's avatar
      IPv6: set RTPROT_KERNEL to initial route · 4f724279
      Jean-Mickael Guerin authored
      The use of unspecified protocol in IPv6 initial route prevents quagga to
      install IPv6 default route:
      # show ipv6 route
      S   ::/0 [1/0] via fe80::1, eth1_0
      K>* ::/0 is directly connected, lo, rej
      C>* ::1/128 is directly connected, lo
      C>* fe80::/64 is directly connected, eth1_0
      
      # ip -6 route
      fe80::/64 dev eth1_0  proto kernel  metric 256  mtu 1500 advmss 1440
      hoplimit -1
      ff00::/8 dev eth1_0  metric 256  mtu 1500 advmss 1440 hoplimit -1
      unreachable default dev lo  proto none  metric -1  error -101 hoplimit 255
      
      The attached patch ensures RTPROT_KERNEL to the default initial route
      and fixes the problem for quagga.
      This is similar to "ipv6: protocol for address routes"
      f410a1fb.
      
      # show ipv6 route
      S>* ::/0 [1/0] via fe80::1, eth1_0
      C>* ::1/128 is directly connected, lo
      C>* fe80::/64 is directly connected, eth1_0
      
      # ip -6 route
      fe80::/64 dev eth1_0  proto kernel  metric 256  mtu 1500 advmss 1440
      hoplimit -1
      fe80::/64 dev eth1_0  proto kern...
      4f724279
    • David S. Miller's avatar
    • Eric Dumazet's avatar
      net: fix rtable leak in net/ipv4/route.c · 1ddbcb00
      Eric Dumazet authored
      Alexander V. Lukyanov found a regression in 2.6.29 and made a complete
      analysis found in http://bugzilla.kernel.org/show_bug.cgi?id=13339
      Quoted here because its a perfect one :
      
      begin_of_quotation
       2.6.29 patch has introduced flexible route cache rebuilding. Unfortunately the
       patch has at least one critical flaw, and another problem.
      
       rt_intern_hash calculates rthi pointer, which is later used for new entry
       insertion. The same loop calculates cand pointer which is used to clean the
       list. If the pointers are the same, rtable leak occurs, as first the cand is
       removed then the new entry is appended to it.
      
       This leak leads to unregister_netdevice problem (usage count > 0).
      
       Another problem of the patch is that it tries to insert the entries in certain
       order, to facilitate counting of entries distinct by all but QoS parameters.
       Unfortunately, referencing an existing rtable entry moves it to list beginning,
       to speed up further lookups, so the carefully built order is destroyed.
      
       For the first problem the simplest patch it to set rthi=0 when rthi==cand, but
       it will also destroy the ordering.
      end_of_quotation
      
      Problematic commit is 1080d709
      
      
      (net: implement emergency route cache rebulds when gc_elasticity is exceeded)
      
      Trying to keep dst_entries ordered is too complex and breaks the fact that
      order should depend on the frequency of use for garbage collection.
      
      A possible fix is to make rt_intern_hash() simpler, and only makes
      rt_check_expire() a litle bit smarter, being able to cope with an arbitrary
      entries order. The added loop is running on cache hot data, while cpu
      is prefetching next object, so should be unnoticied.
      
      Reported-and-analyzed-by: default avatarAlexander V. Lukyanov <lav@yar.ru>
      Signed-off-by: default avatarEric Dumazet <dada1@cosmosbay.com>
      Acked-by: default avatarNeil Horman <nhorman@tuxdriver.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1ddbcb00
    • Eric Dumazet's avatar
      net: fix length computation in rt_check_expire() · cf8da764
      Eric Dumazet authored
      
      
      rt_check_expire() computes average and standard deviation of chain lengths,
      but not correclty reset length to 0 at beginning of each chain.
      This probably gives overflows for sum2 (and sum) on loaded machines instead
      of meaningful results.
      
      Signed-off-by: default avatarEric Dumazet <dada1@cosmosbay.com>
      Acked-by: default avatarNeil Horman <nhorman@tuxdriver.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cf8da764
    • Roel Kluin's avatar
      wireless: beyond ARRAY_SIZE of intf->crypto_stats · a6c67339
      Roel Kluin authored
      
      
      Do not go beyond ARRAY_SIZE of intf->crypto_stats
      
      Signed-off-by: default avatarRoel Kluin <roel.kluin@gmail.com>
      Acked-by: default avatarIvo van Doorn <IvDoorn@gmail.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      a6c67339