Skip to content
  1. Jan 31, 2009
  2. Jan 30, 2009
  3. Jan 28, 2009
  4. Jan 27, 2009
    • Dimitris Michailidis's avatar
      tcp: Fix length tcp_splice_data_recv passes to skb_splice_bits. · 9fa5fdf2
      Dimitris Michailidis authored
      
      
      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: default avatarDimitris Michailidis <dm@chelsio.com>
      Acked-by: default avatarEric Dumazet <dada1@cosmosbay.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9fa5fdf2
    • Manish Katiyar's avatar
      r6040: Remove unused variable pdev from drivers/net/r6040.c · a7a41acf
      Manish Katiyar authored
      
      
      drivers/net/r6040.c:441: warning: unused variable 'pdev'
      
      Signed-off-by: default avatarManish Katiyar <mkatiyar@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a7a41acf
    • Eric Dumazet's avatar
      udp: optimize bind(0) if many ports are in use · 98322f22
      Eric Dumazet authored
      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: default avatarVitaly Mayatskikh <v.mayatskih@gmail.com>
      Signed-off-by: default avatarEric Dumazet <dada1@cosmosbay.com>
      Tested-by: default avatarVitaly Mayatskikh <v.mayatskih@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      98322f22
    • Ira W. Snyder's avatar
      virtio_net: use correct accessors for scatterlists · 8527bec5
      Ira W. Snyder authored
      
      
      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: default avatarIra W. Snyder <iws@ovro.caltech.edu>
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8527bec5
    • Linus Torvalds's avatar
      Merge master.kernel.org:/home/rmk/linux-2.6-arm · 53760710
      Linus Torvalds authored
      * 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
    • Linus Torvalds's avatar
      Merge branch 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6 · cfb901bf
      Linus Torvalds authored
      * 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6:
        i2c: Warn on deprecated binding model use
        eeprom: More consistent symbol names
        eeprom: Move 93cx6 eeprom driver to /drivers/misc/eeprom
        spi: Move at25 (for SPI eeproms) to /drivers/misc/eeprom
        i2c: Move old eeprom driver to /drivers/misc/eeprom
        i2c: Move at24 to drivers/misc/eeprom
        i2c: Quilt tree has moved
        i2c: Delete many unused adapter IDs
        i2c: Delete 10 unused driver IDs
      cfb901bf
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes · 2034563c
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes:
        kbuild: fix kbuild.txt typos
        kbuild: print usage with no arguments in scripts/config
        Revert "kbuild: strip generated symbols from *.ko"
      2034563c
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 · 924d26df
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (92 commits)
        gianfar: Revive VLAN support
        vlan: Export symbols as non GPL symbols.
        bnx2x: tx_has_work should not wait for FW
        netxen: reduce memory footprint
        netxen: fix vlan tso/checksum offload
        net: Fix linux/if_frad.h's suitability for userspace.
        net: Move config NET_NS to from net/Kconfig to init/Kconfig
        isdn: Fix missing ifdef in isdn_ppp
        networking: document "nc" in addition to "netcat" in netconsole.txt
        e1000e: workaround hw errata
        af_key: initialize xfrm encap_oa
        virtio_net: Fix MAX_PACKET_LEN to support 802.1Q VLANs
        lcs: fix compilation for !CONFIG_IP_MULTICAST
        rtl8187: Add termination packet to prevent stall
        iwlwifi: fix rs_get_rate WARN_ON()
        p54usb: fix packet loss with first generation devices
        sctp: Fix another socket race during accept/peeloff
        sctp: Properly timestamp outgoing data chunks for rtx purposes
        sctp: Correctly start rtx timer on new packet transmissions.
        sctp: Fix crc32c calculations on big-endian arhes.
        ...
      924d26df
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6 · 66673f13
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
        sparc64: Fix DAX handling via userspace access from kernel.
        sparc64: Annotate sparc64 specific syscalls with SYSCALL_DEFINEx()
        [CVE-2009-0029] sparc: Enable syscall wrappers for 64-bit
        sparc64: Initialize FHC/CLOCK LED platform_device 'id' field correctly.
        sparc64: fix modpost failure
        sparc64: fix readout of cpu/fpu type
      66673f13
    • Anton Vorontsov's avatar
      gianfar: Revive VLAN support · cd1f55a5
      Anton Vorontsov authored
      commit 77ecaf2d
      
       ("gianfar: Fix VLAN
      HW feature related frame/buffer size calculation") wrongly removed
      priv->vlgrp assignment, and now priv->vlgrp is always NULL.
      
      This patch fixes the issue, plus fixes following sparse warning
      introduced by the same commit:
      gianfar.c:1406:13: warning: context imbalance in 'gfar_vlan_rx_register' - wrong count at exit
      
      gfar_vlan_rx_register() checks for "if (old_grp == grp)" and tries
      to return w/o dropping the lock.
      
      According to net/8021q/vlan.c VLAN core issues rx_register() callback:
      1. In register_vlan_dev() only on a newly created group;
      2. In unregister_vlan_dev() only if the group becomes empty.
      
      Thus the check in the gianfar driver isn't needed.
      
      Signed-off-by: default avatarAnton Vorontsov <avorontsov@ru.mvista.com>
      Acked-by: default avatarAndy Fleming <afleming@freescale.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cd1f55a5
    • Ben Greear's avatar
      vlan: Export symbols as non GPL symbols. · 116cb428
      Ben Greear authored
      
      
      In previous kernels, any kernel module could get access to the
      'real-device' and the VLAN-ID for a particular VLAN.  In more recent
      kernels, the code was restructured such that this is hard to do
      without accessing private .h files for any module that cannot use
      GPL-only symbols.
      
      Attached is a patch to once again allow non-GPL modules the ability to
      access the real-device and VLAN id for VLANs.
      
      Signed-off-by: default avatarBen Greear <greearb@candelatech.com>
      Acked-by: default avatarPatrick McHardy <kaber@trash.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      116cb428