commit 8a987612af206835d6664c9c1389cee4a485b389
Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date:   Thu Jun 27 11:28:07 2013 -0700

    Linux 3.4.51

commit 3c103fee36561149e04587684e068a2854ba6e5b
Author: Zhao Hongjiang <zhaohongjiang@huawei.com>
Date:   Tue Apr 30 15:26:46 2013 -0700

    inotify: invalid mask should return a error number but not set it
    
    commit 04df32fa10ab9a6f0643db2949d42efc966bc844 upstream.
    
    When we run the crackerjack testsuite, the inotify_add_watch test is
    stalled.
    
    This is caused by the invalid mask 0 - the task is waiting for the event
    but it never comes.  inotify_add_watch() should return -EINVAL as it did
    before commit 676a0675cf92 ("inotify: remove broken mask checks causing
    unmount to be EINVAL").  That commit removes the invalid mask check, but
    that check is needed.
    
    Check the mask's ALL_INOTIFY_BITS before the inotify_arg_to_mask() call.
    If none are set, just return -EINVAL.
    
    Because IN_UNMOUNT is in ALL_INOTIFY_BITS, this change will not trigger
    the problem that above commit fixed.
    
    [akpm@linux-foundation.org: fix build]
    Signed-off-by: Zhao Hongjiang <zhaohongjiang@huawei.com>
    Acked-by: Jim Somerville <Jim.Somerville@windriver.com>
    Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
    Cc: Jerome Marchand <jmarchan@redhat.com>
    Cc: Eric Paris <eparis@parisplace.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 4c3017e4b2d21feed4a510c1ee69aa77d2384493
Author: Joern Engel <joern@logfs.org>
Date:   Thu May 30 16:36:51 2013 -0400

    target/iscsi: don't corrupt bh_count in iscsit_stop_time2retain_timer()
    
    commit 574780fd5e6ec52bd43e0bdb777a19e4c4c6aa9c upstream.
    
    Here is a fun one.  Bug seems to have been introduced by commit 140854cb,
    almost two years ago.  I have no idea why we only started seeing it now,
    but we did.
    
    Rough callgraph:
    core_tpg_set_initiator_node_queue_depth()
    `-> spin_lock_irqsave(&tpg->session_lock, flags);
    `-> lio_tpg_shutdown_session()
        `-> iscsit_stop_time2retain_timer()
            `-> spin_unlock_bh(&se_tpg->session_lock);
            `-> spin_lock_bh(&se_tpg->session_lock);
    `-> spin_unlock_irqrestore(&tpg->session_lock, flags);
    
    core_tpg_set_initiator_node_queue_depth() used to call spin_lock_bh(),
    but 140854cb changed that to spin_lock_irqsave().  However,
    lio_tpg_shutdown_session() still claims to be called with spin_lock_bh()
    held, as does iscsit_stop_time2retain_timer():
     *      Called with spin_lock_bh(&struct se_portal_group->session_lock) held
    
    Stale documentation is mostly annoying, but in this case the dropping
    the lock with the _bh variant is plain wrong.  It is also wrong to drop
    locks two functions below the lock-holder, but I will ignore that bit
    for now.
    
    After some more locking and unlocking we eventually hit this backtrace:
    ------------[ cut here ]------------
    WARNING: at kernel/softirq.c:159 local_bh_enable_ip+0xe8/0x100()
    Pid: 24645, comm: lio_helper.py Tainted: G           O 3.6.11+
    Call Trace:
     [<ffffffff8103e5ff>] warn_slowpath_common+0x7f/0xc0
     [<ffffffffa040ae37>] ? iscsit_inc_conn_usage_count+0x37/0x50 [iscsi_target_mod]
     [<ffffffff8103e65a>] warn_slowpath_null+0x1a/0x20
     [<ffffffff810472f8>] local_bh_enable_ip+0xe8/0x100
     [<ffffffff815b8365>] _raw_spin_unlock_bh+0x15/0x20
     [<ffffffffa040ae37>] iscsit_inc_conn_usage_count+0x37/0x50 [iscsi_target_mod]
     [<ffffffffa041149a>] iscsit_stop_session+0xfa/0x1c0 [iscsi_target_mod]
     [<ffffffffa0417fab>] lio_tpg_shutdown_session+0x7b/0x90 [iscsi_target_mod]
     [<ffffffffa033ede4>] core_tpg_set_initiator_node_queue_depth+0xe4/0x290 [target_core_mod]
     [<ffffffffa0409032>] iscsit_tpg_set_initiator_node_queue_depth+0x12/0x20 [iscsi_target_mod]
     [<ffffffffa0415c29>] lio_target_nacl_store_cmdsn_depth+0xa9/0x180 [iscsi_target_mod]
     [<ffffffffa0331b49>] target_fabric_nacl_base_attr_store+0x39/0x40 [target_core_mod]
     [<ffffffff811b857d>] configfs_write_file+0xbd/0x120
     [<ffffffff81148f36>] vfs_write+0xc6/0x180
     [<ffffffff81149251>] sys_write+0x51/0x90
     [<ffffffff815c0969>] system_call_fastpath+0x16/0x1b
    ---[ end trace 3747632b9b164652 ]---
    
    As a pure band-aid, this patch drops the _bh.
    
    Signed-off-by: Joern Engel <joern@logfs.org>
    Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>

commit 14a940f54732e81466120a0cf55035df72745ce6
Author: Anders Hammarquist <iko@iko.pp.se>
Date:   Wed Jun 19 01:45:48 2013 +0200

    USB: serial: ti_usb_3410_5052: new device id for Abbot strip port cable
    
    commit 35a2fbc941accd0e9f1bfadd669311786118d874 upstream.
    
    Add product id for Abbott strip port cable for Precision meter which
    uses the TI 3410 chip.
    
    Signed-off-by: Anders Hammarquist <iko@iko.pp.se>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 8c428c194065e000d4138123f147bc74f7532bbc
Author: Ferruh Yigit <fery@cypress.com>
Date:   Thu May 23 09:56:55 2013 -0700

    Input: cyttsp - fix memcpy size param
    
    commit d2983cdb480157f637df07723f28aaa657b1080d upstream.
    
    memcpy param is wrong because of offset in bl_cmd, this may corrupt the
    stack which may cause a crash.
    
    Tested-by: Ferruh Yigit <fery@cypress.com> on TMA300-DVK
    Signed-off-by: Ferruh Yigit <fery@cypress.com>
    Acked-by: Javier Martinez Canillas <javier@dowhile0.org>
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 322130dea90940d65b811bd67790aecf86e6340f
Author: Zheng Li <zheng.x.li@oracle.com>
Date:   Wed Jun 19 00:53:47 2013 -0700

    bonding: rlb mode of bond should not alter ARP originating via bridge
    
    [ Upstream commit 567b871e503316b0927e54a3d7c86d50b722d955 ]
    
    Do not modify or load balance ARP packets passing through balance-alb
    mode (wherein the ARP did not originate locally, and arrived via a bridge).
    
    Modifying pass-through ARP replies causes an incorrect MAC address
    to be placed into the ARP packet, rendering peers unable to communicate
    with the actual destination from which the ARP reply originated.
    
    Load balancing pass-through ARP requests causes an entry to be
    created for the peer in the rlb table, and bond_alb_monitor will
    occasionally issue ARP updates to all peers in the table instrucing them
    as to which MAC address they should communicate with; this occurs when
    some event sets rx_ntt.  In the bridged case, however, the MAC address
    used for the update would be the MAC of the slave, not the actual source
    MAC of the originating destination.  This would render peers unable to
    communicate with the destinations beyond the bridge.
    
    Signed-off-by: Zheng Li <zheng.x.li@oracle.com>
    Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Matthew O'Connor <liquidhorse@gmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 137b5d870487b1fd75a7aca5aab781747615d367
Author: Guillaume Nault <g.nault@alphalink.fr>
Date:   Wed Jun 12 16:07:36 2013 +0200

    l2tp: Fix sendmsg() return value
    
    [ Upstream commit a6f79d0f26704214b5b702bbac525cb72997f984 ]
    
    PPPoL2TP sockets should comply with the standard send*() return values
    (i.e. return number of bytes sent instead of 0 upon success).
    
    Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 3bf35eb3ed7e643b9562cf05b919b281e0f1b79a
Author: Guillaume Nault <g.nault@alphalink.fr>
Date:   Wed Jun 12 16:07:23 2013 +0200

    l2tp: Fix PPP header erasure and memory leak
    
    [ Upstream commit 55b92b7a11690bc377b5d373872a6b650ae88e64 ]
    
    Copy user data after PPP framing header. This prevents erasure of the
    added PPP header and avoids leaking two bytes of uninitialised memory
    at the end of skb's data buffer.
    
    Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 991e73ccb5a0499588565dd8b9fd06c4bd6bce81
Author: Daniel Borkmann <dborkman@redhat.com>
Date:   Wed Jun 12 16:02:27 2013 +0200

    packet: packet_getname_spkt: make sure string is always 0-terminated
    
    [ Upstream commit 2dc85bf323515e59e15dfa858d1472bb25cad0fe ]
    
    uaddr->sa_data is exactly of size 14, which is hard-coded here and
    passed as a size argument to strncpy(). A device name can be of size
    IFNAMSIZ (== 16), meaning we might leave the destination string
    unterminated. Thus, use strlcpy() and also sizeof() while we're
    at it. We need to memset the data area beforehand, since strlcpy
    does not padd the remaining buffer with zeroes for user space, so
    that we do not possibly leak anything.
    
    Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit a50ebefd35d237b3a6112e5fbea6d55e7ae4b509
Author: Jiri Pirko <jiri@resnulli.us>
Date:   Sat Jun 8 15:00:53 2013 +0200

    team: check return value of team_get_port_by_index_rcu() for NULL
    
    [ Upstream commit 76c455decbbad31de21c727edb184a963f42b40b ]
    
    team_get_port_by_index_rcu() might return NULL due to race between port
    removal and skb tx path. Panic is easily triggeable when txing packets
    and adding/removing port in a loop.
    
    introduced by commit 3d249d4ca "net: introduce ethernet teaming device"
    and commit 753f993911b "team: introduce random mode" (for random mode)
    
    Signed-off-by: Jiri Pirko <jiri@resnulli.us>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 93f75344976da9eb5f411312d2d46d37d9223fd2
Author: Daniel Borkmann <dborkman@redhat.com>
Date:   Thu Jun 6 15:53:47 2013 +0200

    net: sctp: fix NULL pointer dereference in socket destruction
    
    [ Upstream commit 1abd165ed757db1afdefaac0a4bc8a70f97d258c ]
    
    While stress testing sctp sockets, I hit the following panic:
    
    BUG: unable to handle kernel NULL pointer dereference at 0000000000000020
    IP: [<ffffffffa0490c4e>] sctp_endpoint_free+0xe/0x40 [sctp]
    PGD 7cead067 PUD 7ce76067 PMD 0
    Oops: 0000 [#1] SMP
    Modules linked in: sctp(F) libcrc32c(F) [...]
    CPU: 7 PID: 2950 Comm: acc Tainted: GF            3.10.0-rc2+ #1
    Hardware name: Dell Inc. PowerEdge T410/0H19HD, BIOS 1.6.3 02/01/2011
    task: ffff88007ce0e0c0 ti: ffff88007b568000 task.ti: ffff88007b568000
    RIP: 0010:[<ffffffffa0490c4e>]  [<ffffffffa0490c4e>] sctp_endpoint_free+0xe/0x40 [sctp]
    RSP: 0018:ffff88007b569e08  EFLAGS: 00010292
    RAX: 0000000000000000 RBX: ffff88007db78a00 RCX: dead000000200200
    RDX: ffffffffa049fdb0 RSI: ffff8800379baf38 RDI: 0000000000000000
    RBP: ffff88007b569e18 R08: ffff88007c230da0 R09: 0000000000000001
    R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
    R13: ffff880077990d00 R14: 0000000000000084 R15: ffff88007db78a00
    FS:  00007fc18ab61700(0000) GS:ffff88007fc60000(0000) knlGS:0000000000000000
    CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
    CR2: 0000000000000020 CR3: 000000007cf9d000 CR4: 00000000000007e0
    DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
    Stack:
     ffff88007b569e38 ffff88007db78a00 ffff88007b569e38 ffffffffa049fded
     ffffffff81abf0c0 ffff88007db78a00 ffff88007b569e58 ffffffff8145b60e
     0000000000000000 0000000000000000 ffff88007b569eb8 ffffffff814df36e
    Call Trace:
     [<ffffffffa049fded>] sctp_destroy_sock+0x3d/0x80 [sctp]
     [<ffffffff8145b60e>] sk_common_release+0x1e/0xf0
     [<ffffffff814df36e>] inet_create+0x2ae/0x350
     [<ffffffff81455a6f>] __sock_create+0x11f/0x240
     [<ffffffff81455bf0>] sock_create+0x30/0x40
     [<ffffffff8145696c>] SyS_socket+0x4c/0xc0
     [<ffffffff815403be>] ? do_page_fault+0xe/0x10
     [<ffffffff8153cb32>] ? page_fault+0x22/0x30
     [<ffffffff81544e02>] system_call_fastpath+0x16/0x1b
    Code: 0c c9 c3 66 2e 0f 1f 84 00 00 00 00 00 e8 fb fe ff ff c9 c3 66 0f
          1f 84 00 00 00 00 00 55 48 89 e5 53 48 83 ec 08 66 66 66 66 90 <48>
          8b 47 20 48 89 fb c6 47 1c 01 c6 40 12 07 e8 9e 68 01 00 48
    RIP  [<ffffffffa0490c4e>] sctp_endpoint_free+0xe/0x40 [sctp]
     RSP <ffff88007b569e08>
    CR2: 0000000000000020
    ---[ end trace e0d71ec1108c1dd9 ]---
    
    I did not hit this with the lksctp-tools functional tests, but with a
    small, multi-threaded test program, that heavily allocates, binds,
    listens and waits in accept on sctp sockets, and then randomly kills
    some of them (no need for an actual client in this case to hit this).
    Then, again, allocating, binding, etc, and then killing child processes.
    
    This panic then only occurs when ``echo 1 > /proc/sys/net/sctp/auth_enable''
    is set. The cause for that is actually very simple: in sctp_endpoint_init()
    we enter the path of sctp_auth_init_hmacs(). There, we try to allocate
    our crypto transforms through crypto_alloc_hash(). In our scenario,
    it then can happen that crypto_alloc_hash() fails with -EINTR from
    crypto_larval_wait(), thus we bail out and release the socket via
    sk_common_release(), sctp_destroy_sock() and hit the NULL pointer
    dereference as soon as we try to access members in the endpoint during
    sctp_endpoint_free(), since endpoint at that time is still NULL. Now,
    if we have that case, we do not need to do any cleanup work and just
    leave the destruction handler.
    
    Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
    Acked-by: Neil Horman <nhorman@tuxdriver.com>
    Acked-by: Vlad Yasevich <vyasevich@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 2f4997c908d217048a3136224c6bb83afbcb8a1e
Author: Gao feng <gaofeng@cn.fujitsu.com>
Date:   Sun Jun 2 22:16:21 2013 +0000

    ipv6: assign rt6_info to inet6_ifaddr in init_loopback
    
    [ Upstream commit 534c877928a16ae5f9776436a497109639bf67dc ]
    
    Commit 25fb6ca4ed9cad72f14f61629b68dc03c0d9713f
    "net IPv6 : Fix broken IPv6 routing table after loopback down-up"
    forgot to assign rt6_info to the inet6_ifaddr.
    When disable the net device, the rt6_info which allocated
    in init_loopback will not be destroied in __ipv6_ifa_notify.
    
    This will trigger the waring message below
    [23527.916091] unregister_netdevice: waiting for tap0 to become free. Usage count = 1
    
    Reported-by: Arkadiusz Miskiewicz <a.miskiewicz@gmail.com>
    Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 689ec1227270c5b3f009b82fb32d902717a0a03e
Author: Eric Dumazet <eric.dumazet@gmail.com>
Date:   Wed May 29 09:06:27 2013 +0000

    net: force a reload of first item in hlist_nulls_for_each_entry_rcu
    
    [ Upstream commit c87a124a5d5e8cf8e21c4363c3372bcaf53ea190 ]
    
    Roman Gushchin discovered that udp4_lib_lookup2() was not reloading
    first item in the rcu protected list, in case the loop was restarted.
    
    This produced soft lockups as in https://lkml.org/lkml/2013/4/16/37
    
    rcu_dereference(X)/ACCESS_ONCE(X) seem to not work as intended if X is
    ptr->field :
    
    In some cases, gcc caches the value or ptr->field in a register.
    
    Use a barrier() to disallow such caching, as documented in
    Documentation/atomic_ops.txt line 114
    
    Thanks a lot to Roman for providing analysis and numerous patches.
    
    Diagnosed-by: Roman Gushchin <klamm@yandex-team.ru>
    Signed-off-by: Eric Dumazet <edumazet@google.com>
    Reported-by: Boris Zhmurov <zhmurov@yandex-team.ru>
    Signed-off-by: Roman Gushchin <klamm@yandex-team.ru>
    Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit c0cc94f2f65a682827cca2a79a4d045a20f8897f
Author: Andy Lutomirski <luto@amacapital.net>
Date:   Wed May 22 14:07:44 2013 -0700

    net: Block MSG_CMSG_COMPAT in send(m)msg and recv(m)msg
    
    [ Upstream commits 1be374a0518a288147c6a7398792583200a67261 and
      a7526eb5d06b0084ef12d7b168d008fcf516caab ]
    
    MSG_CMSG_COMPAT is (AFAIK) not intended to be part of the API --
    it's a hack that steals a bit to indicate to other networking code
    that a compat entry was used.  So don't allow it from a non-compat
    syscall.
    
    This prevents an oops when running this code:
    
    int main()
    {
    	int s;
    	struct sockaddr_in addr;
    	struct msghdr *hdr;
    
    	char *highpage = mmap((void*)(TASK_SIZE_MAX - 4096), 4096,
    	                      PROT_READ | PROT_WRITE,
    	                      MAP_PRIVATE | MAP_ANONYMOUS | MAP_FIXED, -1, 0);
    	if (highpage == MAP_FAILED)
    		err(1, "mmap");
    
    	s = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
    	if (s == -1)
    		err(1, "socket");
    
            addr.sin_family = AF_INET;
            addr.sin_port = htons(1);
            addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
    	if (connect(s, (struct sockaddr*)&addr, sizeof(addr)) != 0)
    		err(1, "connect");
    
    	void *evil = highpage + 4096 - COMPAT_MSGHDR_SIZE;
    	printf("Evil address is %p\n", evil);
    
    	if (syscall(__NR_sendmmsg, s, evil, 1, MSG_CMSG_COMPAT) < 0)
    		err(1, "sendmmsg");
    
    	return 0;
    }
    
    Signed-off-by: Andy Lutomirski <luto@amacapital.net>
    Cc: David S. Miller <davem@davemloft.net>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 3c353df4ca0f8f6912e103ca6d8d593ff4563b68
Author: Eric Dumazet <edumazet@google.com>
Date:   Fri May 24 05:49:58 2013 +0000

    ip_tunnel: fix kernel panic with icmp_dest_unreach
    
    [ Upstream commit a622260254ee481747cceaaa8609985b29a31565 ]
    
    Daniel Petre reported crashes in icmp_dst_unreach() with following call
    graph:
    
    Daniel found a similar problem mentioned in
     http://lkml.indiana.edu/hypermail/linux/kernel/1007.0/00961.html
    
    And indeed this is the root cause : skb->cb[] contains data fooling IP
    stack.
    
    We must clear IPCB in ip_tunnel_xmit() sooner in case dst_link_failure()
    is called. Or else skb->cb[] might contain garbage from GSO segmentation
    layer.
    
    A similar fix was tested on linux-3.9, but gre code was refactored in
    linux-3.10. I'll send patches for stable kernels as well.
    
    Many thanks to Daniel for providing reports, patches and testing !
    
    Reported-by: Daniel Petre <daniel.petre@rcs-rds.ro>
    Signed-off-by: Eric Dumazet <edumazet@google.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit fa17eb7500ff1857fba3a01846e32c599cd332c3
Author: Eric Dumazet <edumazet@google.com>
Date:   Thu May 23 07:44:20 2013 +0000

    tcp: xps: fix reordering issues
    
    [ Upstream commit 547669d483e5783d722772af1483fa474da7caf9 ]
    
    commit 3853b5841c01a ("xps: Improvements in TX queue selection")
    introduced ooo_okay flag, but the condition to set it is slightly wrong.
    
    In our traces, we have seen ACK packets being received out of order,
    and RST packets sent in response.
    
    We should test if we have any packets still in host queue.
    
    Signed-off-by: Eric Dumazet <edumazet@google.com>
    Cc: Tom Herbert <therbert@google.com>
    Cc: Yuchung Cheng <ycheng@google.com>
    Cc: Neal Cardwell <ncardwell@google.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 2d73733f3539c18e09345a0988c44a23a75b42f3
Author: Nandita Dukkipati <nanditad@google.com>
Date:   Tue May 21 15:12:07 2013 +0000

    tcp: bug fix in proportional rate reduction.
    
    [ Upstream commit 35f079ebbc860dcd1cca70890c9c8d59c1145525 ]
    
    This patch is a fix for a bug triggering newly_acked_sacked < 0
    in tcp_ack(.).
    
    The bug is triggered by sacked_out decreasing relative to prior_sacked,
    but packets_out remaining the same as pior_packets. This is because the
    snapshot of prior_packets is taken after tcp_sacktag_write_queue() while
    prior_sacked is captured before tcp_sacktag_write_queue(). The problem
    is: tcp_sacktag_write_queue (tcp_match_skb_to_sack() -> tcp_fragment)
    adjusts the pcount for packets_out and sacked_out (MSS change or other
    reason). As a result, this delta in pcount is reflected in
    (prior_sacked - sacked_out) but not in (prior_packets - packets_out).
    
    This patch does the following:
    1) initializes prior_packets at the start of tcp_ack() so as to
    capture the delta in packets_out created by tcp_fragment.
    2) introduces a new "previous_packets_out" variable that snapshots
    packets_out right before tcp_clean_rtx_queue, so pkts_acked can be
    correctly computed as before.
    3) Computes pkts_acked using previous_packets_out, and computes
    newly_acked_sacked using prior_packets.
    
    Signed-off-by: Nandita Dukkipati <nanditad@google.com>
    Acked-by: Yuchung Cheng <ycheng@google.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit f52159d611b0209cdb8e716a8afdb8a2841c7f03
