Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 12 Apr 2012 21:04:33 +0000 (14:04 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 12 Apr 2012 21:04:33 +0000 (14:04 -0700)
Pull networking fixes from David Miller:

 1) Fix bluetooth userland regression reported by Keith Packard, from
    Gustavo Padovan.

 2) Revert ath9k PS idle change, from Sujith Manoharan.

 3) Correct default TCP memory limits (again), from Eric Dumazet.

 4) Fix tcp_rcv_rtt_update() accidental use of unscaled RTT, from Neal
    Cardwell.

 5) We made a facility for layers like wireless to say how much tailroom
    they need in the SKB for link layer stuff such as wireless
    encryption etc., but TCP works hard to fill every SKB out to the end
    defeating this specification.

    This leads to every TCP packet getting reallocated by the wireless
    code in order to have the right amount of tailroom available.

    Fix TCP to only fill SKBs out to the real amount of data area it
    asked for during the allocation, this way it won't eat into the
    slack added for the device's tailroom needs.

    Reported by Marc Merlin and fixed by Eric Dumazet.

 6) Leaks, endian bugs, and new device IDs in bluetooth from Santosh
    Nayak, João Paulo Rechi Vita, Cho, Yu-Chen, Andrei Emeltchenko,
    AceLan Kao, and Andrei Emeltchenko.

 7) OOPS on tty_close fix in bluetooth's hci_ldisc from Johan Hovold.

 8) netfilter erroneously scales TCP window twice, fix from Changli Gao.

 9) Memleak fix in wext-core from Julia Lawall.

10) Consistently handle invalid TCP packets in ipv4 vs.  ipv6 conntrack,
    from Jozsef Kadlecsik.

11) Validate IP header length properly in netfilter conntrack's
    ipv4_get_l4proto().

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (39 commits)
  NFC: Fix the LLCP Tx fragmentation loop
  rtlwifi: Add missing DMA buffer unmapping for PCI drivers
  rtlwifi: Preallocate USB read buffers and eliminate kalloc in read routine
  tcp: avoid order-1 allocations on wifi and tx path
  net: allow pskb_expand_head() to get maximum tailroom
  bridge: Do not send queries on multicast group leaves
  MAINTAINERS: Mark NATSEMI driver as orphan'd.
  tcp: fix tcp_rcv_rtt_update() use of an unscaled RTT sample
  tcp: restore correct limit
  Revert "ath9k: fix going to full-sleep on PS idle"
  rt2x00: Fix rfkill_polling register function.
  bcma: fix build error on MIPS; implicit pcibios_enable_device
  netfilter: nf_conntrack: fix incorrect logic in nf_conntrack_init_net
  netfilter: nf_ct_ipv4: packets with wrong ihl are invalid
  netfilter: nf_ct_ipv4: handle invalid IPv4 and IPv6 packets consistently
  net/wireless/wext-core.c: add missing kfree
  rtlwifi: Fix oops on rate-control failure
  mac80211: Convert WARN_ON to WARN_ON_ONCE
  rtlwifi: rtl8192de: Fix firmware initialization
  nl80211: ensure interface is up in various APIs
  ...

1  2 
MAINTAINERS
net/ipv4/tcp.c
net/ipv4/tcp_input.c

diff --combined MAINTAINERS
@@@ -228,7 -228,7 +228,7 @@@ M: Len Brown <lenb@kernel.org
  L:    linux-acpi@vger.kernel.org
  W:    http://www.lesswatts.org/projects/acpi/
  Q:    http://patchwork.kernel.org/project/linux-acpi/list/
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6.git
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux
  S:    Supported
  F:    drivers/acpi/
  F:    drivers/pnp/pnpacpi/
@@@ -1521,8 -1521,8 +1521,8 @@@ M:      Gustavo Padovan <gustavo@padovan.org
  M:    Johan Hedberg <johan.hedberg@gmail.com>
  L:    linux-bluetooth@vger.kernel.org
  W:    http://www.bluez.org/
- T:    git git://git.kernel.org/pub/scm/linux/kernel/git/padovan/bluetooth.git
- T:    git git://git.kernel.org/pub/scm/linux/kernel/git/jh/bluetooth.git
+ T:    git git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth.git
+ T:    git git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git
  S:    Maintained
  F:    drivers/bluetooth/
  
@@@ -1532,8 -1532,8 +1532,8 @@@ M:      Gustavo Padovan <gustavo@padovan.org
  M:    Johan Hedberg <johan.hedberg@gmail.com>
  L:    linux-bluetooth@vger.kernel.org
  W:    http://www.bluez.org/
- T:    git git://git.kernel.org/pub/scm/linux/kernel/git/padovan/bluetooth.git
- T:    git git://git.kernel.org/pub/scm/linux/kernel/git/jh/bluetooth.git
+ T:    git git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth.git
+ T:    git git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git
  S:    Maintained
  F:    net/bluetooth/
  F:    include/net/bluetooth/
