commit c695fa377e20d87b4ea787e492b7863478831129
Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date:   Mon Jul 28 08:08:42 2014 -0700

    Linux 3.15.7

commit d0c6a6cba18a112ace6c581c5d7a3fdbba1fbe7a
Author: Anton Kolesov <Anton.Kolesov@synopsys.com>
Date:   Fri Jun 20 20:28:39 2014 +0400

    ARC: Implement ptrace(PTRACE_GET_THREAD_AREA)
    
    commit a4b6cb735b25aa84a462a1985e3e43bebaf5beb4 upstream.
    
    This patch adds implementation of GET_THREAD_AREA ptrace request type. This
    is required by GDB to debug NPTL applications.
    
    Signed-off-by: Anton Kolesov <Anton.Kolesov@synopsys.com>
    Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 2503a41555565e17388d082f745c06ced564b2b0
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date:   Sun Jun 8 14:17:00 2014 -0700

    Don't trigger congestion wait on dirty-but-not-writeout pages
    
    commit b738d764652dc5aab1c8939f637112981fce9e0e upstream.
    
    shrink_inactive_list() used to wait 0.1s to avoid congestion when all
    the pages that were isolated from the inactive list were dirty but not
    under active writeback.  That makes no real sense, and apparently causes
    major interactivity issues under some loads since 3.11.
    
    The ostensible reason for it was to wait for kswapd to start writing
    pages, but that seems questionable as well, since the congestion wait
    code seems to trigger for kswapd itself as well.  Also, the logic behind
    delaying anything when we haven't actually started writeback is not
    clear - it only delays actually starting that writeback.
    
    We'll still trigger the congestion waiting if
    
     (a) the process is kswapd, and we hit pages flagged for immediate
         reclaim
    
     (b) the process is not kswapd, and the zone backing dev writeback is
         actually congested.
    
    This probably needs to be revisited, but as it is this fixes a reported
    regression.
    
    Reported-by: Felipe Contreras <felipe.contreras@gmail.com>
    Pinpointed-by: Hillf Danton <dhillf@gmail.com>
    Cc: Michal Hocko <mhocko@suse.cz>
    Cc: Andrew Morton <akpm@linux-foundation.org>
    Cc: Mel Gorman <mgorman@suse.de>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    
    [mhocko@suse.cz: backport to 3.12 stable tree]
    Fixes: e2be15f6c3ee ('mm: vmscan: stall page reclaim and writeback pages based on dirty/writepage pages encountered')
    Reported-by: Felipe Contreras <felipe.contreras@gmail.com>
    Pinpointed-by: Hillf Danton <dhillf@gmail.com>
    Cc: Michal Hocko <mhocko@suse.cz>
    Cc: Andrew Morton <akpm@linux-foundation.org>
    Cc: Mel Gorman <mgorman@suse.de>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Michal Hocko <mhocko@suse.cz>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 7d71bcace158a70c28928784e75e4e447f6c2ac2
Author: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Date:   Thu Jul 3 20:46:35 2014 +0300

    iwlwifi: mvm: disable CTS to Self
    
    commit dc271ee0d04d12d6bfabacbec803289a7072fbd9 upstream.
    
    Firmware folks seem say that this flag can make trouble.
    Drop it. The advantage of CTS to self is that it slightly
    reduces the cost of the protection, but make the protection
    less reliable.
    
    Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 1996537ab6782a20b3b0d0e9f76d079e2213e38b
Author: Marek Vasut <marex@denx.de>
Date:   Fri Feb 28 12:58:41 2014 +0100

    ARM: dts: imx: Add alias for ethernet controller
    
    commit 22970070e027cbbb9b2878f8f7c31d0d7f29e94d upstream.
    
    Add alias for FEC ethernet on i.MX to allow bootloaders (like U-Boot)
    patch-in the MAC address for FEC using this alias.
    
    Signed-off-by: Marek Vasut <marex@denx.de>
    Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit b163f8a662ae31b8acb390c5094f75948b5d021b
Author: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date:   Mon Apr 7 12:13:05 2014 +0200

    gpio: dwapb: drop irq_setup_generic_chip()
    
    commit 11d3d334af07408ce3a68860c40006ddcd343da5 upstream.
    
    The driver calls irq_alloc_domain_generic_chips() which creates a gc and
    adds it to gc_list. The driver later then calls irq_setup_generic_chip()
    which also initializes the gc and adds it to the gc_list() and this
    corrupts the list. Enable LIST_DEBUG and you see the kernel complain.
    This isn't required, irq_alloc_domain_generic_chips() did the init.
    
    Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
    Tested-by: Alan Tull <delicious.quinoa@gmail.com>
    Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
    Signed-off-by: dann frazier <dann.frazier@canonical.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 224e90e8ab01294c5daef3fadc0dd26f16aa77c2
Author: Benjamin LaHaise <bcrl@kvack.org>
Date:   Mon Jul 14 12:49:26 2014 -0400

    aio: protect reqs_available updates from changes in interrupt handlers
    
    commit 263782c1c95bbddbb022dc092fd89a36bb8d5577 upstream.
    
    As of commit f8567a3845ac05bb28f3c1b478ef752762bd39ef it is now possible to
    have put_reqs_available() called from irq context.  While put_reqs_available()
    is per cpu, it did not protect itself from interrupts on the same CPU.  This
    lead to aio_complete() corrupting the available io requests count when run
    under a heavy O_DIRECT workloads as reported by Robert Elliott.  Fix this by
    disabling irq updates around the per cpu batch updates of reqs_available.
    
    Many thanks to Robert and folks for testing and tracking this down.
    
    Reported-by: Robert Elliot <Elliott@hp.com>
    Tested-by: Robert Elliot <Elliott@hp.com>
    Signed-off-by: Benjamin LaHaise <bcrl@kvack.org>
    Cc: Jens Axboe <axboe@kernel.dk>, Christoph Hellwig <hch@infradead.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit e82bb7ea72d7d457ec861f44a1a47f07b7a51baa
Author: Or Gerlitz <ogerlitz@mellanox.com>
Date:   Wed Jun 25 16:44:14 2014 +0300

    IB/mlx5: Enable "block multicast loopback" for kernel consumers
    
    commit 652c1a05171695d21b84dd3a723606b50eeb80fd upstream.
    
    In commit f360d88a2efd, we advertise blocking multicast loopback to both
    kernel and userspace consumers, but don't allow kernel consumers (e.g IPoIB)
    to use it with their UD QPs.  Fix that.
    
    Fixes: f360d88a2efd ("IB/mlx5: Add block multicast loopback support")
    Reported-by: Haggai Eran <haggaie@mellanox.com>
    Signed-off-by: Eli Cohen <eli@mellanox.com>
    Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
    Signed-off-by: Roland Dreier <roland@purestorage.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 25dfab58f7aa6fe6ca9c5d4c545a80d5c6f95fb9
Author: Michael Brown <mbrown@fensystems.co.uk>
Date:   Thu Jul 10 12:26:20 2014 +0100

    x86/efi: Include a .bss section within the PE/COFF headers
    
    commit c7fb93ec51d462ec3540a729ba446663c26a0505 upstream.
    
    The PE/COFF headers currently describe only the initialised-data
    portions of the image, and result in no space being allocated for the
    uninitialised-data portions.  Consequently, the EFI boot stub will end
    up overwriting unexpected areas of memory, with unpredictable results.
    
    Fix by including a .bss section in the PE/COFF headers (functionally
    equivalent to the init_size field in the bzImage header).
    
    Signed-off-by: Michael Brown <mbrown@fensystems.co.uk>
    Cc: Thomas Bächler <thomas@archlinux.org>
    Cc: Josh Boyer <jwboyer@fedoraproject.org>
    Signed-off-by: Matt Fleming <matt.fleming@intel.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit ed2195e6289fde88c6dad50c9ddaef56fe9ef828
Author: Mateusz Guzik <mguzik@redhat.com>
Date:   Sat Jun 14 15:00:09 2014 +0200

    sched: Fix possible divide by zero in avg_atom() calculation
    
    commit b0ab99e7736af88b8ac1b7ae50ea287fffa2badc upstream.
    
    proc_sched_show_task() does:
    
      if (nr_switches)
    	do_div(avg_atom, nr_switches);
    
    nr_switches is unsigned long and do_div truncates it to 32 bits, which
    means it can test non-zero on e.g. x86-64 and be truncated to zero for
    division.
    
    Fix the problem by using div64_ul() instead.
    
    As a side effect calculations of avg_atom for big nr_switches are now correct.
    
    Signed-off-by: Mateusz Guzik <mguzik@redhat.com>
    Signed-off-by: Peter Zijlstra <peterz@infradead.org>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Link: http://lkml.kernel.org/r/1402750809-31991-1-git-send-email-mguzik@redhat.com
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 8895b388a730b5a7255616b0700371ed25d11acf
Author: Peter Zijlstra <peterz@infradead.org>
Date:   Fri Jun 6 19:53:16 2014 +0200

    locking/mutex: Disable optimistic spinning on some architectures
    
    commit 4badad352a6bb202ec68afa7a574c0bb961e5ebc upstream.
    
    The optimistic spin code assumes regular stores and cmpxchg() play nice;
    this is found to not be true for at least: parisc, sparc32, tile32,
    metag-lock1, arc-!llsc and hexagon.
    
    There is further wreckage, but this in particular seemed easy to
    trigger, so blacklist this.
    
    Opt in for known good archs.
    
    Signed-off-by: Peter Zijlstra <peterz@infradead.org>
    Reported-by: Mikulas Patocka <mpatocka@redhat.com>
    Cc: David Miller <davem@davemloft.net>
    Cc: Chris Metcalf <cmetcalf@tilera.com>
    Cc: James Bottomley <James.Bottomley@hansenpartnership.com>
    Cc: Vineet Gupta <vgupta@synopsys.com>
    Cc: Jason Low <jason.low2@hp.com>
    Cc: Waiman Long <waiman.long@hp.com>
    Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
    Cc: Paul McKenney <paulmck@linux.vnet.ibm.com>
    Cc: John David Anglin <dave.anglin@bell.net>
    Cc: James Hogan <james.hogan@imgtec.com>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Davidlohr Bueso <davidlohr@hp.com>
    Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
    Cc: Catalin Marinas <catalin.marinas@arm.com>
    Cc: Russell King <linux@arm.linux.org.uk>
    Cc: Will Deacon <will.deacon@arm.com>
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: linux-kernel@vger.kernel.org
    Cc: linuxppc-dev@lists.ozlabs.org
    Cc: sparclinux@vger.kernel.org
    Link: http://lkml.kernel.org/r/20140606175316.GV13930@laptop.programming.kicks-ass.net
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit e02f84ab62e11b1d270e24fb0387cd353a3e9601
Author: Takashi Iwai <tiwai@suse.de>
Date:   Tue Jul 15 08:51:27 2014 +0200

    PM / sleep: Fix request_firmware() error at resume
    
    commit 4320f6b1d9db4ca912c5eb6ecb328b2e090e1586 upstream.
    
    The commit [247bc037: PM / Sleep: Mitigate race between the freezer
    and request_firmware()] introduced the finer state control, but it
    also leads to a new bug; for example, a bug report regarding the
    firmware loading of intel BT device at suspend/resume:
      https://bugzilla.novell.com/show_bug.cgi?id=873790
    
    The root cause seems to be a small window between the process resume
    and the clear of usermodehelper lock.  The request_firmware() function
    checks the UMH lock and gives up when it's in UMH_DISABLE state.  This
    is for avoiding the invalid  f/w loading during suspend/resume phase.
    The problem is, however, that usermodehelper_enable() is called at the
    end of thaw_processes().  Thus, a thawed process in between can kick
    off the f/w loader code path (in this case, via btusb_setup_intel())
    even before the call of usermodehelper_enable().  Then
    usermodehelper_read_trylock() returns an error and request_firmware()
    spews WARN_ON() in the end.
    
    This oneliner patch fixes the issue just by setting to UMH_FREEZING
    state again before restarting tasks, so that the call of
    request_firmware() will be blocked until the end of this function
    instead of returning an error.
    
    Fixes: 247bc0374254 (PM / Sleep: Mitigate race between the freezer and request_firmware())
    Link: https://bugzilla.novell.com/show_bug.cgi?id=873790
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 1c775c1c4a8501bf772f36475a8bfc5e52eba549
Author: Steve Wise <swise@opengridcomputing.com>
Date:   Tue Jul 8 10:20:35 2014 -0500

    RDMA/cxgb4: Initialize the device status page
    
    commit 6b54d54dea82ae214e4a45a503c4ef755a8ecee8 upstream.
    
    The status page is mapped to user processes and allows sharing the
    device state between the kernel and user processes.  This state isn't
    getting initialized and thus intermittently causes problems.  Namely,
    the user process can mistakenly think the user doorbell writes are
    disabled which causes SQ work requests to never get fetched by HW.
    
    Fixes: 05eb23893c2c ("cxgb4/iw_cxgb4: Doorbell Drop Avoidance Bug Fixes").
    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
    Signed-off-by: Roland Dreier <roland@purestorage.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 0237a67558244497da9718e466872bb698639c3d
Author: Mike Snitzer <snitzer@redhat.com>
Date:   Mon Jul 14 16:59:39 2014 -0400

    dm cache metadata: do not allow the data block size to change
    
    commit 048e5a07f282c57815b3901d4a68a77fa131ce0a upstream.
    
    The block size for the dm-cache's data device must remained fixed for
    the life of the cache.  Disallow any attempt to change the cache's data
    block size.
    
    Signed-off-by: Mike Snitzer <snitzer@redhat.com>
    Acked-by: Joe Thornber <ejt@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 71fa36b4408e3f3b7e4be135fe232570a64b8153
Author: Mike Snitzer <snitzer@redhat.com>
Date:   Mon Jul 14 16:35:54 2014 -0400

    dm thin metadata: do not allow the data block size to change
    
    commit 9aec8629ec829fc9403788cd959e05dd87988bd1 upstream.
    
    The block size for the thin-pool's data device must remained fixed for
    the life of the thin-pool.  Disallow any attempt to change the
    thin-pool's data block size.
    
    It should be noted that attempting to change the data block size via
    thin-pool table reload will be ignored as a side-effect of the thin-pool
    handover that the thin-pool target does during thin-pool table reload.
    
    Here is an example outcome of attempting to load a thin-pool table that
    reduced the thin-pool's data block size from 1024K to 512K.
    
    Before:
    kernel: device-mapper: thin: 253:4: growing the data device from 204800 to 409600 blocks
    
    After:
    kernel: device-mapper: thin metadata: changing the data block size (from 2048 to 1024) is not supported
    kernel: device-mapper: table: 253:4: thin-pool: Error creating metadata object
    kernel: device-mapper: ioctl: error adding target to table
    
    Signed-off-by: Mike Snitzer <snitzer@redhat.com>
    Acked-by: Joe Thornber <ejt@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 9734f8dba747747ee72e13a7fccd8ca85384100d
Author: Ted Juan <ted.juan@gmail.com>
Date:   Fri Jun 20 17:32:05 2014 +0800

    mtd: devices: elm: fix elm_context_save() and elm_context_restore() functions
    
    commit 6938ad40cb97a52d88a763008935340729a4acc7 upstream.
    
    These two function's switch case lack the 'break' that make them always
    return error.
    
    Signed-off-by: Ted Juan <ted.juan@gmail.com>
    Acked-by: Pekon Gupta <pekon@ti.com>
    Signed-off-by: Brian Norris <computersforpeace@gmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 4476263109359f4d8f020ffa94c1da0b810fddbe
Author: Hannes Frederic Sowa <hannes@stressinduktion.org>
Date:   Fri Jul 18 17:26:41 2014 -0400

    random: check for increase of entropy_count because of signed conversion
    
    commit 79a8468747c5f95ed3d5ce8376a3e82e0c5857fc upstream.
    
    The expression entropy_count -= ibytes << (ENTROPY_SHIFT + 3) could
    actually increase entropy_count if during assignment of the unsigned
    expression on the RHS (mind the -=) we reduce the value modulo
    2^width(int) and assign it to entropy_count. Trinity found this.
    
    [ Commit modified by tytso to add an additional safety check for a
      negative entropy_count -- which should never happen, and to also add
      an additional paranoia check to prevent overly large count values to
      be passed into urandom_read().  ]
    
    Reported-by: Dave Jones <davej@redhat.com>
    Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
    Signed-off-by: Theodore Ts'o <tytso@mit.edu>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit f089f0e364939faf818fd14b45f41a33b23dca54
Author: Viresh Kumar <viresh.kumar@linaro.org>
Date:   Thu Jul 17 10:48:25 2014 +0530

    cpufreq: move policy kobj to policy->cpu at resume
    
    commit 92c14bd9477a20a83144f08c0ca25b0308bf0730 upstream.
    
    This is only relevant to implementations with multiple clusters, where clusters
    have separate clock lines but all CPUs within a cluster share it.
    
    Consider a dual cluster platform with 2 cores per cluster. During suspend we
    start hot unplugging CPUs in order 1 to 3. When CPU2 is removed, policy->kobj
    would be moved to CPU3 and when CPU3 goes down we wouldn't free policy or its
    kobj as we want to retain permissions/values/etc.
    
    Now on resume, we will get CPU2 before CPU3 and will call __cpufreq_add_dev().
    We will recover the old policy and update policy->cpu from 3 to 2 from
    update_policy_cpu().
    
    But the kobj is still tied to CPU3 and isn't moved to CPU2. We wouldn't create a
    link for CPU2, but would try that for CPU3 while bringing it online. Which will
    report errors as CPU3 already has kobj assigned to it.
    
    This bug got introduced with commit 42f921a, which overlooked this scenario.
    
    To fix this, lets move kobj to the new policy->cpu while bringing first CPU of a
    cluster back. Also do a WARN_ON() if kobject_move failed, as we would reach here
    only for the first CPU of a non-boot cluster. And we can't recover from this
    situation, if kobject_move() fails.
    
    Fixes: 42f921a6f10c (cpufreq: remove sysfs files for CPUs which failed to come back after resume)
    Reported-and-tested-by: Bu Yitian <ybu@qti.qualcomm.com>
    Reported-by: Saravana Kannan <skannan@codeaurora.org>
    Reviewed-by: Srivatsa S. Bhat <srivatsa@mit.edu>
    Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 6cb66ebf030b998799ba491e88ef95eca2895bd7