Author: stephen hemminger <stephen@networkplumber.org>
Date:   Mon May 20 06:54:43 2013 +0000

    8139cp: reset BQL when ring tx ring cleared
    
    [ Upstream commit 98962baad72fd6d393bf39dbb7c2076532c363c6 ]
    
    This patch cures transmit timeout's with DHCP observed
    while running under KVM. When the transmit ring is cleaned out,
    the Byte Queue Limit values need to be reset.
    
    Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit b9ca98a92b58d36d9a27c5d52604dc8baf5667a5
Author: Francois Romieu <romieu@fr.zoreil.com>
Date:   Sat May 18 01:24:46 2013 +0000

    r8169: fix offloaded tx checksum for small packets.
    
    [ Upstream commit b423e9ae49d78ea3f53b131c8d5a6087aed16fd6 ]
    
    8168evl offloaded checksums are wrong since commit
    e5195c1f31f399289347e043d6abf3ffa80f0005 ("r8169: fix 8168evl frame padding.")
    pads small packets to 60 bytes (without ethernet checksum). Typical symptoms
    appear as UDP checksums which are wrong by the count of added bytes.
    
    It isn't worth compensating. Let the driver checksum.
    
    Due to the skb length changes, TSO code is moved before the Tx descriptor gets
    written.
    
    Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
    Tested-by: Holger Hoffstätte <holger.hoffstaette@googlemail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 7718fa70e21fa0a0ee1a6ae3bc6fd1494cd238f3