@@@ -2450,17 -2450,17 +2450,17 @@@ F:   fs/ecryptfs
  
  EDAC-CORE
  M:    Doug Thompson <dougthompson@xmission.com>
 -L:    bluesmoke-devel@lists.sourceforge.net (moderated for non-subscribers)
 +L:    linux-edac@vger.kernel.org
  W:    bluesmoke.sourceforge.net
  S:    Supported
  F:    Documentation/edac.txt
 -F:    drivers/edac/edac_*
 +F:    drivers/edac/
  F:    include/linux/edac.h
  
  EDAC-AMD64
  M:    Doug Thompson <dougthompson@xmission.com>
  M:    Borislav Petkov <borislav.petkov@amd.com>
 -L:    bluesmoke-devel@lists.sourceforge.net (moderated for non-subscribers)
 +L:    linux-edac@vger.kernel.org
  W:    bluesmoke.sourceforge.net
  S:    Supported
  F:    drivers/edac/amd64_edac*
  EDAC-E752X
  M:    Mark Gross <mark.gross@intel.com>
  M:    Doug Thompson <dougthompson@xmission.com>
 -L:    bluesmoke-devel@lists.sourceforge.net (moderated for non-subscribers)
 +L:    linux-edac@vger.kernel.org
  W:    bluesmoke.sourceforge.net
  S:    Maintained
  F:    drivers/edac/e752x_edac.c
  
  EDAC-E7XXX
  M:    Doug Thompson <dougthompson@xmission.com>
 -L:    bluesmoke-devel@lists.sourceforge.net (moderated for non-subscribers)
 +L:    linux-edac@vger.kernel.org
  W:    bluesmoke.sourceforge.net
  S:    Maintained
  F:    drivers/edac/e7xxx_edac.c
  
  EDAC-I82443BXGX
  M:    Tim Small <tim@buttersideup.com>
 -L:    bluesmoke-devel@lists.sourceforge.net (moderated for non-subscribers)
 +L:    linux-edac@vger.kernel.org
  W:    bluesmoke.sourceforge.net
  S:    Maintained
  F:    drivers/edac/i82443bxgx_edac.c
  
  EDAC-I3000
  M:    Jason Uhlenkott <juhlenko@akamai.com>
 -L:    bluesmoke-devel@lists.sourceforge.net (moderated for non-subscribers)
 +L:    linux-edac@vger.kernel.org
  W:    bluesmoke.sourceforge.net
  S:    Maintained
  F:    drivers/edac/i3000_edac.c
  
  EDAC-I5000
  M:    Doug Thompson <dougthompson@xmission.com>
 -L:    bluesmoke-devel@lists.sourceforge.net (moderated for non-subscribers)
 +L:    linux-edac@vger.kernel.org
  W:    bluesmoke.sourceforge.net
  S:    Maintained
  F:    drivers/edac/i5000_edac.c
@@@ -2525,21 -2525,21 +2525,21 @@@ F:   drivers/edac/i7core_edac.
  EDAC-I82975X
  M:    Ranganathan Desikan <ravi@jetztechnologies.com>
  M:    "Arvind R." <arvino55@gmail.com>
 -L:    bluesmoke-devel@lists.sourceforge.net (moderated for non-subscribers)
 +L:    linux-edac@vger.kernel.org
  W:    bluesmoke.sourceforge.net
  S:    Maintained
  F:    drivers/edac/i82975x_edac.c
  
  EDAC-PASEMI
  M:    Egor Martovetsky <egor@pasemi.com>
 -L:    bluesmoke-devel@lists.sourceforge.net (moderated for non-subscribers)
 +L:    linux-edac@vger.kernel.org
  W:    bluesmoke.sourceforge.net
  S:    Maintained
  F:    drivers/edac/pasemi_edac.c
  
  EDAC-R82600
  M:    Tim Small <tim@buttersideup.com>
 -L:    bluesmoke-devel@lists.sourceforge.net (moderated for non-subscribers)
 +L:    linux-edac@vger.kernel.org
  W:    bluesmoke.sourceforge.net
  S:    Maintained
  F:    drivers/edac/r82600_edac.c
@@@ -4533,8 -4533,7 +4533,7 @@@ S:      Supporte
  F:    drivers/net/ethernet/myricom/myri10ge/
  
  NATSEMI ETHERNET DRIVER (DP8381x)
- M:    Tim Hockin <thockin@hockin.org>
- S:    Maintained
+ S:    Orphan
  F:    drivers/net/ethernet/natsemi/natsemi.c
  
  NATIVE INSTRUMENTS USB SOUND INTERFACE DRIVER