Author: Peter Zijlstra <peterz@infradead.org>
Date:   Tue Jun 24 14:48:19 2014 +0200

    x86, tsc: Fix cpufreq lockup
    
    commit 3896c329df8092661dac80f55a8c3f60136fd61a upstream.
    
    Mauro reported that his AMD X2 using the powernow-k8 cpufreq driver
    locked up when doing cpu hotplug.
    
    Because we called set_cyc2ns_scale() from the time_cpufreq_notifier()
    unconditionally, it gets called multiple times for each freq change,
    instead of only the once, when the tsc_khz value actually changes.
    
    Because it gets called more than once, we run out of cyc2ns data slots
    and stall, waiting for a free one, but because we're half way offline,
    there's no consumers to free slots.
    
    By placing the call inside the condition that actually changes tsc_khz
    we avoid superfluous calls and avoid the problem.
    
    Reported-by: Mauro <registosites@hotmail.com>
    Tested-by: Mauro <registosites@hotmail.com>
    Fixes: 20d1c86a5776 ("sched/clock, x86: Rewrite cyc2ns() to avoid the need to disable IRQs")
    Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
    Cc: Viresh Kumar <viresh.kumar@linaro.org>
    Cc: Bin Gao <bin.gao@intel.com>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
    Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
    Cc: Stefani Seibold <stefani@seibold.net>
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: Peter Zijlstra <peterz@infradead.org>
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit f7eb924e4e591ead2e07dc9f2fabfaa5c4a6c31c
Author: Amit Shah <amit.shah@redhat.com>
Date:   Thu Jul 10 15:42:34 2014 +0530

    hwrng: fetch randomness only after device init
    
    commit d3cc7996473a7bdd33256029988ea690754e4e2a upstream.
    
    Commit d9e7972619334 "hwrng: add randomness to system from rng sources"
    added a call to rng_get_data() from the hwrng_register() function.
    However, some rng devices need initialization before data can be read
    from them.
    
    This commit makes the call to rng_get_data() depend on no init fn
    pointer being registered by the device.  If an init function is
    registered, this call is made after device init.
    
    CC: Kees Cook <keescook@chromium.org>
    CC: Jason Cooper <jason@lakedaemon.net>
    CC: Herbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: Amit Shah <amit.shah@redhat.com>
    Reviewed-by: Jason Cooper <jason@lakedaemon.net>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 6ffb863bbe53b5f0622b1a3f4797d4713721f9cb
Author: John Stultz <john.stultz@linaro.org>
Date:   Mon Jul 7 14:06:11 2014 -0700

    alarmtimer: Fix bug where relative alarm timers were treated as absolute
    
    commit 16927776ae757d0d132bdbfabbfe2c498342bd59 upstream.
    
    Sharvil noticed with the posix timer_settime interface, using the
    CLOCK_REALTIME_ALARM or CLOCK_BOOTTIME_ALARM clockid, if the users
    tried to specify a relative time timer, it would incorrectly be
    treated as absolute regardless of the state of the flags argument.
    
    This patch corrects this, properly checking the absolute/relative flag,
    as well as adds further error checking that no invalid flag bits are set.
    
    Reported-by: Sharvil Nanavati <sharvil@google.com>
    Signed-off-by: John Stultz <john.stultz@linaro.org>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: Ingo Molnar <mingo@kernel.org>
    Cc: Prarit Bhargava <prarit@redhat.com>
    Cc: Sharvil Nanavati <sharvil@google.com>
    Link: http://lkml.kernel.org/r/1404767171-6902-1-git-send-email-john.stultz@linaro.org
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 1c46b5d7cd5d9912687a9e65626cdc24b1074ae1
Author: Dave Airlie <airlied@redhat.com>
Date:   Mon Jul 14 11:04:39 2014 +1000

    Revert "drm/i915: reverse dp link param selection, prefer fast over wide again"
    
    commit c6930992948adf0f8fc1f6ff1da51c5002a2cf95 upstream.
    
    This reverts commit 38aecea0ccbb909d635619cba22f1891e589b434.
    
    This breaks Haswell Thinkpad + Lenovo dock in SST mode with a HDMI monitor attached.
    
    Before this we can 1920x1200 mode, after this we only ever get 1024x768, and
    a lot of deferring.
    
    This didn't revert clean, but this should be fine.
    
    bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1117008
    Signed-off-by: Dave Airlie <airlied@redhat.com>
    Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 25f74bf8ac86688c0d3e304321df478054bd87f8
Author: Alex Deucher <alexander.deucher@amd.com>
Date:   Mon Jul 14 17:57:19 2014 -0400

    drm/radeon: avoid leaking edid data
    
    commit 0ac66effe7fcdee55bda6d5d10d3372c95a41920 upstream.
    
    In some cases we fetch the edid in the detect() callback
    in order to determine what sort of monitor is connected.
    If that happens, don't fetch the edid again in the get_modes()
    callback or we will leak the edid.
    
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit e6010240bff7a2fc756e212d0711011db8c3f078
Author: Jason Wang <jasowang@redhat.com>
Date:   Mon May 12 16:35:39 2014 +0800

    drm/qxl: return IRQ_NONE if it was not our irq
    
    commit fbb60fe35ad579b511de8604b06a30b43846473b upstream.
    
    Return IRQ_NONE if it was not our irq. This is necessary for the case
    when qxl is sharing irq line with a device A in a crash kernel. If qxl
    is initialized before A and A's irq was raised during this gap,
    returning IRQ_HANDLED in this case will cause this irq to be raised
    again after EOI since kernel think it was handled but in fact it was
    not.
    
    Cc: Gerd Hoffmann <kraxel@redhat.com>
    Signed-off-by: Jason Wang <jasowang@redhat.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit be907c8468c9f47882036109ba550cd2748b86a0
Author: Alex Deucher <alexander.deucher@amd.com>
Date:   Tue Jul 15 09:48:53 2014 -0400

    drm/radeon: set default bl level to something reasonable
    
    commit 201bb62402e0227375c655446ea04fcd0acf7287 upstream.
    
    If the value in the scratch register is 0, set it to the
    max level.  This fixes an issue where the console fb blanking
    code calls back into the backlight driver on unblank and then
    sets the backlight level to 0 after the driver has already
    set the mode and enabled the backlight.
    
    bugs:
    https://bugs.freedesktop.org/show_bug.cgi?id=81382
    https://bugs.freedesktop.org/show_bug.cgi?id=70207
    
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
    Tested-by: David Heidelberger <david.heidelberger@ixit.cz>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit e9b7cbe465fcd8661cc69e1b5377341d80e531a8
Author: Tomasz Figa <t.figa@samsung.com>
Date:   Thu Jul 17 17:23:44 2014 +0200

    irqchip: gic: Fix core ID calculation when topology is read from DT
    
    commit 29e697b11853d3f83b1864ae385abdad4aa2c361 upstream.
    
    Certain GIC implementation, namely those found on earlier, single
    cluster, Exynos SoCs, have registers mapped without per-CPU banking,
    which means that the driver needs to use different offset for each CPU.
    
    Currently the driver calculates the offset by multiplying value returned
    by cpu_logical_map() by CPU offset parsed from DT. This is correct when
    CPU topology is not specified in DT and aforementioned function returns
    core ID alone. However when DT contains CPU topology, the function
    changes to return cluster ID as well, which is non-zero on mentioned
    SoCs and so breaks the calculation in GIC driver.
    
    This patch fixes this by masking out cluster ID in CPU offset
    calculation so that only core ID is considered. Multi-cluster Exynos
    SoCs already have banked GIC implementations, so this simple fix should
    be enough.
    
    Reported-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
    Reported-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
    Signed-off-by: Tomasz Figa <t.figa@samsung.com>
    Fixes: db0d4db22a78d ("ARM: gic: allow GIC to support non-banked setups")
    Link: https://lkml.kernel.org/r/1405610624-18722-1-git-send-email-t.figa@samsung.com
    Signed-off-by: Jason Cooper <jason@lakedaemon.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit d00a172e5319e2d091882a66224e85828ef2324f
Author: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
Date:   Tue Jul 15 00:03:03 2014 +0200

    irqchip: gic: Add binding probe for ARM GIC400
    
    commit 144cb08864ed44be52d8634ac69cd98e5efcf527 upstream.
    
    Commit 3ab72f9156bb "dt-bindings: add GIC-400 binding" added the
    "arm,gic-400" compatible string, but the corresponding IRQCHIP_DECLARE
    was never added to the gic driver.
    
    Therefore add the missing irqchip declaration for it.
    
    Signed-off-by: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    
    Removed additional empty line and adapted commit message to mark it
    as fixing an issue.
    Signed-off-by: Heiko Stuebner <heiko@sntech.de>
    Acked-by: Will Deacon <will.deacon@arm.com>
    Fixes: 3ab72f9156bb ("dt-bindings: add GIC-400 binding")
    Link: https://lkml.kernel.org/r/2621565.f5eISveXXJ@diego
    Signed-off-by: Jason Cooper <jason@lakedaemon.net>

commit 0f452e48be333a62c23ed9382400b08ee62ec5a5
Author: Matthias Brugger <matthias.bgg@gmail.com>
Date:   Thu Jul 3 13:58:52 2014 +0200

    irqchip: gic: Add support for cortex a7 compatible string
    
    commit a97e8027b1d28eafe6bafe062556c1ec926a49c6 upstream.
    
    Patch 0a68214b "ARM: DT: Add binding for GIC virtualization extentions (VGIC)" added
    the "arm,cortex-a7-gic" compatible string, but the corresponding IRQCHIP_DECLARE
    was never added to the gic driver.
    
    To let real Cortex-A7 SoCs use it, add the necessary declaration to the device driver.
    
    Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
    Link: https://lkml.kernel.org/r/1404388732-28890-1-git-send-email-matthias.bgg@gmail.com
    Fixes: 0a68214b76ca ("ARM: DT: Add binding for GIC virtualization extentions (VGIC)")
    Signed-off-by: Jason Cooper <jason@lakedaemon.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 38ecd0681c1255934bd923cd7820ddce5a9f43c6
Author: Martin Lau <kafai@fb.com>
Date:   Mon Jun 9 23:06:42 2014 -0700

    ring-buffer: Fix polling on trace_pipe
    
    commit 97b8ee845393701edc06e27ccec2876ff9596019 upstream.
    
    ring_buffer_poll_wait() should always put the poll_table to its wait_queue
    even there is immediate data available.  Otherwise, the following epoll and
    read sequence will eventually hang forever:
    
    1. Put some data to make the trace_pipe ring_buffer read ready first
    2. epoll_ctl(efd, EPOLL_CTL_ADD, trace_pipe_fd, ee)
    3. epoll_wait()
    4. read(trace_pipe_fd) till EAGAIN
    5. Add some more data to the trace_pipe ring_buffer
    6. epoll_wait() -> this epoll_wait() will block forever
    
    ~ During the epoll_ctl(efd, EPOLL_CTL_ADD,...) call in step 2,
      ring_buffer_poll_wait() returns immediately without adding poll_table,
      which has poll_table->_qproc pointing to ep_poll_callback(), to its
      wait_queue.
    ~ During the epoll_wait() call in step 3 and step 6,
      ring_buffer_poll_wait() cannot add ep_poll_callback() to its wait_queue
      because the poll_table->_qproc is NULL and it is how epoll works.
    ~ When there is new data available in step 6, ring_buffer does not know
      it has to call ep_poll_callback() because it is not in its wait queue.
      Hence, block forever.
    
    Other poll implementation seems to call poll_wait() unconditionally as the very
    first thing to do.  For example, tcp_poll() in tcp.c.
    
    Link: http://lkml.kernel.org/p/20140610060637.GA14045@devbig242.prn2.facebook.com
    
    Fixes: 2a2cc8f7c4d0 "ftrace: allow the event pipe to be polled"
    Reviewed-by: Chris Mason <clm@fb.com>
    Signed-off-by: Martin Lau <kafai@fb.com>
    Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 363595404bded8c468a27af2d11b6578c2f6d64a
Author: Amitkumar Karwar <akarwar@marvell.com>
Date:   Fri Jun 20 11:45:25 2014 -0700

    mwifiex: fix Tx timeout issue
    
    commit d76744a93246eccdca1106037e8ee29debf48277 upstream.
    
    https://bugzilla.kernel.org/show_bug.cgi?id=70191
    https://bugzilla.kernel.org/show_bug.cgi?id=77581
    
    It is observed that sometimes Tx packet is downloaded without
    adding driver's txpd header. This results in firmware parsing
    garbage data as packet length. Sometimes firmware is unable
    to read the packet if length comes out as invalid. This stops
    further traffic and timeout occurs.
    
    The root cause is uninitialized fields in tx_info(skb->cb) of
    packet used to get garbage values. In this case if
    MWIFIEX_BUF_FLAG_REQUEUED_PKT flag is mistakenly set, txpd
    header was skipped. This patch makes sure that tx_info is
    correctly initialized to fix the problem.
    
    Reported-by: Andrew Wiley <wiley.andrew.j@gmail.com>
    Reported-by: Linus Gasser <list@markas-al-nour.org>
    Reported-by: Michael Hirsch <hirsch@teufel.de>
    Tested-by: Xinming Hu <huxm@marvell.com>
    Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
    Signed-off-by: Maithili Hinge <maithili@marvell.com>
    Signed-off-by: Avinash Patil <patila@marvell.com>
    Signed-off-by: Bing Zhao <bzhao@marvell.com>
    Signed-off-by: John W. Linville <linville@tuxdriver.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 80d31f5e5b701cf96c7bd5b141575060f01a0c2b