Author: Paul Moore <pmoore@redhat.com>
Date:   Fri May 17 09:08:50 2013 +0000

    netlabel: improve domain mapping validation
    
    [ Upstream commit 6b21e1b77d1a3d58ebfd513264c885695e8a0ba5 ]
    
    The net/netlabel/netlabel_domainhash.c:netlbl_domhsh_add() function
    does not properly validate new domain hash entries resulting in
    potential problems when an administrator attempts to add an invalid
    entry.  One such problem, as reported by Vlad Halilov, is a kernel
    BUG (found in netlabel_domainhash.c:netlbl_domhsh_audit_add()) when
    adding an IPv6 outbound mapping with a CIPSO configuration.
    
    This patch corrects this problem by adding the necessary validation
    code to netlbl_domhsh_add() via the newly created
    netlbl_domhsh_validate() function.
    
    Ideally this patch should also be pushed to the currently active
    -stable trees.
    
    Reported-by: Vlad Halilov <vlad.halilov@gmail.com>
    Signed-off-by: Paul Moore <pmoore@redhat.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 32d704a1a1d8c0fc6552c269a911a03621065cd9
Author: Eric Dumazet <edumazet@google.com>
Date:   Fri May 17 04:53:13 2013 +0000

    ipv6: fix possible crashes in ip6_cork_release()
    
    [ Upstream commit 284041ef21fdf2e0d216ab6b787bc9072b4eb58a ]
    
    commit 0178b695fd6b4 ("ipv6: Copy cork options in ip6_append_data")
    added some code duplication and bad error recovery, leading to potential
    crash in ip6_cork_release() as kfree() could be called with garbage.
    
    use kzalloc() to make sure this wont happen.
    
    Signed-off-by: Eric Dumazet <edumazet@google.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Cc: Herbert Xu <herbert@gondor.apana.org.au>
    Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
    Cc: Neal Cardwell <ncardwell@google.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit c76631940b5c893dbca8b504b1cbb5b970267dc8
