1. 13 7月, 2005 5 次提交
  2. 12 7月, 2005 1 次提交
  3. 11 7月, 2005 2 次提交
  4. 09 7月, 2005 2 次提交
    • D
      [IPV4]: multicast API "join" issues · ca9b907d
      David L Stevens 提交于
              This patch corrects a few problems with the IP_ADD_MEMBERSHIP
      socket option:
      
      1) The existing code makes an attempt at reference counting joins when
         using the ip_mreqn/imr_ifindex interface. Joining the same group
         on the same socket is an error, whatever the API. This leads to
         unexpected results when mixing ip_mreqn by index with ip_mreqn by
         address, ip_mreq, or other API's. For example, ip_mreq followed by
         ip_mreqn of the same group will "work" while the same two reversed
         will not.
                 Fixed to always return EADDRINUSE on a duplicate join and
         removed the (now unused) reference count in ip_mc_socklist.
      
      2) The group-search list in ip_mc_join_group() is comparing a full 
         ip_mreqn structure and all of it must match for it to find the
         group. This doesn't correctly match a group that was joined with
         ip_mreq or ip_mreqn with an address (with or without an index). It
         also doesn't match groups that are joined by different addresses on
         the same interface. All of these are the same multicast group,
         which is identified by group address and interface index.
                 Fixed the check to correctly match groups so we don't get
         duplicate group entries on the ip_mc_socklist.
      
      3) The old code allocates a multicast address before searching for
         duplicates requiring it to free in various error cases. This
         patch moves the allocate until after the search and
         igmp_max_memberships check, so never a need to allocate, then free
         an entry.
      Signed-off-by: NDavid L Stevens <dlstevens@us.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ca9b907d
    • V
      [NET]: Fix sparse warnings · 86a76caf
      Victor Fusco 提交于
      From: Victor Fusco <victor@cetuc.puc-rio.br>
      
      Fix the sparse warning "implicit cast to nocast type"
      Signed-off-by: NVictor Fusco <victor@cetuc.puc-rio.br>
      Signed-off-by: NDomen Puncer <domen@coderock.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      86a76caf
  5. 08 7月, 2005 14 次提交
  6. 07 7月, 2005 5 次提交
  7. 06 7月, 2005 6 次提交
    • R
      [PATCH] kprobes: fix namespace problem and sparc64 build · 6772926b
      Rusty Lynch 提交于
      The following renames arch_init, a kprobes function for performing any
      architecture specific initialization, to arch_init_kprobes in order to
      cleanup the namespace.
      
      Also, this patch adds arch_init_kprobes to sparc64 to fix the sparc64 kprobes
      build from the last return probe patch.
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      6772926b
    • D
      [TCP]: Move to new TSO segmenting scheme. · c1b4a7e6
      David S. Miller 提交于
      Make TSO segment transmit size decisions at send time not earlier.
      
      The basic scheme is that we try to build as large a TSO frame as
      possible when pulling in the user data, but the size of the TSO frame
      output to the card is determined at transmit time.
      
      This is guided by tp->xmit_size_goal.  It is always set to a multiple
      of MSS and tells sendmsg/sendpage how large an SKB to try and build.
      
      Later, tcp_write_xmit() and tcp_push_one() chop up the packet if
      necessary and conditions warrant.  These routines can also decide to
      "defer" in order to wait for more ACKs to arrive and thus allow larger
      TSO frames to be emitted.
      
      A general observation is that TSO elongates the pipe, thus requiring a
      larger congestion window and larger buffering especially at the sender
      side.  Therefore, it is important that applications 1) get a large
      enough socket send buffer (this is accomplished by our dynamic send
      buffer expansion code) 2) do large enough writes.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c1b4a7e6
    • C
      [SHAPER]: Switch to spinlocks. · bc971dee
      Christoph Hellwig 提交于
      Dave, you were right and the sleeping locks in shaper were
      broken. Markus Kanet noticed this and also tested the patch below that
      switches locking to spinlocks.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bc971dee
    • T
      [NET]: Reduce size of sk_buff by 4 bytes · 1cbb3380
      Thomas Graf 提交于
      Reduce local_df to a bit field and ip_summed to a 2 bits
      field thus saving 13 bits. Move bit fields, packet type,
      and protocol into the spare area between the priority
      and the destructor. Saves 4 bytes on both, 32bit and
      64bit architectures.
      Signed-off-by: NThomas Graf <tgraf@suug.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1cbb3380
    • T
      [NET]: Remove unused security member in sk_buff · e176fe89
      Thomas Graf 提交于
      Signed-off-by: NThomas Graf <tgraf@suug.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e176fe89
    • P
      [NET]: Fix signedness issues in net/core/filter.c · 55820ee2
      Patrick McHardy 提交于
      This is the code to load packet data into a register:
      
                              k = fentry->k;
                              if (k < 0) {
      ...
                              } else {
                                      u32 _tmp, *p;
                                      p = skb_header_pointer(skb, k, 4, &_tmp);
                                      if (p != NULL) {
                                              A = ntohl(*p);
                                              continue;
                                      }
                              }
      
      skb_header_pointer checks if the requested data is within the
      linear area:
      
              int hlen = skb_headlen(skb);
      
              if (offset + len <= hlen)
                      return skb->data + offset;
      
      When offset is within [INT_MAX-len+1..INT_MAX] the addition will
      result in a negative number which is <= hlen.
      
      I couldn't trigger a crash on my AMD64 with 2GB of memory, but a
      coworker tried on his x86 machine and it crashed immediately.
      
      This patch fixes the check in skb_header_pointer to handle large
      positive offsets similar to skb_copy_bits. Invalid data can still
      be accessed using negative offsets (also similar to skb_copy_bits),
      anyone using negative offsets needs to verify them himself.
      
      Thanks to Thomas Vögtle <thomas.voegtle@coreworks.de> for verifying the
      problem by crashing his machine and providing me with an Oops.
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Acked-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      55820ee2
  8. 05 7月, 2005 1 次提交
    • R
      [SPARC64/COMPAT]: Add some compat ioctl for ppdev · e7270dec
      Raphael Assenat 提交于
      The following patch adds some ioctls to include/linux/compat_ioctl.h
      to allow using ppdev from the 32 bit user space on sparc64.
      
      This patch also adds the PPDEV option in the sparc64 menu, near Parallel
      printer support in the 'General machine setup' submenu.
      
      All those ioctls seem to be compatible, since (correct me if I'm wrong)
      they dont use the 'long' type. See include/linux/ppdev.h.
      
      The application I used to test the new ioctls only used the following:
      PPEXCL
      PPCLAIM
      PPNEGOT
      PPGETMODES
      PPRCONTROL
      PPWCONTROL
      PPDATADIR
      PPWDATA
      PPRDATA
      
      But I beleive that the other ioctls will work fine.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e7270dec
  9. 03 7月, 2005 1 次提交
  10. 02 7月, 2005 2 次提交
    • G
      [PATCH] PCI: clean up dynamic pci id logic · 75865858
      Greg Kroah-Hartman 提交于
      The dynamic pci id logic has been bothering me for a while, and now that
      I started to look into how to move some of this to the driver core, I
      thought it was time to clean it all up.
      
      It ends up making the code smaller, and easier to follow, and fixes a
      few bugs at the same time (dynamic ids were not being matched
      everywhere, and so could be missed on some call paths for new devices,
      semaphore not needed to be grabbed when adding a new id and calling the
      driver core, etc.)
      
      I also renamed the function pci_match_device() to pci_match_id() as
      that's what it really does.
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      75865858
    • R
      [PATCH] PCI: Increase the number of PCI bus resources · a03fa955
      rajesh.shah@intel.com 提交于
      This patch increases the number of resource pointers in the
      pci_bus structure. This is needed to store >4 resource ranges
      for host bridges and transparent PCI bridges. With this change,
      all PCI buses will have more resource pointers, but most PCI
      buses will only use the first 3 or 4, the remaining being NULL.
      The PCI core already deals with this correctly.
      Signed-off-by: NRajesh Shah <rajesh.shah@intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      a03fa955
  11. 30 6月, 2005 1 次提交