Author: HATAYAMA Daisuke <d.hatayama@jp.fujitsu.com>
Date:   Wed Jun 25 10:09:07 2014 +0900

    perf/x86/intel: ignore CondChgd bit to avoid false NMI handling
    
    commit b292d7a10487aee6e74b1c18b8d95b92f40d4a4f upstream.
    
    Currently, any NMI is falsely handled by a NMI handler of NMI watchdog
    if CondChgd bit in MSR_CORE_PERF_GLOBAL_STATUS MSR is set.
    
    For example, we use external NMI to make system panic to get crash
    dump, but in this case, the external NMI is falsely handled do to the
    issue.
    
    This commit deals with the issue simply by ignoring CondChgd bit.
    
    Here is explanation in detail.
    
    On x86 NMI watchdog uses performance monitoring feature to
    periodically signal NMI each time performance counter gets overflowed.
    
    intel_pmu_handle_irq() is called as a NMI_LOCAL handler from a NMI
    handler of NMI watchdog, perf_event_nmi_handler(). It identifies an
    owner of a given NMI by looking at overflow status bits in
    MSR_CORE_PERF_GLOBAL_STATUS MSR. If some of the bits are set, then it
    handles the given NMI as its own NMI.
    
    The problem is that the intel_pmu_handle_irq() doesn't distinguish
    CondChgd bit from other bits. Unlike the other status bits, CondChgd
    bit doesn't represent overflow status for performance counters. Thus,
    CondChgd bit cannot be thought of as a mark indicating a given NMI is
    NMI watchdog's.
    
    As a result, if CondChgd bit is set, any NMI is falsely handled by the
    NMI handler of NMI watchdog. Also, if type of the falsely handled NMI
    is either NMI_UNKNOWN, NMI_SERR or NMI_IO_CHECK, the corresponding
    action is never performed until CondChgd bit is cleared.
    
    I noticed this behavior on systems with Ivy Bridge processors: Intel
    Xeon CPU E5-2630 v2 and Intel Xeon CPU E7-8890 v2. On both systems,
    CondChgd bit in MSR_CORE_PERF_GLOBAL_STATUS MSR has already been set
    in the beginning at boot. Then the CondChgd bit is immediately cleared
    by next wrmsr to MSR_CORE_PERF_GLOBAL_CTRL MSR and appears to remain
    0.
    
    On the other hand, on older processors such as Nehalem, Xeon E7540,
    CondChgd bit is not set in the beginning at boot.
    
    I'm not sure about exact behavior of CondChgd bit, in particular when
    this bit is set. Although I read Intel System Programmer's Manual to
    figure out that, the descriptions I found are:
    
      In 18.9.1:
    
      "The MSR_PERF_GLOBAL_STATUS MSR also provides a ¡sticky bit¢ to
       indicate changes to the state of performancmonitoring hardware"
    
      In Table 35-2 IA-32 Architectural MSRs
    
      63 CondChg: status bits of this register has changed.
    
    These are different from the bahviour I see on the actual system as I
    explained above.
    
    At least, I think ignoring CondChgd bit should be enough for NMI
    watchdog perspective.
    
    Signed-off-by: HATAYAMA Daisuke <d.hatayama@jp.fujitsu.com>
    Acked-by: Don Zickus <dzickus@redhat.com>
    Signed-off-by: Peter Zijlstra <peterz@infradead.org>
    Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: linux-kernel@vger.kernel.org
    Link: http://lkml.kernel.org/r/20140625.103503.409316067.d.hatayama@jp.fujitsu.com
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 3345bb17ab5d1beeed17f286f01f06fa526424a0
Author: Jiri Olsa <jolsa@redhat.com>
Date:   Tue Jun 24 10:20:25 2014 +0200

    perf: Do not allow optimized switch for non-cloned events
    
    commit 1f9a7268c67f0290837aada443d28fd953ddca90 upstream.
    
    The context check in perf_event_context_sched_out allows
    non-cloned context to be part of the optimized schedule
    out switch.
    
    This could move non-cloned context into another workload
    child. Once this child exits, the context is closed and
    leaves all original (parent) events in closed state.
    
    Any other new cloned event will have closed state and not
    measure anything. And probably causing other odd bugs.
    
    Signed-off-by: Jiri Olsa <jolsa@kernel.org>
    Signed-off-by: Peter Zijlstra <peterz@infradead.org>
    Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
    Cc: Paul Mackerras <paulus@samba.org>
    Cc: Frederic Weisbecker <fweisbec@gmail.com>
    Cc: Namhyung Kim <namhyung@kernel.org>
    Cc: Paul Mackerras <paulus@samba.org>
    Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
    Cc: David Ahern <dsahern@gmail.com>
    Cc: Jiri Olsa <jolsa@redhat.com>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Link: http://lkml.kernel.org/r/1403598026-2310-2-git-send-email-jolsa@kernel.org
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit c780438d32b674c825f355fdecc0a012e3e7652f
Author: Zoltan Kiss <zoltan.kiss@citrix.com>
Date:   Fri Jul 18 19:08:05 2014 +0100

    xen-netback: Fix pointer incrementation to avoid incorrect logging
    
    [ Upstream commit d8cfbfc4660054150ca1b7c501a8edc0771022f9 ]
    
    Due to this pointer is increased prematurely, the error log contains rubbish.
    
    Signed-off-by: Zoltan Kiss <zoltan.kiss@citrix.com>
    Reported-by: Armin Zentai <armin.zentai@ezit.hu>
    Cc: netdev@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org
    Cc: xen-devel@lists.xenproject.org
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 4500fc0ec693850ce8cd6ae505cbffcc73f91786
Author: Zoltan Kiss <zoltan.kiss@citrix.com>
Date:   Fri Jul 18 19:08:04 2014 +0100

    xen-netback: Fix releasing header slot on error path
    
    [ Upstream commit 1b860da0404a76af8533099ffe0a965490939369 ]
    
    This patch makes this function aware that the first frag and the header might
    share the same ring slot. That could happen if the first slot is bigger than
    PKT_PROT_LEN. Due to this the error path might release that slot twice or never,
    depending on the error scenario.
    xenvif_idx_release is also removed from xenvif_idx_unmap, and called separately.
    
    Signed-off-by: Zoltan Kiss <zoltan.kiss@citrix.com>
    Reported-by: Armin Zentai <armin.zentai@ezit.hu>
    Cc: netdev@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org
    Cc: xen-devel@lists.xenproject.org
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 50b771050668d2df87f9f5488d860e9696a0a5fc
Author: Zoltan Kiss <zoltan.kiss@citrix.com>
Date:   Fri Jul 18 19:08:03 2014 +0100

    xen-netback: Fix releasing frag_list skbs in error path
    
    [ Upstream commit b42cc6e421e7bf74e545483aa34b99d2a2ca6d3a ]
    
    When the grant operations failed, the skb is freed up eventually, and it tries
    to release the frags, if there is any. For the main skb nr_frags is set to 0 to
    avoid this, but on the frag_list it iterates through the frags array, and tries
    to call put_page on the page pointer which contains garbage at that time.
    
    Signed-off-by: Zoltan Kiss <zoltan.kiss@citrix.com>
    Reported-by: Armin Zentai <armin.zentai@ezit.hu>
    Cc: netdev@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org
    Cc: xen-devel@lists.xenproject.org
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit f6526b2a7f32c894d55e27d31f4c47396b93be2d
Author: Zoltan Kiss <zoltan.kiss@citrix.com>
Date:   Fri Jul 18 19:08:02 2014 +0100

    xen-netback: Fix handling frag_list on grant op error path
    
    [ Upstream commit 1a998d3e6bc1e44f4c0bc7509bdedef8ed3845ec ]
    
    The error handling for skb's with frag_list was completely wrong, it caused
    double unmap attempts to happen if the error was on the first skb. Move it to
    the right place in the loop.
    
    Signed-off-by: Zoltan Kiss <zoltan.kiss@citrix.com>
    Reported-by: Armin Zentai <armin.zentai@ezit.hu>
    Cc: netdev@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org
    Cc: xen-devel@lists.xenproject.org
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 9b78a74623c7789c6b6d3abe4b802fa8cb7d1946
Author: Eric Dumazet <edumazet@google.com>
Date:   Mon Jul 21 07:17:42 2014 +0200

    ipv4: fix buffer overflow in ip_options_compile()
    
    [ Upstream commit 10ec9472f05b45c94db3c854d22581a20b97db41 ]
    
    There is a benign buffer overflow in ip_options_compile spotted by
    AddressSanitizer[1] :
    
    Its benign because we always can access one extra byte in skb->head
    (because header is followed by struct skb_shared_info), and in this case
    this byte is not even used.
    
    [28504.910798] ==================================================================
    [28504.912046] AddressSanitizer: heap-buffer-overflow in ip_options_compile
    [28504.913170] Read of size 1 by thread T15843:
    [28504.914026]  [<ffffffff81802f91>] ip_options_compile+0x121/0x9c0
    [28504.915394]  [<ffffffff81804a0d>] ip_options_get_from_user+0xad/0x120
    [28504.916843]  [<ffffffff8180dedf>] do_ip_setsockopt.isra.15+0x8df/0x1630
    [28504.918175]  [<ffffffff8180ec60>] ip_setsockopt+0x30/0xa0
    [28504.919490]  [<ffffffff8181e59b>] tcp_setsockopt+0x5b/0x90
    [28504.920835]  [<ffffffff8177462f>] sock_common_setsockopt+0x5f/0x70
    [28504.922208]  [<ffffffff817729c2>] SyS_setsockopt+0xa2/0x140
    [28504.923459]  [<ffffffff818cfb69>] system_call_fastpath+0x16/0x1b
    [28504.924722]
    [28504.925106] Allocated by thread T15843:
    [28504.925815]  [<ffffffff81804995>] ip_options_get_from_user+0x35/0x120
    [28504.926884]  [<ffffffff8180dedf>] do_ip_setsockopt.isra.15+0x8df/0x1630
    [28504.927975]  [<ffffffff8180ec60>] ip_setsockopt+0x30/0xa0
    [28504.929175]  [<ffffffff8181e59b>] tcp_setsockopt+0x5b/0x90
    [28504.930400]  [<ffffffff8177462f>] sock_common_setsockopt+0x5f/0x70
    [28504.931677]  [<ffffffff817729c2>] SyS_setsockopt+0xa2/0x140
    [28504.932851]  [<ffffffff818cfb69>] system_call_fastpath+0x16/0x1b
    [28504.934018]
    [28504.934377] The buggy address ffff880026382828 is located 0 bytes to the right
    [28504.934377]  of 40-byte region [ffff880026382800, ffff880026382828)
    [28504.937144]
    [28504.937474] Memory state around the buggy address:
    [28504.938430]  ffff880026382300: ........ rrrrrrrr rrrrrrrr rrrrrrrr
    [28504.939884]  ffff880026382400: ffffffff rrrrrrrr rrrrrrrr rrrrrrrr
    [28504.941294]  ffff880026382500: .....rrr rrrrrrrr rrrrrrrr rrrrrrrr
    [28504.942504]  ffff880026382600: ffffffff rrrrrrrr rrrrrrrr rrrrrrrr
    [28504.943483]  ffff880026382700: ffffffff rrrrrrrr rrrrrrrr rrrrrrrr
    [28504.944511] >ffff880026382800: .....rrr rrrrrrrr rrrrrrrr rrrrrrrr
    [28504.945573]                         ^
    [28504.946277]  ffff880026382900: ffffffff rrrrrrrr rrrrrrrr rrrrrrrr
    [28505.094949]  ffff880026382a00: ffffffff rrrrrrrr rrrrrrrr rrrrrrrr
    [28505.096114]  ffff880026382b00: ffffffff rrrrrrrr rrrrrrrr rrrrrrrr
    [28505.097116]  ffff880026382c00: ffffffff rrrrrrrr rrrrrrrr rrrrrrrr
    [28505.098472]  ffff880026382d00: ffffffff rrrrrrrr rrrrrrrr rrrrrrrr
    [28505.099804] Legend:
    [28505.100269]  f - 8 freed bytes
    [28505.100884]  r - 8 redzone bytes
    [28505.101649]  . - 8 allocated bytes
    [28505.102406]  x=1..7 - x allocated bytes + (8-x) redzone bytes
    [28505.103637] ==================================================================
    
    [1] https://code.google.com/p/address-sanitizer/wiki/AddressSanitizerForKernel
    
    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 4a52100efa9b409f0682a445337f540a33e2da7b
Author: Ben Hutchings <ben@decadent.org.uk>
Date:   Mon Jul 21 00:06:48 2014 +0100

    dns_resolver: Null-terminate the right string
    
    [ Upstream commit 640d7efe4c08f06c4ae5d31b79bd8740e7f6790a ]
    
    *_result[len] is parsed as *(_result[len]) which is not at all what we
    want to touch here.
    
    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
    Fixes: 84a7c0b1db1c ("dns_resolver: assure that dns_query() result is null-terminated")
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit e0e196f4045d09345e2915b0e8f15f89edfe7803
Author: Manuel Schölling <manuel.schoelling@gmx.de>
Date:   Sat Jun 7 23:57:25 2014 +0200

    dns_resolver: assure that dns_query() result is null-terminated
    
    [ Upstream commit 84a7c0b1db1c17d5ded8d3800228a608e1070b40 ]
    
    dns_query() credulously assumes that keys are null-terminated and
    returns a copy of a memory block that is off by one.
    
    Signed-off-by: Manuel Schölling <manuel.schoelling@gmx.de>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 6b948b4825098dd313a1703b57e1b5b2a5e56105