Author: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Date:   Thu May 16 22:25:34 2013 +0000

    gianfar: add missing iounmap() on error in gianfar_ptp_probe()
    
    [ Upstream commit e5f5e380e0f3bb11f04ca5bc66a551e58e0ad26e ]
    
    Add the missing iounmap() before return from gianfar_ptp_probe()
    in the error handling case.
    
    Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit d193887e46642b1b210bdf0a6bf29af82b519c89
Author: Eric Dumazet <edumazet@google.com>
Date:   Mon May 13 21:25:52 2013 +0000

    tcp: fix tcp_md5_hash_skb_data()
    
    [ Upstream commit 54d27fcb338bd9c42d1dfc5a39e18f6f9d373c2e ]
    
    TCP md5 communications fail [1] for some devices, because sg/crypto code
    assume page offsets are below PAGE_SIZE.
    
    This was discovered using mlx4 driver [2], but I suspect loopback
    might trigger the same bug now we use order-3 pages in tcp_sendmsg()
    
    [1] Failure is giving following messages.
    
    huh, entered softirq 3 NET_RX ffffffff806ad230 preempt_count 00000100,
    exited with 00000101?
    
    [2] mlx4 driver uses order-2 pages to allocate RX frags
    
    Reported-by: Matt Schnall <mischnal@google.com>
    Signed-off-by: Eric Dumazet <edumazet@google.com>
    Cc: Bernhard Beck <bbeck@google.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit e6e045d5919fd03aef387c86064f67ea300914dc
