1. 31 1月, 2009 9 次提交
  2. 30 1月, 2009 21 次提交
  3. 28 1月, 2009 5 次提交
  4. 27 1月, 2009 5 次提交
    • D
      tcp: Fix length tcp_splice_data_recv passes to skb_splice_bits. · 9fa5fdf2
      Dimitris Michailidis 提交于
      tcp_splice_data_recv has two lengths to consider: the len parameter it
      gets from tcp_read_sock, which specifies the amount of data in the skb,
      and rd_desc->count, which is the amount of data the splice caller still
      wants.  Currently it passes just the latter to skb_splice_bits, which then
      splices min(rd_desc->count, skb->len - offset) bytes.
      
      Most of the time this is fine, except when the skb contains urgent data.
      In that case len goes only up to the urgent byte and is less than
      skb->len - offset.  By ignoring len tcp_splice_data_recv may a) splice
      data tcp_read_sock told it not to, b) return to tcp_read_sock a value > len.
      
      Now, tcp_read_sock doesn't handle used > len and leaves the socket in a
      bad state (both sk_receive_queue and copied_seq are bad at that point)
      resulting in duplicated data and corruption.
      
      Fix by passing min(rd_desc->count, len) to skb_splice_bits.
      Signed-off-by: NDimitris Michailidis <dm@chelsio.com>
      Acked-by: NEric Dumazet <dada1@cosmosbay.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9fa5fdf2
    • M
      r6040: Remove unused variable pdev from drivers/net/r6040.c · a7a41acf
      Manish Katiyar 提交于
      drivers/net/r6040.c:441: warning: unused variable 'pdev'
      Signed-off-by: NManish Katiyar <mkatiyar@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a7a41acf
    • E
      udp: optimize bind(0) if many ports are in use · 98322f22
      Eric Dumazet 提交于
      commit 9088c560
      (udp: Improve port randomization) introduced a regression for UDP bind() syscall
      to null port (getting a random port) in case lot of ports are already in use.
      
      This is because we do about 28000 scans of very long chains (220 sockets per chain),
      with many spin_lock_bh()/spin_unlock_bh() calls.
      
      Fix this using a bitmap (64 bytes for current value of UDP_HTABLE_SIZE)
      so that we scan chains at most once.
      
      Instead of 250 ms per bind() call, we get after patch a time of 2.9 ms 
      
      Based on a report from Vitaly Mayatskikh
      Reported-by: NVitaly Mayatskikh <v.mayatskih@gmail.com>
      Signed-off-by: NEric Dumazet <dada1@cosmosbay.com>
      Tested-by: NVitaly Mayatskikh <v.mayatskih@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      98322f22
    • I
      virtio_net: use correct accessors for scatterlists · 8527bec5
      Ira W. Snyder 提交于
      Without this fix, virtio_net makes incorrect usage of scatterlists. It sets
      the end of the scatterlist chain after the first element, despite the fact
      that more entries come after it.
      
      If you try to run dma_map_sg() on one of the scatterlists given to you by
      add_buf(), you will get a null pointer oops.
      Signed-off-by: NIra W. Snyder <iws@ovro.caltech.edu>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8527bec5
    • L
      Merge master.kernel.org:/home/rmk/linux-2.6-arm · 53760710
      Linus Torvalds 提交于
      * master.kernel.org:/home/rmk/linux-2.6-arm: (22 commits)
        [ARM] fix section-based ioremap
        [NET] am79c961a: fix spin_lock usage
        [ARM] omap: usb: thou shalt not provide empty release functions
        [ARM] omap: watchdog: allow OMAP watchdog driver on OMAP34xx platforms
        [ARM] 5369/1: omap mmc: Add new omap hsmmc controller for 2430 and 34xx, v3
        [ARM] clkdev: fix clock matching
        [ARM] 5370/1: at91: fix rm9200 watchdog
        [ARM] 5368/1: arch/arm/mach-davinci/usb.c buildfix
        [ARM] 5365/1: s3cmci: Use new include path of dma.h
        [ARM] fix StrongARM-11x0 page copy implementation
        [ARM] omap: ensure OMAP drivers pass a struct device to clk_get()
        ARM: OMAP: Fix compile for h3 MMC
        ARM: OMAP: Remove unused platform devices, v3
        ARM: OMAP: Fix ASoC by enabling writes to XCCR and RCCR McBSP registers, v3
        ARM: OMAP: Fix OSK ASoC by registering I2C board info for tlvaic23
        ARM: OMAP: remove duplicated #include's
        ARM: OMAP: Fix DMA CCR programming for request line > 63, v3
        ARM: OMAP: Fix gpio.c compile on 15xx with CONFIG_DEBUGFS
        ARM: OMAP: Fix compile for beagle
        ARM: OMAP: Fix gpio by switching to generic gpio calls, v2
        ...
      53760710