Author: Christoph Schulz <develop@kristov.de>
Date:   Mon Jul 14 08:01:10 2014 +0200

    net: ppp: don't call sk_chk_filter twice
    
    [ Upstream commit 3916a3192793fd3c11f69d623ef0cdbdbf9ea10a ]
    
    Commit 568f194e8bd16c353ad50f9ab95d98b20578a39d ("net: ppp: use
    sk_unattached_filter api") causes sk_chk_filter() to be called twice when
    setting a PPP pass or active filter. This applies to both the generic PPP
    subsystem implemented by drivers/net/ppp/ppp_generic.c and the ISDN PPP
    subsystem implemented by drivers/isdn/i4l/isdn_ppp.c. The first call is from
    within get_filter(). The second one is through the call chain
    
      ppp_ioctl() or isdn_ppp_ioctl()
      --> sk_unattached_filter_create()
          --> __sk_prepare_filter()
              --> sk_chk_filter()
    
    The first call from within get_filter() should be deleted as get_filter() is
    called just before calling sk_unattached_filter_create() later on, which
    eventually calls sk_chk_filter() anyway.
    
    For 3.15.x, this proposed change is a bugfix rather than a pure optimization as
    in that branch, sk_chk_filter() may replace filter codes by other codes which
    are not recognized when executing sk_chk_filter() a second time. So with
    3.15.x, if sk_chk_filter() is called twice, the second invocation may yield
    EINVAL (this depends on the filter codes found in the filter to be set, but
    because the replacement is done for frequently used codes, this is almost
    always the case). The net effect is that setting pass and/or active PPP filters
    does not work anymore, since sk_unattached_filter_create() always returns
    EINVAL due to the second call to sk_chk_filter(), regardless whether the filter
    was originally sane or not.
    
    Signed-off-by: Christoph Schulz <develop@kristov.de>
    Acked-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 d40a49e9757c10998cf7bce304b74411cbb1c9e6
Author: Bjørn Mork <bjorn@mork.no>
Date:   Thu Jul 17 13:34:09 2014 +0200

    net: huawei_cdc_ncm: add "subclass 3" devices
    
    [ Upstream commit c2a6c7813f1ffae636e369b5d7011c9f518d3cd9 ]
    
    Huawei's usage of the subclass and protocol fields is not 100%
    clear to us, but there appears to be a very strict system.
    
    A device with the "shared" device ID 12d1:1506 and this NCM
    function was recently reported (showing only default altsetting):
    
        Interface Descriptor:
          bLength                 9
          bDescriptorType         4
          bInterfaceNumber        1
          bAlternateSetting       0
          bNumEndpoints           1
          bInterfaceClass       255 Vendor Specific Class
          bInterfaceSubClass      3
          bInterfaceProtocol     22
          iInterface              8 CDC Network Control Model (NCM)
          ** UNRECOGNIZED:  05 24 00 10 01
          ** UNRECOGNIZED:  06 24 1a 00 01 1f
          ** UNRECOGNIZED:  0c 24 1b 00 01 00 04 10 14 dc 05 20
          ** UNRECOGNIZED:  0d 24 0f 0a 0f 00 00 00 ea 05 03 00 01
          ** UNRECOGNIZED:  05 24 06 01 01
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x85  EP 5 IN
            bmAttributes            3
              Transfer Type            Interrupt
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0010  1x 16 bytes
            bInterval               9
    
    Cc: Enrico Mioso <mrkiko.rs@gmail.com>
    Signed-off-by: Bjørn Mork <bjorn@mork.no>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 6d4bd0b53a88b3eeaa309f2a16e14497b07ebf46
Author: Christoph Schulz <develop@kristov.de>
Date:   Wed Jul 16 22:10:29 2014 +0200

    net: ppp: fix creating PPP pass and active filters
    
    [ Upstream commit cc25eaae238ddd693aa5eaa73e565d8ff4915f6e ]
    
    Commit 568f194e8bd16c353ad50f9ab95d98b20578a39d ("net: ppp: use
    sk_unattached_filter api") inadvertently changed the logic when setting
    PPP pass and active filters. This applies to both the generic PPP subsystem
    implemented by drivers/net/ppp/ppp_generic.c and the ISDN PPP subsystem
    implemented by drivers/isdn/i4l/isdn_ppp.c. The original code in ppp_ioctl()
    (or isdn_ppp_ioctl(), resp.) handling PPPIOCSPASS and PPPIOCSACTIVE allowed to
    remove a pass/active filter previously set by using a filter of length zero.
    However, with the new code this is not possible anymore as this case is not
    explicitly checked for, which leads to passing NULL as a filter to
    sk_unattached_filter_create(). This results in returning EINVAL to the caller.
    
    Additionally, the variables ppp->pass_filter and ppp->active_filter (or
    is->pass_filter and is->active_filter, resp.) are not reset to NULL, although
    the filters they point to may have been destroyed by
    sk_unattached_filter_destroy(), so in this EINVAL case dangling pointers are
    left behind (provided the pointers were previously non-NULL).
    
    This patch corrects both problems by checking whether the filter passed is
    empty or non-empty, and prevents sk_unattached_filter_create() from being
    called in the first case. Moreover, the pointers are always reset to NULL
    as soon as sk_unattached_filter_destroy() returns.
    
    Signed-off-by: Christoph Schulz <develop@kristov.de>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit e87c911ec1d4330d0a97a427ccaac38b149ca45a
Author: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Date:   Wed Jul 16 10:02:26 2014 -0400

    sunvnet: clean up objects created in vnet_new() on vnet_exit()
    
    [ Upstream commit a4b70a07ed12a71131cab7adce2ce91c71b37060 ]
    
    Nothing cleans up the objects created by
    vnet_new(), they are completely leaked.
    
    vnet_exit(), after doing the vio_unregister_driver() to clean
    up ports, should call a helper function that iterates over vnet_list
    and cleans up those objects. This includes unregister_netdevice()
    as well as free_netdev().
    
    Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
    Acked-by: Dave Kleikamp <dave.kleikamp@oracle.com>
    Reviewed-by: Karl Volz <karl.volz@oracle.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit aaeb55cc24f058b34e9d8d3071a11b9c63bb4793
Author: Jerry Chu <hkchu@google.com>
Date:   Mon Jul 14 15:54:46 2014 -0700

    net-gre-gro: Fix a bug that breaks the forwarding path
    
    [ Upstream commit c3caf1192f904de2f1381211f564537235d50de3 ]
    
    Fixed a bug that was introduced by my GRE-GRO patch
    (bf5a755f5e9186406bbf50f4087100af5bd68e40 net-gre-gro: Add GRE
    support to the GRO stack) that breaks the forwarding path
    because various GSO related fields were not set. The bug will
    cause on the egress path either the GSO code to fail, or a
    GRE-TSO capable (NETIF_F_GSO_GRE) NICs to choke. The following
    fix has been tested for both cases.
    
    Signed-off-by: H.K. Jerry Chu <hkchu@google.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 8680ed6dff1ebcede21a15434081176528e22fc6
Author: Nikolay Aleksandrov <nikolay@redhat.com>
Date:   Sun Jul 13 09:47:47 2014 +0200

    bonding: fix ad_select module param check
    
    [ Upstream commit 548d28bd0eac840d122b691279ce9f4ce6ecbfb6 ]
    
    Obvious copy/paste error when I converted the ad_select to the new
    option API. "lacp_rate" there should be "ad_select" so we can get the
    proper value.
    
    CC: Jay Vosburgh <j.vosburgh@gmail.com>
    CC: Veaceslav Falico <vfalico@gmail.com>
    CC: Andy Gospodarek <andy@greyhouse.net>
    CC: David S. Miller <davem@davemloft.net>
    
    Fixes: 9e5f5eebe765 ("bonding: convert ad_select to use the new option
    API")
    Reported-by: Karim Scheik <karim.scheik@prisma-solutions.at>
    Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 37c1638f0c9a270036c42cf4b026df12d9679aae
Author: Christoph Schulz <develop@kristov.de>
Date:   Sun Jul 13 00:53:15 2014 +0200

    net: pppoe: use correct channel MTU when using Multilink PPP
    
    [ Upstream commit a8a3e41c67d24eb12f9ab9680cbb85e24fcd9711 ]
    
    The PPP channel MTU is used with Multilink PPP when ppp_mp_explode() (see
    ppp_generic module) tries to determine how big a fragment might be. According
    to RFC 1661, the MTU excludes the 2-byte PPP protocol field, see the
    corresponding comment and code in ppp_mp_explode():
    
    		/*
    		 * hdrlen includes the 2-byte PPP protocol field, but the
    		 * MTU counts only the payload excluding the protocol field.
    		 * (RFC1661 Section 2)
    		 */
    		mtu = pch->chan->mtu - (hdrlen - 2);
    
    However, the pppoe module *does* include the PPP protocol field in the channel
    MTU, which is wrong as it causes the PPP payload to be 1-2 bytes too big under
    certain circumstances (one byte if PPP protocol compression is used, two
    otherwise), causing the generated Ethernet packets to be dropped. So the pppoe
    module has to subtract two bytes from the channel MTU. This error only
    manifests itself when using Multilink PPP, as otherwise the channel MTU is not
    used anywhere.
    
    In the following, I will describe how to reproduce this bug. We configure two
    pppd instances for multilink PPP over two PPPoE links, say eth2 and eth3, with
    a MTU of 1492 bytes for each link and a MRRU of 2976 bytes. (This MRRU is
    computed by adding the two link MTUs and subtracting the MP header twice, which
    is 4 bytes long.) The necessary pppd statements on both sides are "multilink
    mtu 1492 mru 1492 mrru 2976". On the client side, we additionally need "plugin
    rp-pppoe.so eth2" and "plugin rp-pppoe.so eth3", respectively; on the server
    side, we additionally need to start two pppoe-server instances to be able to
    establish two PPPoE sessions, one over eth2 and one over eth3. We set the MTU
    of the PPP network interface to the MRRU (2976) on both sides of the connection
    in order to make use of the higher bandwidth. (If we didn't do that, IP
    fragmentation would kick in, which we want to avoid.)
    
    Now we send a ICMPv4 echo request with a payload of 2948 bytes from client to
    server over the PPP link. This results in the following network packet:
    
       2948 (echo payload)
     +    8 (ICMPv4 header)
     +   20 (IPv4 header)
    ---------------------
       2976 (PPP payload)
    
    These 2976 bytes do not exceed the MTU of the PPP network interface, so the
    IP packet is not fragmented. Now the multilink PPP code in ppp_mp_explode()
    prepends one protocol byte (0x21 for IPv4), making the packet one byte bigger
    than the negotiated MRRU. So this packet would have to be divided in three
    fragments. But this does not happen as each link MTU is assumed to be two bytes
    larger. So this packet is diveded into two fragments only, one of size 1489 and
    one of size 1488. Now we have for that bigger fragment:
    
       1489 (PPP payload)
     +    4 (MP header)
     +    2 (PPP protocol field for the MP payload (0x3d))
     +    6 (PPPoE header)
    --------------------------
       1501 (Ethernet payload)
    
    This packet exceeds the link MTU and is discarded.
    
    If one configures the link MTU on the client side to 1501, one can see the
    discarded Ethernet frames with tcpdump running on the client. A
    
    ping -s 2948 -c 1 192.168.15.254
    
    leads to the smaller fragment that is correctly received on the server side:
    
    (tcpdump -vvvne -i eth3 pppoes and ppp proto 0x3d)
    52:54:00:ad:87:fd > 52:54:00:79:5c:d0, ethertype PPPoE S (0x8864),
      length 1514: PPPoE  [ses 0x3] MLPPP (0x003d), length 1494: seq 0x000,
      Flags [end], length 1492
    
    and to the bigger fragment that is not received on the server side:
    
    (tcpdump -vvvne -i eth2 pppoes and ppp proto 0x3d)
    52:54:00:70:9e:89 > 52:54:00:5d:6f:b0, ethertype PPPoE S (0x8864),
      length 1515: PPPoE  [ses 0x5] MLPPP (0x003d), length 1495: seq 0x000,
      Flags [begin], length 1493
    
    With the patch below, we correctly obtain three fragments:
    
    52:54:00:ad:87:fd > 52:54:00:79:5c:d0, ethertype PPPoE S (0x8864),
      length 1514: PPPoE  [ses 0x1] MLPPP (0x003d), length 1494: seq 0x000,
      Flags [begin], length 1492
    52:54:00:70:9e:89 > 52:54:00:5d:6f:b0, ethertype PPPoE S (0x8864),
      length 1514: PPPoE  [ses 0x1] MLPPP (0x003d), length 1494: seq 0x000,
      Flags [none], length 1492
    52:54:00:ad:87:fd > 52:54:00:79:5c:d0, ethertype PPPoE S (0x8864),
      length 27: PPPoE  [ses 0x1] MLPPP (0x003d), length 7: seq 0x000,
      Flags [end], length 5
    
    And the ICMPv4 echo request is successfully received at the server side:
    
    IP (tos 0x0, ttl 64, id 21925, offset 0, flags [DF], proto ICMP (1),
      length 2976)
        192.168.222.2 > 192.168.15.254: ICMP echo request, id 30530, seq 0,
          length 2956
    
    The bug was introduced in commit c9aa6895371b2a257401f59d3393c9f7ac5a8698
    ("[PPPOE]: Advertise PPPoE MTU") from the very beginning. This patch applies
    to 3.10 upwards but the fix can be applied (with minor modifications) to
    kernels as old as 2.6.32.
    
    Signed-off-by: Christoph Schulz <develop@kristov.de>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 97df8a2322a5e2f50d88e39b5507b862eb9d1395
Author: Daniel Borkmann <dborkman@redhat.com>
Date:   Sat Jul 12 20:30:35 2014 +0200

    net: sctp: fix information leaks in ulpevent layer
    
    [ Upstream commit 8f2e5ae40ec193bc0a0ed99e95315c3eebca84ea ]
    
    While working on some other SCTP code, I noticed that some
    structures shared with user space are leaking uninitialized
    stack or heap buffer. In particular, struct sctp_sndrcvinfo
    has a 2 bytes hole between .sinfo_flags and .sinfo_ppid that
    remains unfilled by us in sctp_ulpevent_read_sndrcvinfo() when
    putting this into cmsg. But also struct sctp_remote_error
    contains a 2 bytes hole that we don't fill but place into a skb
    through skb_copy_expand() via sctp_ulpevent_make_remote_error().
    
    Both structures are defined by the IETF in RFC6458:
    
    * Section 5.3.2. SCTP Header Information Structure:
    
      The sctp_sndrcvinfo structure is defined below:
    
      struct sctp_sndrcvinfo {
        uint16_t sinfo_stream;
        uint16_t sinfo_ssn;
        uint16_t sinfo_flags;
        <-- 2 bytes hole  -->
        uint32_t sinfo_ppid;
        uint32_t sinfo_context;
        uint32_t sinfo_timetolive;
        uint32_t sinfo_tsn;
        uint32_t sinfo_cumtsn;
        sctp_assoc_t sinfo_assoc_id;
      };
    
    * 6.1.3. SCTP_REMOTE_ERROR:
    
      A remote peer may send an Operation Error message to its peer.
      This message indicates a variety of error conditions on an
      association. The entire ERROR chunk as it appears on the wire
      is included in an SCTP_REMOTE_ERROR event. Please refer to the
      SCTP specification [RFC4960] and any extensions for a list of
      possible error formats. An SCTP error notification has the
      following format:
    
      struct sctp_remote_error {
        uint16_t sre_type;
        uint16_t sre_flags;
        uint32_t sre_length;
        uint16_t sre_error;
        <-- 2 bytes hole  -->
        sctp_assoc_t sre_assoc_id;
        uint8_t  sre_data[];
      };
    
    Fix this by setting both to 0 before filling them out. We also
    have other structures shared between user and kernel space in
    SCTP that contains holes (e.g. struct sctp_paddrthlds), but we
    copy that buffer over from user space first and thus don't need
    to care about it in that cases.
    
    While at it, we can also remove lengthy comments copied from
    the draft, instead, we update the comment with the correct RFC
    number where one can look it up.
    
    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 197a020d98de01c81cecf931e26f99faf848d0ca
Author: Jon Paul Maloy <jon.maloy@ericsson.com>
Date:   Fri Jul 11 08:45:27 2014 -0400

    tipc: clear 'next'-pointer of message fragments before reassembly
    
    [ Upstream commit 999417549c16dd0e3a382aa9f6ae61688db03181 ]
    
    If the 'next' pointer of the last fragment buffer in a message is not
    zeroed before reassembly, we risk ending up with a corrupt message,
    since the reassembly function itself isn't doing this.
    
    Currently, when a buffer is retrieved from the deferred queue of the
    broadcast link, the next pointer is not cleared, with the result as
    described above.
    
    This commit corrects this, and thereby fixes a bug that may occur when
    long broadcast messages are transmitted across dual interfaces. The bug
    has been present since 40ba3cdf542a469aaa9083fa041656e59b109b90 ("tipc:
    message reassembly using fragment chain")
    
    This commit should be applied to both net and net-next.
    
    Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit c7cd70207d5e4899cf2f4fde8e41e1b5892fc501
Author: hayeswang <hayeswang@realtek.com>
Date:   Fri Jul 11 16:48:27 2014 +0800

    r8152: fix r8152_csum_workaround function
    
    [ Upstream commit a91d45f1a343188793d6f2bdf1a72c64015a8255 ]
    
    The transport offset of the IPv4 packet should be fixed and wouldn't
    be out of the hw limitation, so the r8152_csum_workaround() should
    be used for IPv6 packets.
    
    Signed-off-by: Hayes Wang <hayeswang@realtek.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 4ede81d69903e1f8f3ba6dff921ca819dbdc5029
Author: Suresh Reddy <Suresh.Reddy@emulex.com>
Date:   Fri Jul 11 14:03:01 2014 +0530

    be2net: set EQ DB clear-intr bit in be_open()
    
    [ Upstream commit 4cad9f3b61c7268fa89ab8096e23202300399b5d ]
    
    On BE3, if the clear-interrupt bit of the EQ doorbell is not set the first
    time it is armed, ocassionally we have observed that the EQ doesn't raise
    anymore interrupts even if it is in armed state.
    This patch fixes this by setting the clear-interrupt bit when EQs are
    armed for the first time in be_open().
    
    Signed-off-by: Suresh Reddy <Suresh.Reddy@emulex.com>
    Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 190b33c958c5a53c12d24504d313be6d34601bac
Author: Ben Pfaff <blp@nicira.com>
Date:   Wed Jul 9 10:31:22 2014 -0700

    netlink: Fix handling of error from netlink_dump().
    
    [ Upstream commit ac30ef832e6af0505b6f0251a6659adcfa74975e ]
    
    netlink_dump() returns a negative errno value on error.  Until now,
    netlink_recvmsg() directly recorded that negative value in sk->sk_err, but
    that's wrong since sk_err takes positive errno values.  (This manifests as
    userspace receiving a positive return value from the recv() system call,
    falsely indicating success.) This bug was introduced in the commit that
    started checking the netlink_dump() return value, commit b44d211 (netlink:
    handle errors from netlink_dump()).
    
    Multithreaded Netlink dumps are one way to trigger this behavior in
    practice, as described in the commit message for the userspace workaround
    posted here:
        http://openvswitch.org/pipermail/dev/2014-June/042339.html
    
    This commit also fixes the same bug in netlink_poll(), introduced in commit
    cd1df525d (netlink: add flow control for memory mapped I/O).
    
    Signed-off-by: Ben Pfaff <blp@nicira.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit b1932501f8514a0328461ecf770d355c62dd8e2e
Author: Thomas Fitzsimmons <fitzsim@fitzsim.org>
Date:   Tue Jul 8 19:44:07 2014 -0400

    net: mvneta: Fix big endian issue in mvneta_txq_desc_csum()
    
    [ Upstream commit 0a1985879437d14bda8c90d0dae3455c467d7642 ]
    
    This commit fixes the command value generated for CSUM calculation
    when running in big endian mode.  The Ethernet protocol ID for IP was
    being unconditionally byte-swapped in the layer 3 protocol check (with
    swab16), which caused the mvneta driver to not function correctly in
    big endian mode.  This patch byte-swaps the ID conditionally with
    htons.
    
    Cc: <stable@vger.kernel.org> # v3.13+
    Signed-off-by: Thomas Fitzsimmons <fitzsim@fitzsim.org>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit df902cdef12b8c1810d5e8f6e7d044c972bb60f8
Author: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date:   Tue Jul 8 10:49:43 2014 +0200

    net: mvneta: fix operation in 10 Mbit/s mode
    
    [ Upstream commit 4d12bc63ab5e48c1d78fa13883cf6fefcea3afb1 ]
    
    As reported by Maggie Mae Roxas, the mvneta driver doesn't behave
    properly in 10 Mbit/s mode. This is due to a misconfiguration of the
    MVNETA_GMAC_AUTONEG_CONFIG register: bit MVNETA_GMAC_CONFIG_MII_SPEED
    must be set for a 100 Mbit/s speed, but cleared for a 10 Mbit/s speed,
    which the driver was not properly doing. This commit adjusts that by
    setting the MVNETA_GMAC_CONFIG_MII_SPEED bit only in 100 Mbit/s mode,
    and relying on the fact that all the speed related bits of this
    register are cleared at the beginning of the mvneta_adjust_link()
    function.
    
    This problem exists since c5aff18204da0 ("net: mvneta: driver for
    Marvell Armada 370/XP network unit") which is the commit that
    introduced the mvneta driver in the kernel.
    
    Cc: <stable@vger.kernel.org> # v3.8+
    Fixes: c5aff18204da0 ("net: mvneta: driver for Marvell Armada 370/XP network unit")
    Reported-by: Maggie Mae Roxas <maggie.mae.roxas@gmail.com>
    Cc: Maggie Mae Roxas <maggie.mae.roxas@gmail.com>
    Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 8cadf83b1be602c0ffbeb45e0e9f7b8858aeccdb
Author: Andrey Utkin <andrey.krieger.utkin@gmail.com>
Date:   Mon Jul 7 23:22:50 2014 +0300

    appletalk: Fix socket referencing in skb
    
    [ Upstream commit 36beddc272c111689f3042bf3d10a64d8a805f93 ]
    
    Setting just skb->sk without taking its reference and setting a
    destructor is invalid. However, in the places where this was done, skb
    is used in a way not requiring skb->sk setting. So dropping the setting
    of skb->sk.
    Thanks to Eric Dumazet <eric.dumazet@gmail.com> for correct solution.
    
    Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=79441
    Reported-by: Ed Martin <edman007@edman007.com>
    Signed-off-by: Andrey Utkin <andrey.krieger.utkin@gmail.com>
    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 435920f7b191326364803fb30cc750107fe3cf6b
Author: Yuchung Cheng <ycheng@google.com>
Date:   Wed Jul 2 12:07:16 2014 -0700

    tcp: fix false undo corner cases
    
    [ Upstream commit 6e08d5e3c8236e7484229e46fdf92006e1dd4c49 ]
    
    The undo code assumes that, upon entering loss recovery, TCP
    1) always retransmit something
    2) the retransmission never fails locally (e.g., qdisc drop)
    
    so undo_marker is set in tcp_enter_recovery() and undo_retrans is
    incremented only when tcp_retransmit_skb() is successful.
    
    When the assumption is broken because TCP's cwnd is too small to
    retransmit or the retransmit fails locally. The next (DUP)ACK
    would incorrectly revert the cwnd and the congestion state in
    tcp_try_undo_dsack() or tcp_may_undo(). Subsequent (DUP)ACKs
    may enter the recovery state. The sender repeatedly enter and
    (incorrectly) exit recovery states if the retransmits continue to
    fail locally while receiving (DUP)ACKs.
    
    The fix is to initialize undo_retrans to -1 and start counting on
    the first retransmission. Always increment undo_retrans even if the
    retransmissions fail locally because they couldn't cause DSACKs to
    undo the cwnd reduction.
    
    Signed-off-by: Yuchung Cheng <ycheng@google.com>
    Signed-off-by: Neal Cardwell <ncardwell@google.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 4380eb1f740b392d2fcb8100f026d2278cef1dc4
Author: dingtianhong <dingtianhong@huawei.com>
Date:   Wed Jul 2 13:50:48 2014 +0800

    igmp: fix the problem when mc leave group
    
    [ Upstream commit 52ad353a5344f1f700c5b777175bdfa41d3cd65a ]
    
    The problem was triggered by these steps:
    
    1) create socket, bind and then setsockopt for add mc group.
       mreq.imr_multiaddr.s_addr = inet_addr("255.0.0.37");
       mreq.imr_interface.s_addr = inet_addr("192.168.1.2");
       setsockopt(sockfd, IPPROTO_IP, IP_ADD_MEMBERSHIP, &mreq, sizeof(mreq));
    
    2) drop the mc group for this socket.
       mreq.imr_multiaddr.s_addr = inet_addr("255.0.0.37");
       mreq.imr_interface.s_addr = inet_addr("0.0.0.0");
       setsockopt(sockfd, IPPROTO_IP, IP_DROP_MEMBERSHIP, &mreq, sizeof(mreq));
    
    3) and then drop the socket, I found the mc group was still used by the dev:
    
       netstat -g
    
       Interface       RefCnt Group
       --------------- ------ ---------------------
       eth2		   1	  255.0.0.37
    
    Normally even though the IP_DROP_MEMBERSHIP return error, the mc group still need
    to be released for the netdev when drop the socket, but this process was broken when
    route default is NULL, the reason is that:
    
    The ip_mc_leave_group() will choose the in_dev by the imr_interface.s_addr, if input addr
    is NULL, the default route dev will be chosen, then the ifindex is got from the dev,
    then polling the inet->mc_list and return -ENODEV, but if the default route dev is NULL,
    the in_dev and ifIndex is both NULL, when polling the inet->mc_list, the mc group will be
    released from the mc_list, but the dev didn't dec the refcnt for this mc group, so
    when dropping the socket, the mc_list is NULL and the dev still keep this group.
    
    v1->v2: According Hideaki's suggestion, we should align with IPv6 (RFC3493) and BSDs,
    	so I add the checking for the in_dev before polling the mc_list, make sure when
    	we remove the mc group, dec the refcnt to the real dev which was using the mc address.
    	The problem would never happened again.
    
    Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 38f198c683616a2e2edd363c8c4fa815fda83af8
Author: Loic Prylli <loicp@google.com>
Date:   Tue Jul 1 21:39:43 2014 -0700

    net: Fix NETDEV_CHANGE notifier usage causing spurious arp flush
    
    [ Upstream commit 54951194656e4853e441266fd095f880bc0398f3 ]
    
    A bug was introduced in NETDEV_CHANGE notifier sequence causing the
    arp table to be sometimes spuriously cleared (including manual arp
    entries marked permanent), upon network link carrier changes.
    
    The changed argument for the notifier was applied only to a single
    caller of NETDEV_CHANGE, missing among others netdev_state_change().
    So upon net_carrier events induced by the network, which are
    triggering a call to netdev_state_change(), arp_netdev_event() would
    decide whether to clear or not arp cache based on random/junk stack
    values (a kind of read buffer overflow).
    
    Fixes: be9efd365328 ("net: pass changed flags along with NETDEV_CHANGE event")
    Fixes: 6c8b4e3ff81b ("arp: flush arp cache on IFF_NOARP change")
    Signed-off-by: Loic Prylli <loicp@google.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit f6befbb7d6c317518fc24ded8f69a2b3a94ae0c5
Author: Bjørn Mork <bjorn@mork.no>
Date:   Thu Jul 17 13:33:51 2014 +0200

    net: qmi_wwan: add two Sierra Wireless/Netgear devices
    
    [ Upstream commit 5343330010a892b76a97fd93ad3c455a4a32a7fb ]
    
    Add two device IDs found in an out-of-tree driver downloadable
    from Netgear.
    
    Signed-off-by: Bjørn Mork <bjorn@mork.no>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 1dfb820f1707703f0f39cbaecca3befa0cf663ea