Author: Zhanghaoyu (A) <haoyu.zhang@huawei.com>
Date:   Fri Jun 14 07:36:13 2013 +0000

    KVM: x86: remove vcpu's CPL check in host-invoked XCR set
    
    commit 764bcbc5a6d7a2f3e75c9f0e4caa984e2926e346 upstream.
    
    __kvm_set_xcr function does the CPL check when set xcr. __kvm_set_xcr is
    called in two flows, one is invoked by guest, call stack shown as below,
    
      handle_xsetbv(or xsetbv_interception)
        kvm_set_xcr
          __kvm_set_xcr
    
    the other one is invoked by host, for example during system reset:
    
      kvm_arch_vcpu_ioctl
        kvm_vcpu_ioctl_x86_set_xcrs
          __kvm_set_xcr
    
    The former does need the CPL check, but the latter does not.
    
    Signed-off-by: Zhang Haoyu <haoyu.zhang@huawei.com>
    [Tweaks to commit message. - Paolo]
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 68447fe9bd4f476aba881d2b4d88502e2c8807fe
Author: Chris Metcalf <cmetcalf@tilera.com>
Date:   Sat Jun 15 16:47:47 2013 -0400

    tilepro: work around module link error with gcc 4.7
    
    commit 3cb3f839d306443f3d1e79b0bde1a2ad2c12b555 upstream.
    
    gcc 4.7.x is emitting calls to __ffsdi2 where previously
    it used to inline the appropriate ctz instructions.
    While this needs to be fixed in gcc, it's also easy to avoid
    having it cause build failures when building with those
    compilers by exporting __ffsdi2 to modules.
    
    Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit f86571e860ed8b57b395e2e7f7941f42880c5fdc