@@@ -4803,7 -4802,6 +4802,7 @@@ F:      arch/arm/mach-omap2/clockdomain2xxx_
  F:    arch/arm/mach-omap2/clockdomain44xx.c
  
  OMAP AUDIO SUPPORT
 +M:    Peter Ujfalusi <peter.ujfalusi@ti.com>
  M:    Jarkko Nikula <jarkko.nikula@bitmer.com>
  L:    alsa-devel@alsa-project.org (subscribers-only)
  L:    linux-omap@vger.kernel.org
@@@ -7462,7 -7460,8 +7461,7 @@@ F:      include/linux/wm97xx.
  
  WOLFSON MICROELECTRONICS DRIVERS
  M:    Mark Brown <broonie@opensource.wolfsonmicro.com>
 -M:    Ian Lartey <ian@opensource.wolfsonmicro.com>
 -M:    Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
 +L:    patches@opensource.wolfsonmicro.com
  T:    git git://opensource.wolfsonmicro.com/linux-2.6-asoc
  T:    git git://opensource.wolfsonmicro.com/linux-2.6-audioplus
  W:    http://opensource.wolfsonmicro.com/content/linux-drivers-wolfson-devices
diff --combined net/ipv4/tcp.c
@@@ -701,11 -701,12 +701,12 @@@ struct sk_buff *sk_stream_alloc_skb(str
        skb = alloc_skb_fclone(size + sk->sk_prot->max_header, gfp);
        if (skb) {
                if (sk_wmem_schedule(sk, skb->truesize)) {
+                       skb_reserve(skb, sk->sk_prot->max_header);
                        /*
                         * Make sure that we have exactly size bytes
                         * available to the caller, no more, no less.
                         */
-                       skb_reserve(skb, skb_tailroom(skb) - size);
+                       skb->avail_size = size;
                        return skb;
                }
                __kfree_skb(skb);
@@@ -995,10 -996,9 +996,9 @@@ new_segment
                                copy = seglen;
  
                        /* Where to copy to? */
-                       if (skb_tailroom(skb) > 0) {
+                       if (skb_availroom(skb) > 0) {
                                /* We have some space in skb head. Superb! */
-                               if (copy > skb_tailroom(skb))
-                                       copy = skb_tailroom(skb);
+                               copy = min_t(int, copy, skb_availroom(skb));
                                err = skb_add_data_nocache(sk, skb, from, copy);
                                if (err)
                                        goto do_fault;
@@@ -1452,7 -1452,7 +1452,7 @@@ int tcp_recvmsg(struct kiocb *iocb, str
                if ((available < target) &&
                    (len > sysctl_tcp_dma_copybreak) && !(flags & MSG_PEEK) &&
                    !sysctl_tcp_low_latency &&
 -                  dma_find_channel(DMA_MEMCPY)) {
 +                  net_dma_find_channel()) {
                        preempt_enable_no_resched();
                        tp->ucopy.pinned_list =
                                        dma_pin_iovec_pages(msg->msg_iov, len);
@@@ -1667,7 -1667,7 +1667,7 @@@ do_prequeue
                if (!(flags & MSG_TRUNC)) {
  #ifdef CONFIG_NET_DMA
                        if (!tp->ucopy.dma_chan && tp->ucopy.pinned_list)
 -                              tp->ucopy.dma_chan = dma_find_channel(DMA_MEMCPY);
 +                              tp->ucopy.dma_chan = net_dma_find_channel();
  
                        if (tp->ucopy.dma_chan) {
                                tp->ucopy.dma_cookie = dma_skb_copy_datagram_iovec(
@@@ -3302,8 -3302,7 +3302,7 @@@ void __init tcp_init(void
  
        tcp_init_mem(&init_net);
        /* Set per-socket limits to no more than 1/128 the pressure threshold */
-       limit = nr_free_buffer_pages() << (PAGE_SHIFT - 10);
-       limit = max(limit, 128UL);
+       limit = nr_free_buffer_pages() << (PAGE_SHIFT - 7);
        max_share = min(4UL*1024*1024, limit);
  
        sysctl_tcp_wmem[0] = SK_MEM_QUANTUM;
diff --combined net/ipv4/tcp_input.c
@@@ -474,8 -474,11 +474,11 @@@ static void tcp_rcv_rtt_update(struct t
                if (!win_dep) {
                        m -= (new_sample >> 3);
                        new_sample += m;
-               } else if (m < new_sample)
-                       new_sample = m << 3;
+               } else {
+                       m <<= 3;
+                       if (m < new_sample)
+                               new_sample = m;
+               }
        } else {
                /* No previous measure. */
                new_sample = m << 3;
@@@ -5225,7 -5228,7 +5228,7 @@@ static int tcp_dma_try_early_copy(struc
                return 0;
  
        if (!tp->ucopy.dma_chan && tp->ucopy.pinned_list)
 -              tp->ucopy.dma_chan = dma_find_channel(DMA_MEMCPY);
 +              tp->ucopy.dma_chan = net_dma_find_channel();
  
        if (tp->ucopy.dma_chan && skb_csum_unnecessary(skb)) {