Author: Bernd Wachter <bernd.wachter@jolla.com>
Date:   Tue Jul 1 22:01:09 2014 +0300

    net: qmi_wwan: Add ID for Telewell TW-LTE 4G v2
    
    [ Upstream commit 8dcb4b1526747d8431f9895e153dd478c9d16186 ]
    
    There's a new version of the Telewell 4G modem working with, but not
    recognized by this driver.
    
    Signed-off-by: Bernd Wachter <bernd.wachter@jolla.com>
    Acked-by: Bjørn Mork <bjorn@mork.no>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit b232d929c5b7c2f7124f5a3c12d122ec3e3a8545
Author: Edward Allcutt <edward.allcutt@openmarket.com>
Date:   Mon Jun 30 16:16:02 2014 +0100

    ipv4: icmp: Fix pMTU handling for rare case
    
    [ Upstream commit 68b7107b62983f2cff0948292429d5f5999df096 ]
    
    Some older router implementations still send Fragmentation Needed
    errors with the Next-Hop MTU field set to zero. This is explicitly
    described as an eventuality that hosts must deal with by the
    standard (RFC 1191) since older standards specified that those
    bits must be zero.
    
    Linux had a generic (for all of IPv4) implementation of the algorithm
    described in the RFC for searching a list of MTU plateaus for a good
    value. Commit 46517008e116 ("ipv4: Kill ip_rt_frag_needed().")
    removed this as part of the changes to remove the routing cache.
    Subsequently any Fragmentation Needed packet with a zero Next-Hop
    MTU has been discarded without being passed to the per-protocol
    handlers or notifying userspace for raw sockets.
    
    When there is a router which does not implement RFC 1191 on an
    MTU limited path then this results in stalled connections since
    large packets are discarded and the local protocols are not
    notified so they never attempt to lower the pMTU.
    
    One example I have seen is an OpenBSD router terminating IPSec
    tunnels. It's worth pointing out that this case is distinct from
    the BSD 4.2 bug which incorrectly calculated the Next-Hop MTU
    since the commit in question dismissed that as a valid concern.
    
    All of the per-protocols handlers implement the simple approach from
    RFC 1191 of immediately falling back to the minimum value. Although
    this is sub-optimal it is vastly preferable to connections hanging
    indefinitely.
    
    Remove the Next-Hop MTU != 0 check and allow such packets
    to follow the normal path.
    
    Fixes: 46517008e116 ("ipv4: Kill ip_rt_frag_needed().")
    Signed-off-by: Edward Allcutt <edward.allcutt@openmarket.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 0ee158b60aae70a68441f1363e8fff29e3c7588d