Author: Lai Jiangshan <laijs@cn.fujitsu.com>
Date:   Mon Jun 3 17:17:15 2013 +0800

    clk: remove notifier from list before freeing it
    
    commit 72b5322f11ff0abf6a52b3007486656578d2c982 upstream.
    
    The @cn is stay in @clk_notifier_list after it is freed, it cause
    memory corruption.
    
    Example, if @clk is registered(first), unregistered(first),
    registered(second), unregistered(second).
    
    The freed @cn will be used when @clk is registered(second),
    and the bug will be happened when @clk is unregistered(second):
    
    [  517.040000] clk_notif_dbg clk_notif_dbg.1: clk_notifier_unregister()
    [  517.040000] Unable to handle kernel paging request at virtual address 00df3008
    [  517.050000] pgd = ed858000
    [  517.050000] [00df3008] *pgd=00000000
    [  517.060000] Internal error: Oops: 5 [#1] PREEMPT SMP ARM
    [  517.060000] Modules linked in: clk_notif_dbg(O-) [last unloaded: clk_notif_dbg]
    [  517.060000] CPU: 1 PID: 499 Comm: modprobe Tainted: G           O 3.10.0-rc3-00119-ga93cb29-dirty #85
    [  517.060000] task: ee1e0180 ti: ee3e6000 task.ti: ee3e6000
    [  517.060000] PC is at srcu_readers_seq_idx+0x48/0x84
    [  517.060000] LR is at srcu_readers_seq_idx+0x60/0x84
    [  517.060000] pc : [<c0052720>]    lr : [<c0052738>]    psr: 80070013
    [  517.060000] sp : ee3e7d48  ip : 00000000  fp : ee3e7d6c
    [  517.060000] r10: 00000000  r9 : ee3e6000  r8 : 00000000
    [  517.060000] r7 : ed84fe4c  r6 : c068ec90  r5 : c068e430  r4 : 00000000
    [  517.060000] r3 : 00df3000  r2 : 00000000  r1 : 00000002  r0 : 00000000
    [  517.060000] Flags: Nzcv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
    [  517.060000] Control: 18c5387d  Table: 2d85804a  DAC: 00000015
    [  517.060000] Process modprobe (pid: 499, stack limit = 0xee3e6238)
    [  517.060000] Stack: (0xee3e7d48 to 0xee3e8000)
    ....
    [  517.060000] [<c0052720>] (srcu_readers_seq_idx+0x48/0x84) from [<c0052790>] (try_check_zero+0x34/0xfc)
    [  517.060000] [<c0052790>] (try_check_zero+0x34/0xfc) from [<c00528b0>] (srcu_advance_batches+0x58/0x114)
    [  517.060000] [<c00528b0>] (srcu_advance_batches+0x58/0x114) from [<c0052c30>] (__synchronize_srcu+0x114/0x1ac)
    [  517.060000] [<c0052c30>] (__synchronize_srcu+0x114/0x1ac) from [<c0052d14>] (synchronize_srcu+0x2c/0x34)
    [  517.060000] [<c0052d14>] (synchronize_srcu+0x2c/0x34) from [<c0053a08>] (srcu_notifier_chain_unregister+0x68/0x74)
    [  517.060000] [<c0053a08>] (srcu_notifier_chain_unregister+0x68/0x74) from [<c0375a78>] (clk_notifier_unregister+0x7c/0xc0)
    [  517.060000] [<c0375a78>] (clk_notifier_unregister+0x7c/0xc0) from [<bf008034>] (clk_notif_dbg_remove+0x34/0x9c [clk_notif_dbg])
    [  517.060000] [<bf008034>] (clk_notif_dbg_remove+0x34/0x9c [clk_notif_dbg]) from [<c02bb974>] (platform_drv_remove+0x24/0x28)
    [  517.060000] [<c02bb974>] (platform_drv_remove+0x24/0x28) from [<c02b9bf8>] (__device_release_driver+0x8c/0xd4)
    [  517.060000] [<c02b9bf8>] (__device_release_driver+0x8c/0xd4) from [<c02ba680>] (driver_detach+0x9c/0xc4)
    [  517.060000] [<c02ba680>] (driver_detach+0x9c/0xc4) from [<c02b99c4>] (bus_remove_driver+0xcc/0xfc)
    [  517.060000] [<c02b99c4>] (bus_remove_driver+0xcc/0xfc) from [<c02bace4>] (driver_unregister+0x54/0x78)
    [  517.060000] [<c02bace4>] (driver_unregister+0x54/0x78) from [<c02bbb44>] (platform_driver_unregister+0x1c/0x20)
    [  517.060000] [<c02bbb44>] (platform_driver_unregister+0x1c/0x20) from [<bf0081f8>] (clk_notif_dbg_driver_exit+0x14/0x1c [clk_notif_dbg])
    [  517.060000] [<bf0081f8>] (clk_notif_dbg_driver_exit+0x14/0x1c [clk_notif_dbg]) from [<c00835e4>] (SyS_delete_module+0x200/0x28c)
    [  517.060000] [<c00835e4>] (SyS_delete_module+0x200/0x28c) from [<c000edc0>] (ret_fast_syscall+0x0/0x48)
    [  517.060000] Code: e5973004 e7911102 e0833001 e2881002 (e7933101)
    
    Reported-by: Sören Brinkmann <soren.brinkmann@xilinx.com>
    Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
    Tested-by: Sören Brinkmann <soren.brinkmann@xilinx.com>
    Signed-off-by: Mike Turquette <mturquette@linaro.org>
    [mturquette@linaro.org: shortened $SUBJECT]
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit e02a738d98825abca64e4cd9fe1466df7a6e7d67
Author: Clemens Ladisch <clemens@ladisch.de>
Date:   Sat Jun 15 11:21:09 2013 +0200

    ALSA: usb-audio: work around Android accessory firmware bug
    
    commit 342cda29343a6272c630f94ed56810a76740251b upstream.
    
    When the Android firmware enables the audio interfaces in accessory
    mode, it always declares in the control interface's baInterfaceNr array
    that interfaces 0 and 1 belong to the audio function.  However, the
    accessory interface itself, if also enabled, already is at index 0 and
    shifts the actual audio interface numbers to 1 and 2, which prevents the
    PCM streaming interface from being seen by the host driver.
    
    To get the PCM interface interface to work, detect when the descriptors
    point to the (for this driver useless) accessory interface, and redirect
    to the correct one.
    
    Reported-by: Jeremy Rosen <jeremy.rosen@openwide.fr>
    Tested-by: Jeremy Rosen <jeremy.rosen@openwide.fr>
    Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 2dc07099dd09be589056fe538bb8a72a13af6afc
Author: Takashi Iwai <tiwai@suse.de>
Date:   Mon Jun 17 10:25:02 2013 +0200

    ALSA: usb-audio: Fix invalid volume resolution for Logitech HD Webcam c310
    
    commit 36691e1be6ec551eef4a5225f126a281f8c051c2 upstream.
    
    Just like the previous fix for LogitechHD Webcam c270 in commit
    11e7064f35bb87da8f427d1aa4bbd8b7473a3993, c310 model also requires the
    same workaround for avoiding the kernel warning.
    
    Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=59741
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>