1. 04 12月, 2009 26 次提交
  2. 03 12月, 2009 14 次提交
    • M
      sunhme: fix dma warning in Sun HME · ff236f7a
      Mikulas Patocka 提交于
      Fix dma-api-checking warnings in Sun HME
      
      Sun HME driver is mapping the first fragment with dma_map_single and subsequent
      fragments with dma_map_page. It is unmapping all fragments with dma_unmap_single
      and that produces the warning.
      
      This patch changes it so that it unmaps only the first fragment with
      dma_unmap_single and subsequent fragments are unmapped with dma_unmap_page.
      
      WARNING: at lib/dma-debug.c:816 check_unmap+0x3ac/0x780()
      hme 0000:01:01.1: DMA-API: device driver frees DMA memory with wrong function [device address=0x00000000c1082000] [size=32 bytes] [mapped as page] [unmapped as single]
      Modules linked in: nbd sunhme openpromfs sermouse unix
      Call Trace:
       [0000000000456910] warn_slowpath_common+0x50/0xa0
       [0000000000571f4c] check_unmap+0x3ac/0x780
       [0000000000572570] debug_dma_unmap_page+0x50/0x60
       [000000001002f5fc] happy_meal_tx+0x11c/0x260 [sunhme]
       [000000001002fc4c] happy_meal_interrupt+0xcc/0xe0 [sunhme]
       [0000000000492d94] handle_fasteoi_irq+0x74/0x100
       [000000000042ac0c] handler_irq+0xcc/0x100
       [0000000000426a54] valid_addr_bitmap_patch+0x14/0x1c0
       [0000000000665de0] _spin_unlock_irqrestore+0x40/0x60
       [0000000000462bb8] mod_timer+0x118/0x1a0
       [00000000005ec254] sk_reset_timer+0x14/0x40
       [0000000000635e4c] tcp_event_new_data_sent+0x8c/0xc0
       [0000000000639374] __tcp_push_pending_frames+0x34/0xc0
      ---[ end trace 73d5c42c1e9f11c4 ]---
      Mapped at:
       [<000000001002f148>] happy_meal_start_xmit+0x308/0x480 [sunhme]
       [<00000000005fc858>] dev_hard_start_xmit+0x318/0x3c0
       [<000000000060fec4>] sch_direct_xmit+0x1a4/0x200
       [<00000000005fced0>] dev_queue_xmit+0x410/0x560
       [<0000000000604a1c>] neigh_resolve_output+0xfc/0x300
      Signed-off-by: NMikulas Patocka <mpatocka@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ff236f7a
    • I
      tcp: clear hints to avoid a stale one (nfs only affected?) · 8818a9d8
      Ilpo Järvinen 提交于
      Eric Dumazet mentioned in a context of another problem:
      
      "Well, it seems NFS reuses its socket, so maybe we miss some
      cleaning as spotted in this old patch"
      
      I've not check under which conditions that actually happens but
      if true, we need to make sure we don't accidently leave stale
      hints behind when the write queue had to be purged (whether reusing
      with NFS can actually happen if purging took place is something I'm
      not sure of).
      
      ...At least it compiles.
      Signed-off-by: NIlpo Järvinen <ilpo.jarvinen@helsinki.fi>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8818a9d8
    • D
      tcp: sysctl_tcp_cookie_size needs to be exported to modules. · e6b09cca
      David S. Miller 提交于
      Otherwise:
      
      ERROR: "sysctl_tcp_cookie_size" [net/ipv6/ipv6.ko] undefined!
      make[1]: *** [__modpost] Error 1
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e6b09cca
    • D
      tcp: Fix warning on 64-bit. · f9a2e69e
      David S. Miller 提交于
      net/ipv4/tcp_output.c: In function ‘tcp_make_synack’:
      net/ipv4/tcp_output.c:2488: warning: cast from pointer to integer of different size
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f9a2e69e
    • E
      net: Teach vlans to cleanup as a pernet subsystem · 91e2ff35
      Eric W. Biederman 提交于
      Take advantage of the fact that an explicit rtnl_kill_links is
      unnecessary (and skipping it improves batching), as network namespace
      exit calls dellink on all remaining virtual devices, and
      rtnl_link_unregister calls dellink on all outstanding devices in that
      network namespace.  To do this we need to leave the vlan proc
      directories in place until after network device exit time, which is
      done by using register_pernet_subsys instead of
      register_pernet_device.
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      91e2ff35
    • B
      atl1e: Remove non-implementation of ethtool set_msglevel() operation · 650de8de
      Ben Hutchings 提交于
      Unimplemented operations should not silently fail.
      Signed-off-by: NBen Hutchings <ben@decadent.org.uk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      650de8de
    • B
      atl1e: Remove redundant definitions of ethtool operations · 95fec168
      Ben Hutchings 提交于
      These functions provide the default behaviour and do not need to be
      set in struct ethtool_ops.
      Signed-off-by: NBen Hutchings <ben@decadent.org.uk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      95fec168
    • B
    • W
      TCPCT part 1g: Responder Cookie => Initiator · 4957faad
      William Allen Simpson 提交于
      Parse incoming TCP_COOKIE option(s).
      
      Calculate <SYN,ACK> TCP_COOKIE option.
      
      Send optional <SYN,ACK> data.
      
      This is a significantly revised implementation of an earlier (year-old)
      patch that no longer applies cleanly, with permission of the original
      author (Adam Langley):
      
          http://thread.gmane.org/gmane.linux.network/102586
      
      Requires:
         TCPCT part 1a: add request_values parameter for sending SYNACK
         TCPCT part 1b: generate Responder Cookie secret
         TCPCT part 1c: sysctl_tcp_cookie_size, socket option TCP_COOKIE_TRANSACTIONS
         TCPCT part 1d: define TCP cookie option, extend existing struct's
         TCPCT part 1e: implement socket option TCP_COOKIE_TRANSACTIONS
         TCPCT part 1f: Initiator Cookie => Responder
      
      Signed-off-by: William.Allen.Simpson@gmail.com
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4957faad
    • W
      TCPCT part 1f: Initiator Cookie => Responder · bd0388ae
      William Allen Simpson 提交于
      Calculate and format <SYN> TCP_COOKIE option.
      
      This is a significantly revised implementation of an earlier (year-old)
      patch that no longer applies cleanly, with permission of the original
      author (Adam Langley):
      
          http://thread.gmane.org/gmane.linux.network/102586
      
      Requires:
         TCPCT part 1c: sysctl_tcp_cookie_size, socket option TCP_COOKIE_TRANSACTIONS
         TCPCT part 1d: define TCP cookie option, extend existing struct's
      
      Signed-off-by: William.Allen.Simpson@gmail.com
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bd0388ae
    • W
      TCPCT part 1e: implement socket option TCP_COOKIE_TRANSACTIONS · e56fb50f
      William Allen Simpson 提交于
      Provide per socket control of the TCP cookie option and SYN/SYNACK data.
      
      This is a straightforward re-implementation of an earlier (year-old)
      patch that no longer applies cleanly, with permission of the original
      author (Adam Langley):
      
          http://thread.gmane.org/gmane.linux.network/102586
      
      The principle difference is using a TCP option to carry the cookie nonce,
      instead of a user configured offset in the data.
      
      Allocations have been rearranged to avoid requiring GFP_ATOMIC.
      
      Requires:
         net: TCP_MSS_DEFAULT, TCP_MSS_DESIRED
         TCPCT part 1c: sysctl_tcp_cookie_size, socket option TCP_COOKIE_TRANSACTIONS
         TCPCT part 1d: define TCP cookie option, extend existing struct's
      
      Signed-off-by: William.Allen.Simpson@gmail.com
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e56fb50f
    • W
      TCPCT part 1d: define TCP cookie option, extend existing struct's · 435cf559
      William Allen Simpson 提交于
      Data structures are carefully composed to require minimal additions.
      For example, the struct tcp_options_received cookie_plus variable fits
      between existing 16-bit and 8-bit variables, requiring no additional
      space (taking alignment into consideration).  There are no additions to
      tcp_request_sock, and only 1 pointer in tcp_sock.
      
      This is a significantly revised implementation of an earlier (year-old)
      patch that no longer applies cleanly, with permission of the original
      author (Adam Langley):
      
          http://thread.gmane.org/gmane.linux.network/102586
      
      The principle difference is using a TCP option to carry the cookie nonce,
      instead of a user configured offset in the data.  This is more flexible and
      less subject to user configuration error.  Such a cookie option has been
      suggested for many years, and is also useful without SYN data, allowing
      several related concepts to use the same extension option.
      
          "Re: SYN floods (was: does history repeat itself?)", September 9, 1996.
          http://www.merit.net/mail.archives/nanog/1996-09/msg00235.html
      
          "Re: what a new TCP header might look like", May 12, 1998.
          ftp://ftp.isi.edu/end2end/end2end-interest-1998.mail
      
      These functions will also be used in subsequent patches that implement
      additional features.
      
      Requires:
         TCPCT part 1a: add request_values parameter for sending SYNACK
         TCPCT part 1b: generate Responder Cookie secret
         TCPCT part 1c: sysctl_tcp_cookie_size, socket option TCP_COOKIE_TRANSACTIONS
      
      Signed-off-by: William.Allen.Simpson@gmail.com
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      435cf559
    • W
      TCPCT part 1c: sysctl_tcp_cookie_size, socket option TCP_COOKIE_TRANSACTIONS · 519855c5
      William Allen Simpson 提交于
      Define sysctl (tcp_cookie_size) to turn on and off the cookie option
      default globally, instead of a compiled configuration option.
      
      Define per socket option (TCP_COOKIE_TRANSACTIONS) for setting constant
      data values, retrieving variable cookie values, and other facilities.
      
      Move inline tcp_clear_options() unchanged from net/tcp.h to linux/tcp.h,
      near its corresponding struct tcp_options_received (prior to changes).
      
      This is a straightforward re-implementation of an earlier (year-old)
      patch that no longer applies cleanly, with permission of the original
      author (Adam Langley):
      
          http://thread.gmane.org/gmane.linux.network/102586
      
      These functions will also be used in subsequent patches that implement
      additional features.
      
      Requires:
         net: TCP_MSS_DEFAULT, TCP_MSS_DESIRED
      
      Signed-off-by: William.Allen.Simpson@gmail.com
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      519855c5
    • W
      TCPCT part 1b: generate Responder Cookie secret · da5c78c8
      William Allen Simpson 提交于
      Define (missing) hash message size for SHA1.
      
      Define hashing size constants specific to TCP cookies.
      
      Add new function: tcp_cookie_generator().
      
      Maintain global secret values for tcp_cookie_generator().
      
      This is a significantly revised implementation of earlier (15-year-old)
      Photuris [RFC-2522] code for the KA9Q cooperative multitasking platform.
      
      Linux RCU technique appears to be well-suited to this application, though
      neither of the circular queue items are freed.
      
      These functions will also be used in subsequent patches that implement
      additional features.
      
      Signed-off-by: William.Allen.Simpson@gmail.com
      Acked-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      da5c78c8