Author: Christoph Paasch <christoph.paasch@uclouvain.be>
Date:   Sat Jun 28 18:26:37 2014 +0200

    tcp: Fix divide by zero when pushing during tcp-repair
    
    [ Upstream commit 5924f17a8a30c2ae18d034a86ee7581b34accef6 ]
    
    When in repair-mode and TCP_RECV_QUEUE is set, we end up calling
    tcp_push with mss_now being 0. If data is in the send-queue and
    tcp_set_skb_tso_segs gets called, we crash because it will divide by
    mss_now:
    
    [  347.151939] divide error: 0000 [#1] SMP
    [  347.152907] Modules linked in:
    [  347.152907] CPU: 1 PID: 1123 Comm: packetdrill Not tainted 3.16.0-rc2 #4
    [  347.152907] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2007
    [  347.152907] task: f5b88540 ti: f3c82000 task.ti: f3c82000
    [  347.152907] EIP: 0060:[<c1601359>] EFLAGS: 00210246 CPU: 1
    [  347.152907] EIP is at tcp_set_skb_tso_segs+0x49/0xa0
    [  347.152907] EAX: 00000b67 EBX: f5acd080 ECX: 00000000 EDX: 00000000
    [  347.152907] ESI: f5a28f40 EDI: f3c88f00 EBP: f3c83d10 ESP: f3c83d00
    [  347.152907]  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
    [  347.152907] CR0: 80050033 CR2: 083158b0 CR3: 35146000 CR4: 000006b0
    [  347.152907] Stack:
    [  347.152907]  c167f9d9 f5acd080 000005b4 00000002 f3c83d20 c16013e6 f3c88f00 f5acd080
    [  347.152907]  f3c83da0 c1603b5a f3c83d38 c10a0188 00000000 00000000 f3c83d84 c10acc85
    [  347.152907]  c1ad5ec0 00000000 00000000 c1ad679c 010003e0 00000000 00000000 f3c88fc8
    [  347.152907] Call Trace:
    [  347.152907]  [<c167f9d9>] ? apic_timer_interrupt+0x2d/0x34
    [  347.152907]  [<c16013e6>] tcp_init_tso_segs+0x36/0x50
    [  347.152907]  [<c1603b5a>] tcp_write_xmit+0x7a/0xbf0
    [  347.152907]  [<c10a0188>] ? up+0x28/0x40
    [  347.152907]  [<c10acc85>] ? console_unlock+0x295/0x480
    [  347.152907]  [<c10ad24f>] ? vprintk_emit+0x1ef/0x4b0
    [  347.152907]  [<c1605716>] __tcp_push_pending_frames+0x36/0xd0
    [  347.152907]  [<c15f4860>] tcp_push+0xf0/0x120
    [  347.152907]  [<c15f7641>] tcp_sendmsg+0xf1/0xbf0
    [  347.152907]  [<c116d920>] ? kmem_cache_free+0xf0/0x120
    [  347.152907]  [<c106a682>] ? __sigqueue_free+0x32/0x40
    [  347.152907]  [<c106a682>] ? __sigqueue_free+0x32/0x40
    [  347.152907]  [<c114f0f0>] ? do_wp_page+0x3e0/0x850
    [  347.152907]  [<c161c36a>] inet_sendmsg+0x4a/0xb0
    [  347.152907]  [<c1150269>] ? handle_mm_fault+0x709/0xfb0
    [  347.152907]  [<c15a006b>] sock_aio_write+0xbb/0xd0
    [  347.152907]  [<c1180b79>] do_sync_write+0x69/0xa0
    [  347.152907]  [<c1181023>] vfs_write+0x123/0x160
    [  347.152907]  [<c1181d55>] SyS_write+0x55/0xb0
    [  347.152907]  [<c167f0d8>] sysenter_do_call+0x12/0x28
    
    This can easily be reproduced with the following packetdrill-script (the
    "magic" with netem, sk_pacing and limit_output_bytes is done to prevent
    the kernel from pushing all segments, because hitting the limit without
    doing this is not so easy with packetdrill):
    
    0   socket(..., SOCK_STREAM, IPPROTO_TCP) = 3
    +0  setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
    
    +0  bind(3, ..., ...) = 0
    +0  listen(3, 1) = 0
    
    +0  < S 0:0(0) win 32792 <mss 1460>
    +0  > S. 0:0(0) ack 1 <mss 1460>
    +0.1  < . 1:1(0) ack 1 win 65000
    
    +0  accept(3, ..., ...) = 4
    
    // This forces that not all segments of the snd-queue will be pushed
    +0 `tc qdisc add dev tun0 root netem delay 10ms`
    +0 `sysctl -w net.ipv4.tcp_limit_output_bytes=2`
    +0 setsockopt(4, SOL_SOCKET, 47, [2], 4) = 0
    
    +0 write(4,...,10000) = 10000
    +0 write(4,...,10000) = 10000
    
    // Set tcp-repair stuff, particularly TCP_RECV_QUEUE
    +0 setsockopt(4, SOL_TCP, 19, [1], 4) = 0
    +0 setsockopt(4, SOL_TCP, 20, [1], 4) = 0
    
    // This now will make the write push the remaining segments
    +0 setsockopt(4, SOL_SOCKET, 47, [20000], 4) = 0
    +0 `sysctl -w net.ipv4.tcp_limit_output_bytes=130000`
    
    // Now we will crash
    +0 write(4,...,1000) = 1000
    
    This happens since ec3423257508 (tcp: fix retransmission in repair
    mode). Prior to that, the call to tcp_push was prevented by a check for
    tp->repair.
    
    The patch fixes it, by adding the new goto-label out_nopush. When exiting
    tcp_sendmsg and a push is not required, which is the case for tp->repair,
    we go to this label.
    
    When repairing and calling send() with TCP_RECV_QUEUE, the data is
    actually put in the receive-queue. So, no push is required because no
    data has been added to the send-queue.
    
    Cc: Andrew Vagin <avagin@openvz.org>
    Cc: Pavel Emelyanov <xemul@parallels.com>
    Fixes: ec3423257508 (tcp: fix retransmission in repair mode)
    Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be>
    Acked-by: Andrew Vagin <avagin@openvz.org>
    Acked-by: Pavel Emelyanov <xemul@parallels.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit df3b53b955cfe5b2aa38644d9d075cd10ddb1202
Author: Eric Dumazet <edumazet@google.com>
Date:   Thu Jun 26 00:44:02 2014 -0700

    bnx2x: fix possible panic under memory stress
    
    [ Upstream commit 07b0f00964def8af9321cfd6c4a7e84f6362f728 ]
    
    While it is legal to kfree(NULL), it is not wise to use :
    put_page(virt_to_head_page(NULL))
    
     BUG: unable to handle kernel paging request at ffffeba400000000
     IP: [<ffffffffc01f5928>] virt_to_head_page+0x36/0x44 [bnx2x]
    
    Reported-by: Michel Lespinasse <walken@google.com>
    Signed-off-by: Eric Dumazet <edumazet@google.com>
    Cc: Ariel Elior <ariel.elior@qlogic.com>
    Fixes: d46d132cc021 ("bnx2x: use netdev_alloc_frag()")
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 7f5c24cce22f87d7e84cbf7cec9eab41d3c34269
Author: Eric Dumazet <edumazet@google.com>
Date:   Wed Jul 2 02:25:15 2014 -0700

    vlan: free percpu stats in device destructor
    
    [ Upstream commit a48e5fafecfb9c0c807d7e7284b5ff884dfb7a3a ]
    
    Madalin-Cristian reported crashs happening after a recent commit
    (5a4ae5f6e7d4 "vlan: unnecessary to check if vlan_pcpu_stats is NULL")
    
    -----------------------------------------------------------------------
    root@p5040ds:~# vconfig add eth8 1
    root@p5040ds:~# vconfig rem eth8.1
    Unable to handle kernel paging request for data at address 0x2bc88028
    Faulting instruction address: 0xc058e950
    Oops: Kernel access of bad area, sig: 11 [#1]
    SMP NR_CPUS=8 CoreNet Generic
    Modules linked in:
    CPU: 3 PID: 2167 Comm: vconfig Tainted: G        W     3.16.0-rc3-00346-g65e85bf #2
    task: e7264d90 ti: e2c2c000 task.ti: e2c2c000
    NIP: c058e950 LR: c058ea30 CTR: c058e900
    REGS: e2c2db20 TRAP: 0300   Tainted: G        W      (3.16.0-rc3-00346-g65e85bf)
    MSR: 00029002 <CE,EE,ME>  CR: 48000428  XER: 20000000
    DEAR: 2bc88028 ESR: 00000000
    GPR00: c047299c e2c2dbd0 e7264d90 00000000 2bc88000 00000000 ffffffff 00000000
    GPR08: 0000000f 00000000 000000ff 00000000 28000422 10121928 10100000 10100000
    GPR16: 10100000 00000000 c07c5968 00000000 00000000 00000000 e2c2dc48 e7838000
    GPR24: c07c5bac c07c58a8 e77290cc c07b0000 00000000 c05de6c0 e7838000 e2c2dc48
    NIP [c058e950] vlan_dev_get_stats64+0x50/0x170
    LR [c058ea30] vlan_dev_get_stats64+0x130/0x170
    Call Trace:
    [e2c2dbd0] [ffffffea] 0xffffffea (unreliable)
    [e2c2dc20] [c047299c] dev_get_stats+0x4c/0x140
    [e2c2dc40] [c0488ca8] rtnl_fill_ifinfo+0x3d8/0x960
    [e2c2dd70] [c0489f4c] rtmsg_ifinfo+0x6c/0x110
    [e2c2dd90] [c04731d4] rollback_registered_many+0x344/0x3b0
    [e2c2ddd0] [c047332c] rollback_registered+0x2c/0x50
    [e2c2ddf0] [c0476058] unregister_netdevice_queue+0x78/0xf0
    [e2c2de00] [c058d800] unregister_vlan_dev+0xc0/0x160
    [e2c2de20] [c058e360] vlan_ioctl_handler+0x1c0/0x550
    [e2c2de90] [c045d11c] sock_ioctl+0x28c/0x2f0
    [e2c2deb0] [c010d070] do_vfs_ioctl+0x90/0x7b0
    [e2c2df20] [c010d7d0] SyS_ioctl+0x40/0x80
    [e2c2df40] [c000f924] ret_from_syscall+0x0/0x3c
    
    Fix this problem by freeing percpu stats from dev->destructor() instead
    of ndo_uninit()
    
    Reported-by: Madalin-Cristian Bucur <madalin.bucur@freescale.com>
    Signed-off-by: Eric Dumazet <edumazet@google.com>
    Tested-by: Madalin-Cristian Bucur <madalin.bucur@freescale.com>
    Fixes: 5a4ae5f6e7d4 ("vlan: unnecessary to check if vlan_pcpu_stats is NULL")
    Cc: Li RongQing <roy.qing.li@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 9cc844171ce4bf00976011d829616c232eb755f8
Author: Eric Dumazet <edumazet@google.com>
Date:   Wed Jul 2 02:39:38 2014 -0700

    net: fix sparse warning in sk_dst_set()
    
    [ Upstream commit 5925a0555bdaf0b396a84318cbc21ba085f6c0d3 ]
    
    sk_dst_cache has __rcu annotation, so we need a cast to avoid
    following sparse error :
    
    include/net/sock.h:1774:19: warning: incorrect type in initializer (different address spaces)
    include/net/sock.h:1774:19:    expected struct dst_entry [noderef] <asn:4>*__ret
    include/net/sock.h:1774:19:    got struct dst_entry *dst
    
    Signed-off-by: Eric Dumazet <edumazet@google.com>
    Reported-by: kbuild test robot <fengguang.wu@intel.com>
    Fixes: 7f502361531e ("ipv4: irq safe sk_dst_[re]set() and ipv4_sk_update_pmtu() fix")
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 5a9951d1055d82b19e9acb3321508d43d825b27d
Author: Eric Dumazet <edumazet@google.com>
Date:   Mon Jun 30 01:26:23 2014 -0700

    ipv4: irq safe sk_dst_[re]set() and ipv4_sk_update_pmtu() fix
    
    [ Upstream commit 7f502361531e9eecb396cf99bdc9e9a59f7ebd7f ]
    
    We have two different ways to handle changes to sk->sk_dst
    
    First way (used by TCP) assumes socket lock is owned by caller, and use
    no extra lock : __sk_dst_set() & __sk_dst_reset()
    
    Another way (used by UDP) uses sk_dst_lock because socket lock is not
    always taken. Note that sk_dst_lock is not softirq safe.
    
    These ways are not inter changeable for a given socket type.
    
    ipv4_sk_update_pmtu(), added in linux-3.8, added a race, as it used
    the socket lock as synchronization, but users might be UDP sockets.
    
    Instead of converting sk_dst_lock to a softirq safe version, use xchg()
    as we did for sk_rx_dst in commit e47eb5dfb296b ("udp: ipv4: do not use
    sk_dst_lock from softirq context")
    
    In a follow up patch, we probably can remove sk_dst_lock, as it is
    only used in IPv6.
    
    Signed-off-by: Eric Dumazet <edumazet@google.com>
    Cc: Steffen Klassert <steffen.klassert@secunet.com>
    Fixes: 9cb3a50c5f63e ("ipv4: Invalidate the socket cached route on pmtu events if possible")
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 9a4fe697023dbe6c25caa1f8b2153af869a29bd2
Author: Eric Dumazet <edumazet@google.com>
Date:   Tue Jun 24 10:05:11 2014 -0700

    ipv4: fix dst race in sk_dst_get()
    
    [ Upstream commit f88649721268999bdff09777847080a52004f691 ]
    
    When IP route cache had been removed in linux-3.6, we broke assumption
    that dst entries were all freed after rcu grace period. DST_NOCACHE
    dst were supposed to be freed from dst_release(). But it appears
    we want to keep such dst around, either in UDP sockets or tunnels.
    
    In sk_dst_get() we need to make sure dst refcount is not 0
    before incrementing it, or else we might end up freeing a dst
    twice.
    
    DST_NOCACHE set on a dst does not mean this dst can not be attached
    to a socket or a tunnel.
    
    Then, before actual freeing, we need to observe a rcu grace period
    to make sure all other cpus can catch the fact the dst is no longer
    usable.
    
    Signed-off-by: Eric Dumazet <edumazet@google.com>
    Reported-by: Dormando <dormando@rydia.net>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit d5edc54bdcd1996389182a3a6654cf87b4ce23cb
Author: Wei-Chun Chao <weichunc@plumgrid.com>
Date:   Sun Jun 8 23:48:54 2014 -0700

    net: fix UDP tunnel GSO of frag_list GRO packets
    
    [ Upstream commit 5882a07c72093dc3a18e2d2b129fb200686bb6ee ]
    
    This patch fixes a kernel BUG_ON in skb_segment. It is hit when
    testing two VMs on openvswitch with one VM acting as VXLAN gateway.
    
    During VXLAN packet GSO, skb_segment is called with skb->data
    pointing to inner TCP payload. skb_segment calls skb_network_protocol
    to retrieve the inner protocol. skb_network_protocol actually expects
    skb->data to point to MAC and it calls pskb_may_pull with ETH_HLEN.
    This ends up pulling in ETH_HLEN data from header tail. As a result,
    pskb_trim logic is skipped and BUG_ON is hit later.
    
    Move skb_push in front of skb_network_protocol so that skb->data
    lines up properly.
    
    kernel BUG at net/core/skbuff.c:2999!
    Call Trace:
    [<ffffffff816ac412>] tcp_gso_segment+0x122/0x410
    [<ffffffff816bc74c>] inet_gso_segment+0x13c/0x390
    [<ffffffff8164b39b>] skb_mac_gso_segment+0x9b/0x170
    [<ffffffff816b3658>] skb_udp_tunnel_segment+0xd8/0x390
    [<ffffffff816b3c00>] udp4_ufo_fragment+0x120/0x140
    [<ffffffff816bc74c>] inet_gso_segment+0x13c/0x390
    [<ffffffff8109d742>] ? default_wake_function+0x12/0x20
    [<ffffffff8164b39b>] skb_mac_gso_segment+0x9b/0x170
    [<ffffffff8164b4d0>] __skb_gso_segment+0x60/0xc0
    [<ffffffff8164b6b3>] dev_hard_start_xmit+0x183/0x550
    [<ffffffff8166c91e>] sch_direct_xmit+0xfe/0x1d0
    [<ffffffff8164bc94>] __dev_queue_xmit+0x214/0x4f0
    [<ffffffff8164bf90>] dev_queue_xmit+0x10/0x20
    [<ffffffff81687edb>] ip_finish_output+0x66b/0x890
    [<ffffffff81688a58>] ip_output+0x58/0x90
    [<ffffffff816c628f>] ? fib_table_lookup+0x29f/0x350
    [<ffffffff816881c9>] ip_local_out_sk+0x39/0x50
    [<ffffffff816cbfad>] iptunnel_xmit+0x10d/0x130
    [<ffffffffa0212200>] vxlan_xmit_skb+0x1d0/0x330 [vxlan]
    [<ffffffffa02a3919>] vxlan_tnl_send+0x129/0x1a0 [openvswitch]
    [<ffffffffa02a2cd6>] ovs_vport_send+0x26/0xa0 [openvswitch]
    [<ffffffffa029931e>] do_output+0x2e/0x50 [openvswitch]
    
    Signed-off-by: Wei-Chun Chao <weichunc@plumgrid.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit aab67a7e0fcb377cd68ddea1f2c2ab02a8988e08
Author: Bjørn Mork <bjorn@mork.no>
Date:   Wed Jun 18 14:21:24 2014 +0200

    net: huawei_cdc_ncm: increase command buffer size
    
    [ Upstream commit 3acc74619b0175b7a154cf8dc54813f6faf97aa9 ]
    
    Messages from the modem exceeding 256 bytes cause communication
    failure.
    
    The WDM protocol is strictly "read on demand", meaning that we only
    poll for unread data after receiving a notification from the modem.
    Since we have no way to know how much data the modem has to send,
    we must make sure that the buffer we provide is "big enough".
    Message truncation does not work. Truncated messages are left unread
    until the modem has another message to send.  Which often won't
    happen until the userspace application has given up waiting for the
    final part of the last message, and therefore sends another command.
    
    With a proper CDC WDM function there is a descriptor telling us
    which buffer size the modem uses. But with this vendor specific
    implementation there is no known way to calculate the exact "big
    enough" number.  It is an unknown property of the modem firmware.
    Experience has shown that 256 is too small.  The discussion of
    this failure ended up concluding that 512 might be too small as
    well. So 1024 seems like a reasonable value for now.
    
    Fixes: 41c47d8cfd68 ("net: huawei_cdc_ncm: Introduce the huawei_cdc_ncm driver")
    Cc: Enrico Mioso <mrkiko.rs@gmail.com>
    Reported-by: Dan Williams <dcbw@redhat.com>
    Signed-off-by: Bjørn Mork <bjorn@mork.no>
    Acked-By: Enrico Mioso <mrkiko.rs@gmail.com>
    Tested-by: Dan Williams <dcbw@redhat.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 54e9c55c8bfa1e255d4ebd3291c13c22e359eb07
Author: Mugunthan V N <mugunthanvnm@ti.com>
Date:   Wed Jun 18 17:21:48 2014 +0530

    drivers: net: cpsw: fix dual EMAC stall when connected to same switch
    
    [ Upstream commit e6afea0bbf129f88dc3fc39fd0d769f9ff064172 ]
    
    In commit 629c9a8fd0bbdfc6d702526b327470166ec39c6b (drivers: net: cpsw: Add
    default vlan for dual emac case also), api cpsw_add_default_vlan() also
    changes the port vlan which is required to seperate the ports which results
    in the following behavior
    
    In Dual EMAC mode, when both the Etnernet connected is connected to same
    switch, it creates a loop in the switch and when a broadcast packet is
    received it is forwarded to the other port which stalls the whole switch
    and needs a reset/power cycle to the switch to recover. So intead of using
    the api, add only the default VLAN entry in dual EMAC case.
    
    Cc: Yegor Yefremov <yegorslists@googlemail.com>
    Cc: Felipe Balbi <balbi@ti.com>
    Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
    Tested-by: Yegor Yefremov <yegorslists@googlemail.com>
    Tested-by: Felipe Balbi <balbi@ti.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit f8e4d67de57bed98a22f2f55d45224497c6a0338
Author: Li RongQing <roy.qing.li@gmail.com>
Date:   Wed Jun 18 13:46:02 2014 +0800

    8021q: fix a potential memory leak
    
    [ Upstream commit 916c1689a09bc1ca81f2d7a34876f8d35aadd11b ]
    
    skb_cow called in vlan_reorder_header does not free the skb when it failed,
    and vlan_reorder_header returns NULL to reset original skb when it is called
    in vlan_untag, lead to a memory leak.
    
    Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
    Acked-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 97abf5302d11906cf042c5d2c5f87d44084e7fb2
Author: Daniel Borkmann <dborkman@redhat.com>
Date:   Wed Jun 18 23:46:31 2014 +0200

    net: sctp: check proc_dointvec result in proc_sctp_do_auth
    
    [ Upstream commit 24599e61b7552673dd85971cf5a35369cd8c119e ]
    
    When writing to the sysctl field net.sctp.auth_enable, it can well
    be that the user buffer we handed over to proc_dointvec() via
    proc_sctp_do_auth() handler contains something other than integers.
    
    In that case, we would set an uninitialized 4-byte value from the
    stack to net->sctp.auth_enable that can be leaked back when reading
    the sysctl variable, and it can unintentionally turn auth_enable
    on/off based on the stack content since auth_enable is interpreted
    as a boolean.
    
    Fix it up by making sure proc_dointvec() returned sucessfully.
    
    Fixes: b14878ccb7fa ("net: sctp: cache auth_enable per endpoint")
    Reported-by: Florian Westphal <fwestpha@redhat.com>
    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 8d7f3e79c3f14ad09c2428b89c92d7480f2c4566
Author: Neal Cardwell <ncardwell@google.com>
Date:   Wed Jun 18 21:15:03 2014 -0400

    tcp: fix tcp_match_skb_to_sack() for unaligned SACK at end of an skb
    
    [ Upstream commit 2cd0d743b05e87445c54ca124a9916f22f16742e ]
    
    If there is an MSS change (or misbehaving receiver) that causes a SACK
    to arrive that covers the end of an skb but is less than one MSS, then
    tcp_match_skb_to_sack() was rounding up pkt_len to the full length of
    the skb ("Round if necessary..."), then chopping all bytes off the skb
    and creating a zero-byte skb in the write queue.
    
    This was visible now because the recently simplified TLP logic in
    bef1909ee3ed1c ("tcp: fixing TLP's FIN recovery") could find that 0-byte
    skb at the end of the write queue, and now that we do not check that
    skb's length we could send it as a TLP probe.
    
    Consider the following example scenario:
    
     mss: 1000
     skb: seq: 0 end_seq: 4000  len: 4000
     SACK: start_seq: 3999 end_seq: 4000
    
    The tcp_match_skb_to_sack() code will compute:
    
     in_sack = false
     pkt_len = start_seq - TCP_SKB_CB(skb)->seq = 3999 - 0 = 3999
     new_len = (pkt_len / mss) * mss = (3999/1000)*1000 = 3000
     new_len += mss = 4000
    
    Previously we would find the new_len > skb->len check failing, so we
    would fall through and set pkt_len = new_len = 4000 and chop off
    pkt_len of 4000 from the 4000-byte skb, leaving a 0-byte segment
    afterward in the write queue.
    
    With this new commit, we notice that the new new_len >= skb->len check
    succeeds, so that we return without trying to fragment.
    
    Fixes: adb92db857ee ("tcp: Make SACK code to split only at mss boundaries")
    Reported-by: Eric Dumazet <edumazet@google.com>
    Signed-off-by: Neal Cardwell <ncardwell@google.com>
    Cc: Eric Dumazet <edumazet@google.com>
    Cc: Yuchung Cheng <ycheng@google.com>
    Cc: Ilpo Jarvinen <ilpo.jarvinen@helsinki.fi>
    Acked-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 72d49fe1104fc95712287460dcf50a9a96c499ca
Author: Kees Cook <keescook@chromium.org>
Date:   Wed Jun 18 15:34:57 2014 -0700

    net: filter: fix upper BPF instruction limit
    
    [ Upstream commit 6f9a093b66ce7cacc110d8737c03686e80ecfda6 ]
    
    The original checks (via sk_chk_filter) for instruction count uses ">",
    not ">=", so changing this in sk_convert_filter has the potential to break
    existing seccomp filters that used exactly BPF_MAXINSNS many instructions.
    
    Fixes: bd4cf0ed331a ("net: filter: rework/optimize internal BPF interpreter's instruction set")
    Signed-off-by: Kees Cook <keescook@chromium.org>
    Cc: stable@vger.kernel.org # v3.15+
    Acked-by: Daniel Borkmann <dborkman@redhat.com>
    Acked-by: Alexei Starovoitov <ast@plumgrid.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit b95398560fec152137fcde54c96559a9b7f9003f
Author: Daniel Borkmann <dborkman@redhat.com>
Date:   Thu Jun 19 01:31:30 2014 +0200

    net: sctp: propagate sysctl errors from proc_do* properly
    
    [ Upstream commit ff5e92c1affe7166b3f6e7073e648ed65a6e2e59 ]
    
    sysctl handler proc_sctp_do_hmac_alg(), proc_sctp_do_rto_min() and
    proc_sctp_do_rto_max() do not properly reflect some error cases
    when writing values via sysctl from internal proc functions such
    as proc_dointvec() and proc_dostring().
    
    In all these cases we pass the test for write != 0 and partially
    do additional work just to notice that additional sanity checks
    fail and we return with hard-coded -EINVAL while proc_do*
    functions might also return different errors. So fix this up by
    simply testing a successful return of proc_do* right after
    calling it.
    
    This also allows to propagate its return value onwards to the user.
    While touching this, also fix up some minor style issues.
    
    Fixes: 4f3fdf3bc59c ("sctp: add check rto_min and rto_max in sysctl")
    Fixes: 3c68198e7511 ("sctp: Make hmac algorithm selection for cookie generation dynamic")
    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 f8b2ed3958495608f4d392ba4a369237f6d934a1
Author: Tyler Hall <tylerwhall@gmail.com>
Date:   Sun Jun 15 22:23:17 2014 -0400

    slcan: Port write_wakeup deadlock fix from slip
    
    [ Upstream commit a8e83b17536aad603fbeae4c460f2da0ee9fe6ed ]
    
    The commit "slip: Fix deadlock in write_wakeup" fixes a deadlock caused
    by a change made in both slcan and slip. This is a direct port of that
    fix.
    
    Signed-off-by: Tyler Hall <tylerwhall@gmail.com>
    Cc: Oliver Hartkopp <socketcan@hartkopp.net>
    Cc: Andre Naujoks <nautsch2@gmail.com>
    Cc: David S. Miller <davem@davemloft.net>
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit e971403a75435a67ef3f91af862cbadf2bcde027
Author: Tyler Hall <tylerwhall@gmail.com>
Date:   Sun Jun 15 22:23:16 2014 -0400

    slip: Fix deadlock in write_wakeup
    
    [ Upstream commit 661f7fda21b15ec52f57fcd397c03370acc28688 ]
    
    Use schedule_work() to avoid potentially taking the spinlock in
    interrupt context.
    
    Commit cc9fa74e2a ("slip/slcan: added locking in wakeup function") added
    necessary locking to the wakeup function and 367525c8c2/ddcde142be ("can:
    slcan: Fix spinlock variant") converted it to spin_lock_bh() because the lock
    is also taken in timers.
    
    Disabling softirqs is not sufficient, however, as tty drivers may call
    write_wakeup from interrupt context. This driver calls tty->ops->write() with
    its spinlock held, which may immediately cause an interrupt on the same CPU and
    subsequent spin_bug().
    
    Simply converting to spin_lock_irq/irqsave() prevents this deadlock, but
    causes lockdep to point out a possible circular locking dependency
    between these locks:
    
    (&(&sl->lock)->rlock){-.....}, at: slip_write_wakeup
    (&port_lock_key){-.....}, at: serial8250_handle_irq.part.13
    
    The slip transmit is holding the slip spinlock when calling the tty write.
    This grabs the port lock. On an interrupt, the handler grabs the port
    lock and calls write_wakeup which grabs the slip lock. This could be a
    problem if a serial interrupt occurs on another CPU during the slip
    transmit.
    
    To deal with these issues, don't grab the lock in the wakeup function by
    deferring the writeout to a workqueue. Also hold the lock during close
    when de-assigning the tty pointer to safely disarm the worker and
    timers.
    
    This bug is easily reproducible on the first transmit when slip is
    used with the standard 8250 serial driver.
    
    [<c0410b7c>] (spin_bug+0x0/0x38) from [<c006109c>] (do_raw_spin_lock+0x60/0x1d0)
     r5:eab27000 r4:ec02754c
    [<c006103c>] (do_raw_spin_lock+0x0/0x1d0) from [<c04185c0>] (_raw_spin_lock+0x28/0x2c)
     r10:0000001f r9:eabb814c r8:eabb8140 r7:40070193 r6:ec02754c r5:eab27000
     r4:ec02754c r3:00000000
    [<c0418598>] (_raw_spin_lock+0x0/0x2c) from [<bf3a0220>] (slip_write_wakeup+0x50/0xe0 [slip])
     r4:ec027540 r3:00000003
    [<bf3a01d0>] (slip_write_wakeup+0x0/0xe0 [slip]) from [<c026e420>] (tty_wakeup+0x48/0x68)
     r6:00000000 r5:ea80c480 r4:eab27000 r3:bf3a01d0
    [<c026e3d8>] (tty_wakeup+0x0/0x68) from [<c028a8ec>] (uart_write_wakeup+0x2c/0x30)
     r5:ed68ea90 r4:c06790d8
    [<c028a8c0>] (uart_write_wakeup+0x0/0x30) from [<c028dc44>] (serial8250_tx_chars+0x114/0x170)
    [<c028db30>] (serial8250_tx_chars+0x0/0x170) from [<c028dffc>] (serial8250_handle_irq+0xa0/0xbc)
     r6:000000c2 r5:00000060 r4:c06790d8 r3:00000000
    [<c028df5c>] (serial8250_handle_irq+0x0/0xbc) from [<c02933a4>] (dw8250_handle_irq+0x38/0x64)
     r7:00000000 r6:edd2f390 r5:000000c2 r4:c06790d8
    [<c029336c>] (dw8250_handle_irq+0x0/0x64) from [<c028d2f4>] (serial8250_interrupt+0x44/0xc4)
     r6:00000000 r5:00000000 r4:c06791c4 r3:c029336c
    [<c028d2b0>] (serial8250_interrupt+0x0/0xc4) from [<c0067fe4>] (handle_irq_event_percpu+0xb4/0x2b0)
     r10:c06790d8 r9:eab27000 r8:00000000 r7:00000000 r6:0000001f r5:edd52980
     r4:ec53b6c0 r3:c028d2b0
    [<c0067f30>] (handle_irq_event_percpu+0x0/0x2b0) from [<c006822c>] (handle_irq_event+0x4c/0x6c)
     r10:c06790d8 r9:eab27000 r8:c0673ae0 r7:c05c2020 r6:ec53b6c0 r5:edd529d4
     r4:edd52980
    [<c00681e0>] (handle_irq_event+0x0/0x6c) from [<c006b140>] (handle_level_irq+0xe8/0x100)
     r6:00000000 r5:edd529d4 r4:edd52980 r3:00022000
    [<c006b058>] (handle_level_irq+0x0/0x100) from [<c00676f8>] (generic_handle_irq+0x30/0x40)
     r5:0000001f r4:0000001f
    [<c00676c8>] (generic_handle_irq+0x0/0x40) from [<c000f57c>] (handle_IRQ+0xd0/0x13c)
     r4:ea997b18 r3:000000e0
    [<c000f4ac>] (handle_IRQ+0x0/0x13c) from [<c00086c4>] (armada_370_xp_handle_irq+0x4c/0x118)
     r8:000003ff r7:ea997b18 r6:ffffffff r5:60070013 r4:c0674dc0
    [<c0008678>] (armada_370_xp_handle_irq+0x0/0x118) from [<c0013840>] (__irq_svc+0x40/0x70)
    Exception stack(0xea997b18 to 0xea997b60)
    7b00:                                                       00000001 20070013
    7b20: 00000000 0000000b 20070013 eab27000 20070013 00000000 ed10103e eab27000
    7b40: c06790d8 ea997b74 ea997b60 ea997b60 c04186c0 c04186c8 60070013 ffffffff
     r9:eab27000 r8:ed10103e r7:ea997b4c r6:ffffffff r5:60070013 r4:c04186c8
    [<c04186a4>] (_raw_spin_unlock_irqrestore+0x0/0x54) from [<c0288fc0>] (uart_start+0x40/0x44)
     r4:c06790d8 r3:c028ddd8
    [<c0288f80>] (uart_start+0x0/0x44) from [<c028982c>] (uart_write+0xe4/0xf4)
     r6:0000003e r5:00000000 r4:ed68ea90 r3:0000003e
    [<c0289748>] (uart_write+0x0/0xf4) from [<bf3a0d20>] (sl_xmit+0x1c4/0x228 [slip])
     r10:ed388e60 r9:0000003c r8:ffffffdd r7:0000003e r6:ec02754c r5:ea717eb8
     r4:ec027000
    [<bf3a0b5c>] (sl_xmit+0x0/0x228 [slip]) from [<c0368d74>] (dev_hard_start_xmit+0x39c/0x6d0)
     r8:eaf163c0 r7:ec027000 r6:ea717eb8 r5:00000000 r4:00000000
    
    Signed-off-by: Tyler Hall <tylerwhall@gmail.com>
    Cc: Oliver Hartkopp <socketcan@hartkopp.net>
    Cc: Andre Naujoks <nautsch2@gmail.com>
    Cc: David S. Miller <davem@davemloft.net>
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 298e1f9b72be6727907547465e38aa91359fa870
Author: Dmitry Popov <ixaphire@qrator.net>
Date:   Sat Jul 5 02:26:37 2014 +0400

    ip_tunnel: fix ip_tunnel_lookup
    
    [ Upstream commit e0056593b61253f1a8a9941dacda22e73b963cdc ]
    
    This patch fixes 3 similar bugs where incoming packets might be routed into
    wrong non-wildcard tunnels:
    
    1) Consider the following setup:
        ip address add 1.1.1.1/24 dev eth0
        ip address add 1.1.1.2/24 dev eth0
        ip tunnel add ipip1 remote 2.2.2.2 local 1.1.1.1 mode ipip dev eth0
        ip link set ipip1 up
    
    Incoming ipip packets from 2.2.2.2 were routed into ipip1 even if it has dst =
    1.1.1.2. Moreover even if there was wildcard tunnel like
       ip tunnel add ipip0 remote 2.2.2.2 local any mode ipip dev eth0
    but it was created before explicit one (with local 1.1.1.1), incoming ipip
    packets with src = 2.2.2.2 and dst = 1.1.1.2 were still routed into ipip1.
    
    Same issue existed with all tunnels that use ip_tunnel_lookup (gre, vti)
    
    2)  ip address add 1.1.1.1/24 dev eth0
        ip tunnel add ipip1 remote 2.2.146.85 local 1.1.1.1 mode ipip dev eth0
        ip link set ipip1 up
    
    Incoming ipip packets with dst = 1.1.1.1 were routed into ipip1, no matter what
    src address is. Any remote ip address which has ip_tunnel_hash = 0 raised this
    issue, 2.2.146.85 is just an example, there are more than 4 million of them.
    And again, wildcard tunnel like
       ip tunnel add ipip0 remote any local 1.1.1.1 mode ipip dev eth0
    wouldn't be ever matched if it was created before explicit tunnel like above.
    
    Gre & vti tunnels had the same issue.
    
    3)  ip address add 1.1.1.1/24 dev eth0
        ip tunnel add gre1 remote 2.2.146.84 local 1.1.1.1 key 1 mode gre dev eth0
        ip link set gre1 up
    
    Any incoming gre packet with key = 1 were routed into gre1, no matter what
    src/dst addresses are. Any remote ip address which has ip_tunnel_hash = 0 raised
    the issue, 2.2.146.84 is just an example, there are more than 4 million of them.
    Wildcard tunnel like
       ip tunnel add gre2 remote any local any key 1 mode gre dev eth0
    wouldn't be ever matched if it was created before explicit tunnel like above.
    
    All this stuff happened because while looking for a wildcard tunnel we didn't
    check that matched tunnel is a wildcard one. Fixed.
    
    Signed-off-by: Dmitry Popov <ixaphire@qrator.net>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 9150bacf5cd5d8381e37263518500efb9503af82
Author: Or Gerlitz <ogerlitz@mellanox.com>
Date:   Wed Jul 2 17:36:23 2014 +0300

    net/mlx4_en: Don't configure the HW vxlan parser when vxlan offloading isn't set
    
    [ Upstream commit e326f2f13b209d56782609e833b87cb497e64b3b ]
    
    The add_vxlan_port ndo driver code was wrongly testing whether HW vxlan offloads
    are supported by the device instead of checking if they are currently enabled.
    
    This causes the driver to configure the HW parser to conduct matching for vxlan
    packets but since no steering rules were set, vxlan packets are dropped on RX.
    
    Fix that by doing the right test, as done in the del_vxlan_port ndo handler.
    
    Fixes: 1b136de ('net/mlx4: Implement vxlan ndo calls')
    Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 58577b979f0d16a32255554da21a4cde2f7b9b42
Author: Or Gerlitz <ogerlitz@mellanox.com>
Date:   Sun Jun 22 13:21:34 2014 +0300

    net/mlx4_core: Fix the error flow when probing with invalid VF configuration
    
    [ Upstream commit 960b1f454e1ace6b76718f22828bcc3594a09422 ]
    
    Single ported VF are currently not supported on configurations where
    one or both ports are IB. When we hit this case, the relevant flow in
    the driver didn't return error and jumped to the wrong label. Fix that.
    
    Fixes: dd41cc3 ('net/mlx4: Adapt num_vfs/probed_vf params for single port VF')
    Reported-by: Shirley Ma <shirley.ma@oracle.com>
    Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit d1e5f50067ae61402adeb9de4fb365f861033bff
Author: Hugh Dickins <hughd@google.com>
Date:   Wed Jul 23 14:00:13 2014 -0700

    shmem: fix splicing from a hole while it's punched
    
    commit b1a366500bd537b50c3aad26dc7df083ec03a448 upstream.
    
    shmem_fault() is the actual culprit in trinity's hole-punch starvation,
    and the most significant cause of such problems: since a page faulted is
    one that then appears page_mapped(), needing unmap_mapping_range() and
    i_mmap_mutex to be unmapped again.
    
    But it is not the only way in which a page can be brought into a hole in
    the radix_tree while that hole is being punched; and Vlastimil's testing
    implies that if enough other processors are busy filling in the hole,
    then shmem_undo_range() can be kept from completing indefinitely.
    
    shmem_file_splice_read() is the main other user of SGP_CACHE, which can
    instantiate shmem pagecache pages in the read-only case (without holding
    i_mutex, so perhaps concurrently with a hole-punch).  Probably it's
    silly not to use SGP_READ already (using the ZERO_PAGE for holes): which
    ought to be safe, but might bring surprises - not a change to be rushed.
    
    shmem_read_mapping_page_gfp() is an internal interface used by
    drivers/gpu/drm GEM (and next by uprobes): it should be okay.  And
    shmem_file_read_iter() uses the SGP_DIRTY variant of SGP_CACHE, when
    called internally by the kernel (perhaps for a stacking filesystem,
    which might rely on holes to be reserved): it's unclear whether it could
    be provoked to keep hole-punch busy or not.
    
    We could apply the same umbrella as now used in shmem_fault() to
    shmem_file_splice_read() and the others; but it looks ugly, and use over
    a range raises questions - should it actually be per page? can these get
    starved themselves?
    
    The origin of this part of the problem is my v3.1 commit d0823576bf4b
    ("mm: pincer in truncate_inode_pages_range"), once it was duplicated
    into shmem.c.  It seemed like a nice idea at the time, to ensure
    (barring RCU lookup fuzziness) that there's an instant when the entire
    hole is empty; but the indefinitely repeated scans to ensure that make
    it vulnerable.
    
    Revert that "enhancement" to hole-punch from shmem_undo_range(), but
    retain the unproblematic rescanning when it's truncating; add a couple
    of comments there.
    
    Remove the "indices[0] >= end" test: that is now handled satisfactorily
    by the inner loop, and mem_cgroup_uncharge_start()/end() are too light
    to be worth avoiding here.
    
    But if we do not always loop indefinitely, we do need to handle the case
    of swap swizzled back to page before shmem_free_swap() gets it: add a
    retry for that case, as suggested by Konstantin Khlebnikov; and for the
    case of page swizzled back to swap, as suggested by Johannes Weiner.
    
    Signed-off-by: Hugh Dickins <hughd@google.com>
    Reported-by: Sasha Levin <sasha.levin@oracle.com>
    Suggested-by: Vlastimil Babka <vbabka@suse.cz>
    Cc: Konstantin Khlebnikov <koct9i@gmail.com>
    Cc: Johannes Weiner <hannes@cmpxchg.org>
    Cc: Lukas Czerner <lczerner@redhat.com>
    Cc: Dave Jones <davej@redhat.com>
    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 8a842f65f8d63703b1921d1757e81f7a39c29dfe
Author: Hugh Dickins <hughd@google.com>
Date:   Wed Jul 23 14:00:10 2014 -0700

    shmem: fix faulting into a hole, not taking i_mutex
    
    commit 8e205f779d1443a94b5ae81aa359cb535dd3021e upstream.
    
    Commit f00cdc6df7d7 ("shmem: fix faulting into a hole while it's
    punched") was buggy: Sasha sent a lockdep report to remind us that
    grabbing i_mutex in the fault path is a no-no (write syscall may already
    hold i_mutex while faulting user buffer).
    
    We tried a completely different approach (see following patch) but that
    proved inadequate: good enough for a rational workload, but not good
    enough against trinity - which forks off so many mappings of the object
    that contention on i_mmap_mutex while hole-puncher holds i_mutex builds
    into serious starvation when concurrent faults force the puncher to fall
    back to single-page unmap_mapping_range() searches of the i_mmap tree.
    
    So return to the original umbrella approach, but keep away from i_mutex
    this time.  We really don't want to bloat every shmem inode with a new
    mutex or completion, just to protect this unlikely case from trinity.
    So extend the original with wait_queue_head on stack at the hole-punch
    end, and wait_queue item on the stack at the fault end.
    
    This involves further use of i_lock to guard against the races: lockdep
    has been happy so far, and I see fs/inode.c:unlock_new_inode() holds
    i_lock around wake_up_bit(), which is comparable to what we do here.
    i_lock is more convenient, but we could switch to shmem's info->lock.
    
    This issue has been tagged with CVE-2014-4171, which will require commit
    f00cdc6df7d7 and this and the following patch to be backported: we
    suggest to 3.1+, though in fact the trinity forkbomb effect might go
    back as far as 2.6.16, when madvise(,,MADV_REMOVE) came in - or might
    not, since much has changed, with i_mmap_mutex a spinlock before 3.0.
    Anyone running trinity on 3.0 and earlier? I don't think we need care.
    
    Signed-off-by: Hugh Dickins <hughd@google.com>
    Reported-by: Sasha Levin <sasha.levin@oracle.com>
    Tested-by: Sasha Levin <sasha.levin@oracle.com>
    Cc: Vlastimil Babka <vbabka@suse.cz>
    Cc: Konstantin Khlebnikov <koct9i@gmail.com>
    Cc: Johannes Weiner <hannes@cmpxchg.org>
    Cc: Lukas Czerner <lczerner@redhat.com>
    Cc: Dave Jones <davej@redhat.com>
    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 6785a061d661a35af7737bdbd366b07320ea1cfc
Author: Hugh Dickins <hughd@google.com>
Date:   Mon Jun 23 13:22:06 2014 -0700

    shmem: fix faulting into a hole while it's punched
    
    commit f00cdc6df7d7cfcabb5b740911e6788cb0802bdb upstream.
    
    Trinity finds that mmap access to a hole while it's punched from shmem
    can prevent the madvise(MADV_REMOVE) or fallocate(FALLOC_FL_PUNCH_HOLE)
    from completing, until the reader chooses to stop; with the puncher's
    hold on i_mutex locking out all other writers until it can complete.
    
    It appears that the tmpfs fault path is too light in comparison with its
    hole-punching path, lacking an i_data_sem to obstruct it; but we don't
    want to slow down the common case.
    
    Extend shmem_fallocate()'s existing range notification mechanism, so
    shmem_fault() can refrain from faulting pages into the hole while it's
    punched, waiting instead on i_mutex (when safe to sleep; or repeatedly
    faulting when not).
    
    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Hugh Dickins <hughd@google.com>
    Reported-by: Sasha Levin <sasha.levin@oracle.com>
    Tested-by: Sasha Levin <sasha.levin@oracle.com>
    Cc: Dave Jones <davej@redhat.com>
    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 5d87f5613f39adfc59b4678f45c0a75f080e2960
Author: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Date:   Wed Jun 25 09:12:30 2014 +0300

    iwlwifi: dvm: don't enable CTS to self
    
    commit 43d826ca5979927131685cc2092c7ce862cb91cd upstream.
    
    We should always prefer to use full RTS protection. Using
    CTS to self gives a meaningless improvement, but this flow
    is much harder for the firmware which is likely to have
    issues with it.
    
    Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit e551ed90cc6e83c9b6eb6a7a012c4ef94cb957c5
Author: Oren Givon <oren.givon@intel.com>
Date:   Sun May 25 16:31:58 2014 +0300

    iwlwifi: update the 7265 series HW IDs
    
    commit b3c063ae7279981f7161e63b44f214c62f122b32 upstream.
    
    Add one more 7265 series HW ID.
    Edit one existing 7265 series HW ID.
    
    Signed-off-by: Oren Givon <oren.givon@intel.com>
    Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 9b018d7a75a3cd933b01e22c8e722b5d2435520d
Author: Niu Yawei <yawei.niu@gmail.com>
Date:   Wed Jun 4 12:22:13 2014 +0800

    quota: missing lock in dqcache_shrink_scan()
    
    commit d68aab6b8f572406aa93b45ef6483934dd3b54a6 upstream.
    
    Commit 1ab6c4997e04 (fs: convert fs shrinkers to new scan/count API)
    accidentally removed locking from quota shrinker. Fix it -
    dqcache_shrink_scan() should use dq_list_lock to protect the
    scan on free_dquots list.
    
    Fixes: 1ab6c4997e04a00c50c6d786c2f046adc0d1f5de
    Signed-off-by: Niu Yawei <yawei.niu@intel.com>
    Signed-off-by: Jan Kara <jack@suse.cz>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 7101ceeab97d1b4081e790bba1fd397471d0cace
Author: Stefan Assmann <sassmann@kpanic.de>
Date:   Thu Jul 10 03:29:39 2014 -0700

    igb: do a reset on SR-IOV re-init if device is down
    
    commit 76252723e88681628a3dbb9c09c963e095476f73 upstream.
    
    To properly re-initialize SR-IOV it is necessary to reset the device
    even if it is already down. Not doing this may result in Tx unit hangs.
    
    Signed-off-by: Stefan Assmann <sassmann@kpanic.de>
    Tested-by: Aaron Brown <aaron.f.brown@intel.com>
    Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 5d2bb49bd3ef7f7470a46e42a30626fd93ade698
Author: Todd Fujinaka <todd.fujinaka@intel.com>
Date:   Thu Jul 10 01:47:15 2014 -0700

    igb: Workaround for i210 Errata 25: Slow System Clock
    
    commit 948264879b6894dc389a44b99fae4f0b72932619 upstream.
    
    On some devices, the internal PLL circuit occasionally provides the
    wrong clock frequency after power up. The probability of failure is less
    than one failure per 1000 power cycles. When the failure occurs, the
    internal clock frequency is around 1/20 of the correct frequency.
    
    Signed-off-by: Todd Fujinaka <todd.fujinaka@intel.com>
    Tested-by: Aaron Brown <aaron.f.brown@intel.com>
    Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 2670a597db3c054f6af580adc517f87b62bf3842
Author: Guenter Roeck <linux@roeck-us.net>
Date:   Wed Jul 16 17:40:31 2014 -0700

    hwmon: (adt7470) Fix writes to temperature limit registers
    
    commit de12d6f4b10b21854441f5242dcb29ea96181e58 upstream.
    
    Temperature limit registers are signed. Limits therefore need
    to be clamped to (-128, 127) degrees C and not to (0, 255)
    degrees C.
    
    Without this fix, writing a limit of 128 degrees C sets the
    actual limit to -128 degrees C.
    
    Signed-off-by: Guenter Roeck <linux@roeck-us.net>
    Reviewed-by: Axel Lin <axel.lin@ingics.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 620291960dd792e80181a0380551799f0cdaba3e
Author: Axel Lin <axel.lin@ingics.com>
Date:   Wed Jul 9 09:18:59 2014 +0800

    hwmon: (da9052) Don't use dash in the name attribute
    
    commit ee14b644daaa58afe1e91bb9ebd9cf1b18d1f5fa upstream.
    
    Dashes are not allowed in hwmon name attributes.
    Use "da9052" instead of "da9052-hwmon".
    
    Signed-off-by: Axel Lin <axel.lin@ingics.com>
    Signed-off-by: Guenter Roeck <linux@roeck-us.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 5a9a1736054867457ba5a4703b3d20f1e8a7265b
Author: Axel Lin <axel.lin@ingics.com>
Date:   Wed Jul 9 09:22:54 2014 +0800

    hwmon: (da9055) Don't use dash in the name attribute
    
    commit 6b00f440dd678d786389a7100a2e03fe44478431 upstream.
    
    Dashes are not allowed in hwmon name attributes.
    Use "da9055" instead of "da9055-hwmon".
    
    Signed-off-by: Axel Lin <axel.lin@ingics.com>
    Signed-off-by: Guenter Roeck <linux@roeck-us.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 2104d6a76f422b6cf3b4e795955049a1f45e87be
Author: David Vrabel <david.vrabel@citrix.com>
Date:   Wed Jul 2 17:25:23 2014 +0100

    xen/manage: fix potential deadlock when resuming the console
    
    commit 1b6478231c6f5f844185acb32045cf195028cfce upstream.
    
    Calling xen_console_resume() in xen_suspend() causes a warning because
    it locks irq_mapping_update_lock (a mutex) and this may sleep.  If a
    userspace process is using the evtchn device then this mutex may be
    locked at the point of the stop_machine() call and
    xen_console_resume() would then deadlock.
    
    Resuming the console after stop_machine() returns avoids this
    deadlock.
    
    Signed-off-by: David Vrabel <david.vrabel@citrix.com>
    Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 2b37ed20d030836d3d341d71b1f735bd740e6047
Author: David Vrabel <david.vrabel@citrix.com>
Date:   Fri Jun 27 10:42:03 2014 +0100

    xen/balloon: set ballooned out pages as invalid in p2m
    
    commit fb9a0c443691ceaab3daba966bbbd9f5ff3aa26f upstream.
    
    Since cd9151e26d31048b2b5e00fd02e110e07d2200c9 (xen/balloon: set a
    mapping for ballooned out pages), a ballooned out page had its entry
    in the p2m set to the MFN of one of the scratch pages.  This means
    that the p2m will contain many entries pointing to the same MFN.
    
    During a domain save, these many-to-one entries are not identified as
    such and the scratch page is saved multiple times. On restore the
    ballooned pages are populated with new frames and the domain may use
    up its allocation before all pages can be restored.
    
    Since the original fix only needed to keep a mapping for the ballooned
    page it is safe to set ballooned out pages as INVALID_P2M_ENTRY in the
    p2m (as they were before). Thus preventing them from being saved and
    re-populated on restore.
    
    Signed-off-by: David Vrabel <david.vrabel@citrix.com>
    Reported-by: Marek Marczykowski <marmarek@invisiblethingslab.com>
    Tested-by: Marek Marczykowski <marmarek@invisiblethingslab.com>
    Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit e3f5055a5e01daa5587ef2285423be77cb94d463
Author: zhangwei(Jovi) <jovi.zhangwei@huawei.com>
Date:   Thu Jul 18 16:31:18 2013 +0800

    tracing: Add TRACE_ITER_PRINTK flag check in __trace_puts/__trace_bputs
    
    commit f0160a5a2912267c02cfe692eac955c360de5fdf upstream.
    
    The TRACE_ITER_PRINTK check in __trace_puts/__trace_bputs is missing,
    so add it, to be consistent with __trace_printk/__trace_bprintk.
    Those functions are all called by the same function: trace_printk().
    
    Link: http://lkml.kernel.org/p/51E7A7D6.8090900@huawei.com
    
    Signed-off-by: zhangwei(Jovi) <jovi.zhangwei@huawei.com>
    Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit ab14a3db4b5fcdceee0af0c14b89816bf3938d16
Author: zhangwei(Jovi) <jovi.zhangwei@huawei.com>
Date:   Thu Jul 18 16:31:05 2013 +0800

    tracing: Add ftrace_trace_stack into __trace_puts/__trace_bputs
    
    commit 8abfb8727f4a724d31f9ccfd8013fbd16d539445 upstream.
    
    Currently trace option stacktrace is not applicable for
    trace_printk with constant string argument, the reason is
    in __trace_puts/__trace_bputs ftrace_trace_stack is missing.
    
    In contrast, when using trace_printk with non constant string
    argument(will call into __trace_printk/__trace_bprintk), then
    trace option stacktrace is workable, this inconstant result
    will confuses users a lot.
    
    Link: http://lkml.kernel.org/p/51E7A7C9.9040401@huawei.com
    
    Signed-off-by: zhangwei(Jovi) <jovi.zhangwei@huawei.com>
    Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 1462165dcc4952d085d2458b64ba60eaab6453cc
Author: Steven Rostedt (Red Hat) <rostedt@goodmis.org>
Date:   Tue Jul 15 11:05:12 2014 -0400

    tracing: Fix graph tracer with stack tracer on other archs
    
    commit 5f8bf2d263a20b986225ae1ed7d6759dc4b93af9 upstream.
    
    Running my ftrace tests on PowerPC, it failed the test that checks
    if function_graph tracer is affected by the stack tracer. It was.
    Looking into this, I found that the update_function_graph_func()
    must be called even if the trampoline function is not changed.
    This is because archs like PowerPC do not support ftrace_ops being
    passed by assembly and instead uses a helper function (what the
    trampoline function points to). Since this function is not changed
    even when multiple ftrace_ops are added to the code, the test that
    falls out before calling update_function_graph_func() will miss that
    the update must still be done.
    
    Call update_function_graph_function() for all calls to
    update_ftrace_function()
    
    Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 7d88bf615c1bfea0b42ac3a18ccd9d84a60b2ccc
Author: Oleg Nesterov <oleg@redhat.com>
Date:   Fri Jul 11 21:06:38 2014 +0200

    tracing: instance_rmdir() leaks ftrace_event_file->filter
    
    commit 2448e3493cb3874baa90725c87869455ebf11cd2 upstream.
    
    instance_rmdir() path destroys the event files but forgets to free
    file->filter. Change remove_event_file_dir() to free_event_filter().
    
    Link: http://lkml.kernel.org/p/20140711190638.GA19517@redhat.com
    
    Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
    Cc: Namhyung Kim <namhyung@kernel.org>
    Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
    Cc: Tom Zanussi <tom.zanussi@linux.intel.com>
    Cc: "zhangwei(Jovi)" <jovi.zhangwei@huawei.com>
    Fixes: f6a84bdc75b5 "tracing: Introduce remove_event_file_dir()"
    Signed-off-by: Oleg Nesterov <oleg@redhat.com>
    Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 2e76928c94eab457a8505ad0df1a44b161b1a4ff
Author: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Date:   Thu Aug 7 22:03:00 2014 +0100

    iio:core: Handle error when mask type is not separate
    
    commit 78b3321610bf920d7fceb1a0236faa881be0bcf3 upstream.
    
    When event spec is shared by multiple channels, which has definition
    for mask_shared_by_type, iio_device_register_eventset fails.
    
    For example:
    static const struct iio_event_spec iio_dummy_events[] = {
    	{
    		.type = IIO_EV_TYPE_THRESH,
    		.dir = IIO_EV_DIR_RISING,
    		.mask_separate = BIT(IIO_EV_INFO_ENABLE),
    		.mask_shared_by_type = BIT(IIO_EV_INFO_VALUE),
    	}, {
    		.type = IIO_EV_TYPE_THRESH,
    		.dir = IIO_EV_DIR_FALLING,
    		.mask_separate = BIT(IIO_EV_INFO_ENABLE),a
    		.mask_shared_by_type = BIT(IIO_EV_INFO_VALUE),
    	}
    };
    
    If two channels use this event spec, this will result in error.
    
    This change handles EBUSY error similar to iio_device_add_info_mask_type().
    
    Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
    Signed-off-by: Jonathan Cameron <jic23@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 6e6dac54a24f12231915b527b20bd6a085d08dc7
Author: Anand Avati <avati@redhat.com>
Date:   Thu Jun 26 20:21:57 2014 -0400

    fuse: ignore entry-timeout on LOOKUP_REVAL
    
    commit 154210ccb3a871e631bf39fdeb7a8731d98af87b upstream.
    
    The following test case demonstrates the bug:
    
      sh# mount -t glusterfs localhost:meta-test /mnt/one
    
      sh# mount -t glusterfs localhost:meta-test /mnt/two
    
      sh# echo stuff > /mnt/one/file; rm -f /mnt/two/file; echo stuff > /mnt/one/file
      bash: /mnt/one/file: Stale file handle
    
      sh# echo stuff > /mnt/one/file; rm -f /mnt/two/file; sleep 1; echo stuff > /mnt/one/file
    
    On the second open() on /mnt/one, FUSE would have used the old
    nodeid (file handle) trying to re-open it. Gluster is returning
    -ESTALE. The ESTALE propagates back to namei.c:filename_lookup()
    where lookup is re-attempted with LOOKUP_REVAL. The right
    behavior now, would be for FUSE to ignore the entry-timeout and
    and do the up-call revalidation. Instead FUSE is ignoring
    LOOKUP_REVAL, succeeding the revalidation (because entry-timeout
    has not passed), and open() is again retried on the old file
    handle and finally the ESTALE is going back to the application.
    
    Fix: if revalidation is happening with LOOKUP_REVAL, then ignore
    entry-timeout and always do the up-call.
    
    Signed-off-by: Anand Avati <avati@redhat.com>
    Reviewed-by: Niels de Vos <ndevos@redhat.com>
    Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 67c53262040235888e8e8fa5e991f90f3551ca01
Author: Miklos Szeredi <mszeredi@suse.cz>
Date:   Mon Jul 7 15:28:51 2014 +0200

    fuse: handle large user and group ID
    
    commit 233a01fa9c4c7c41238537e8db8434667ff28a2f upstream.
    
    If the number in "user_id=N" or "group_id=N" mount options was larger than
    INT_MAX then fuse returned EINVAL.
    
    Fix this to handle all valid uid/gid values.
    
    Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 32e1a5c05d53a0725102af0b7721911bac429f59
Author: Miklos Szeredi <mszeredi@suse.cz>
Date:   Mon Jul 7 15:28:51 2014 +0200

    fuse: avoid scheduling while atomic
    
    commit c55a01d360afafcd52bc405c044a6ebf5de436d5 upstream.
    
    As reported by Richard Sharpe, an attempt to use fuse_notify_inval_entry()
    triggers complains about scheduling while atomic:
    
      BUG: scheduling while atomic: fuse.hf/13976/0x10000001
    
    This happens because fuse_notify_inval_entry() attempts to allocate memory
    with GFP_KERNEL, holding "struct fuse_copy_state" mapped by kmap_atomic().
    
    Introduced by commit 58bda1da4b3c "fuse/dev: use atomic maps"
    
    Fix by moving the map/unmap to just cover the actual memcpy operation.
    
    Original patch from Maxim Patlasov <mpatlasov@parallels.com>
    
    Reported-by: Richard Sharpe <realrichardsharpe@gmail.com>
    Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit dceb427299f3c737002d857af934cbe7e4b1be19
Author: Miklos Szeredi <mszeredi@suse.cz>
Date:   Mon Jul 7 15:28:50 2014 +0200

    fuse: timeout comparison fix
    
    commit 126b9d4365b110c157bc4cbc32540dfa66c9c85a upstream.
    
    As suggested by checkpatch.pl, use time_before64() instead of direct
    comparison of jiffies64 values.
    
    Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit b5b7aae13465e0dfcbc75aae273979754d80d959
Author: Loic Poulain <loic.poulain@intel.com>
Date:   Mon Jun 23 17:42:44 2014 +0200

    Bluetooth: Ignore H5 non-link packets in non-active state
    
    commit 48439d501e3d9e8634bdc0c418e066870039599d upstream.
    
    When detecting a non-link packet, h5_reset_rx() frees the Rx skb.
    Not returning after that will cause the upcoming h5_rx_payload()
    call to dereference a now NULL Rx skb and trigger a kernel oops.
    
    Signed-off-by: Loic Poulain <loic.poulain@intel.com>
    Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 11150a0890334d83ee37a311fa9d14e333feea3a
Author: Marcel Holtmann <marcel@holtmann.org>
Date:   Fri Jun 20 12:34:28 2014 +0200

    Revert "Bluetooth: Add a new PID/VID 0cf3/e005 for AR3012."
    
    commit a2b23bacb315d3873ed90029fd2b68c95de734c0 upstream.
    
    This reverts commit ca58e594da2486c1d28e7ad547d82266604ec4ce.
    
    For some unclear reason this patch tries to add suport for the
    product ID 0xe005, but it ends up adding product ID 0x3005 to
    all the tables. This is obviously wrong and causing multiple
    issues.
    
    The original patch seemed to be fine, but what ended up in 3.15
    is not what the patch intended. The commit 0a3658cccdf53 is
    already present and adds support for this hardware. This means
    only revert of this broken commit is requird.
    
    Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
    Reported-by: Alexander Holler <holler@ahsoftware.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 0bf7799c23cee35878beaff561278e164ed4a1c0
Author: K. Y. Srinivasan <kys@microsoft.com>
Date:   Mon Jul 7 16:34:25 2014 -0700

    Drivers: hv: util: Fix a bug in the KVP code
    
    commit 9bd2d0dfe4714dd5d7c09a93a5c9ea9e14ceb3fc upstream.
    
    Add code to poll the channel since we process only one message
    at a time and the host may not interrupt us. Also increase the
    receive buffer size since some KVP messages are close to 8K bytes in size.
    
    Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit c1d8522d46496dc14004e09289627f475e8fb245
Author: Dexuan Cui <decui@microsoft.com>
Date:   Wed Jul 16 00:00:45 2014 -0700

    Drivers: hv: hv_fcopy: fix a race condition for SMP guest
    
    commit 2ef82d24f445e82f80e235f44eb9d1bc933e3670 upstream.
    
    We should schedule the 5s "timer work" before starting the data transfer,
    otherwise, the data transfer code may finish so fast on another
    virtual cpu that when the code(fcopy_write()) trying to cancel the 5s
    "timer work" can occasionally fail because the "timer work" may haven't
    been scheduled yet and as a result the fcopy process will be aborted
    wrongly by fcopy_work_func() in 5s.
    
    Thank Liz Zhang <lizzha@microsoft.com> for the initial investigation
    on the bug.
    
    This addresses https://bugzilla.redhat.com/show_bug.cgi?id=1118123
    
    Tested-by: Liz Zhang <lizzha@microsoft.com>
    Cc: Haiyang Zhang <haiyangz@microsoft.com>
    Signed-off-by: Dexuan Cui <decui@microsoft.com>
    Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit f742278cdd7afa342898e18ad17ab2accf81c57e
Author: Takashi Iwai <tiwai@suse.de>
Date:   Tue Jul 15 15:19:43 2014 +0200

    ALSA: hda - Fix broken PM due to incomplete i915 initialization
    
    commit 4da63c6fc426023d1a20e45508c47d7d68c6a53d upstream.
    
    When the initialization of Intel HDMI controller fails due to missing
    i915 kernel symbols (e.g. HD-audio is built in while i915 is module),
    the driver discontinues the probe.  However, since the probe was done
    asynchronously, the driver object still remains, thus the relevant PM
    ops are still called at suspend/resume. This results in the bad access
    to the incomplete audio card object, eventually leads to Oops or stall
    at PM.
    
    This patch adds the missing checks of chip->init_failed flag at each
    PM callback in order to fix the problem above.
    
    Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=79561
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit bf2ed225999e6e8d2a7e2e3a5c938df1d5077b03
Author: Takashi Iwai <tiwai@suse.de>
Date:   Mon Jul 14 10:45:31 2014 +0200

    ALSA: hda - Revert stream assignment order for Intel controllers
    
    commit cd50065b3be83a705635550c04e368f2a4cc44d0 upstream.
    
    We got a regression report for 3.15.x kernels, and this turned out to
    be triggered by the fix for stream assignment order.  On reporter's
    machine with Intel controller (8086:1e20) + VIA VT1802 codec, the
    first playback slot can't work with speaker outputs.
    
    But the original commit was actually a fix for AMD controllers where
    no proper GCAP value is returned, we shouldn't revert the whole
    commit.  Instead, in this patch, a new flag is introduced to determine
    the stream assignment order, and follow the old behavior for Intel
    controllers.
    
    Fixes: dcb32ecd9a53 ('ALSA: hda - Do not assign streams in reverse order')
    Reported-and-tested-by: Steven Newbury <steve@snewbury.org.uk>
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 03dad2842f6ddaf949b6a558c3299df53989f1c3
Author: Hans de Goede <hdegoede@redhat.com>
Date:   Wed Jul 9 06:20:44 2014 -0300

    media: gspca_pac7302: Add new usb-id for Genius i-Look 317
    
    commit 242841d3d71191348f98310e2d2001e1001d8630 upstream.
    
    Tested-and-reported-by: yullaw <yullaw@mageia.cz>
    
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
    Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 367d4803f7f685cba99c31722ba6e7736270f931
Author: Abbas Raza <Abbas_Raza@mentor.com>
Date:   Thu Jul 17 19:34:31 2014 +0800

    usb: chipidea: udc: Disable auto ZLP generation on ep0
    
    commit 953c66469735aed8d2ada639a72b150f01dae605 upstream.
    
    There are 2 methods for ZLP (zero-length packet) generation:
    1) In software
    2) Automatic generation by device controller
    
    1) is implemented in UDC driver and it attaches ZLP to IN packet if
       descriptor->size < wLength
    2) can be enabled/disabled by setting ZLT bit in the QH
    
    When gadget ffs is connected to ubuntu host, the host sends
    get descriptor request and wLength in setup packet is 255 while the
    size of descriptor which will be sent by gadget in IN packet is
    64 byte. So the composite driver sets req->zero = 1.
    In UDC driver following code will be executed then
    
            if (hwreq->req.zero && hwreq->req.length
                && (hwreq->req.length % hwep->ep.maxpacket == 0))
                    add_td_to_list(hwep, hwreq, 0);
    
    Case-A:
    So in case of ubuntu host, UDC driver will attach a ZLP to the IN packet.
    ubuntu host will request 255 byte in IN request, gadget will send 64 byte
    with ZLP and host will come to know that there is no more data.
    But hold on, by default ZLT=0 for endpoint 0 so hardware also tries to
    automatically generate the ZLP which blocks enumeration for ~6 seconds due
    to endpoint 0 STALL, NAKs are sent to host for any requests (OUT/PING)
    
    Case-B:
    In case when gadget ffs is connected to Apple device, Apple device sends
    setup packet with wLength=64. So descriptor->size = 64 and wLength=64
    therefore req->zero = 0 and UDC driver will not attach any ZLP to the
    IN packet. Apple device requests 64 bytes, gets 64 bytes and doesn't
    further request for IN data. But ZLT=0 by default for endpoint 0 so
    hardware tries to automatically generate the ZLP which blocks enumeration
    for ~6 seconds due to endpoint 0 STALL, NAKs are sent to host for any
    requests (OUT/PING)
    
    According to USB2.0 specs:
    
        8.5.3.2 Variable-length Data Stage
        A control pipe may have a variable-length data phase in which the
        host requests more data than is contained in the specified data
        structure. When all of the data structure is returned to the host,
        the function should indicate that the Data stage is ended by
        returning a packet that is shorter than the MaxPacketSize for the
        pipe. If the data structure is an exact multiple of wMaxPacketSize
        for the pipe, the function will return a zero-length packet to indicate
        the end of the Data stage.
    
    In Case-A mentioned above:
    If we disable software ZLP generation & ZLT=0 for endpoint 0 OR if software
    ZLP generation is not disabled but we set ZLT=1 for endpoint 0 then
    enumeration doesn't block for 6 seconds.
    
    In Case-B mentioned above:
    If we disable software ZLP generation & ZLT=0 for endpoint then enumeration
    still blocks due to ZLP automatically generated by hardware and host not needing
    it. But if we keep software ZLP generation enabled but we set ZLT=1 for
    endpoint 0 then enumeration doesn't block for 6 seconds.
    
    So the proper solution for this issue seems to disable automatic ZLP generation
    by hardware (i.e by setting ZLT=1 for endpoint 0) and let software (UDC driver)
    handle the ZLP generation based on req->zero field.
    
    Signed-off-by: Abbas Raza <Abbas_Raza@mentor.com>
    Signed-off-by: Peter Chen <peter.chen@freescale.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit da8ab612bc64d49d158e754c843b777389feb557
Author: Gavin Guo <gavin.guo@canonical.com>
Date:   Fri Jul 18 01:12:13 2014 +0800

    usb: Check if port status is equal to RxDetect
    
    commit bb86cf569bbd7ad4dce581a37c7fbd748057e9dc upstream.
    
    When using USB 3.0 pen drive with the [AMD] FCH USB XHCI Controller
    [1022:7814], the second hotplugging will experience the USB 3.0 pen
    drive is recognized as high-speed device. After bisecting the kernel,
    I found the commit number 41e7e056cdc662f704fa9262e5c6e213b4ab45dd
    (USB: Allow USB 3.0 ports to be disabled.) causes the bug. After doing
    some experiments, the bug can be fixed by avoiding executing the function
    hub_usb3_port_disable(). Because the port status with [AMD] FCH USB
    XHCI Controlleris [1022:7814] is already in RxDetect
    (I tried printing out the port status before setting to Disabled state),
    it's reasonable to check the port status before really executing
    hub_usb3_port_disable().
    
    Fixes: 41e7e056cdc6 (USB: Allow USB 3.0 ports to be disabled.)
    Signed-off-by: Gavin Guo <gavin.guo@canonical.com>
    Acked-by: Alan Stern <stern@rowland.harvard.edu>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>