commit 44d19f5a04ae4e433548ba2f25e4d2ccfcac765e
Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date:   Wed Dec 4 10:50:53 2013 -0800

    Linux 3.4.72

commit db0aa53d4d6b392b21409cfa88be87ab76055965
Author: Nanno Langstraat <langstr@gmail.com>
Date:   Mon Oct 14 16:07:15 2013 +0200

    HID: apple: option to swap the 'Option' ("Alt") and 'Command' ("Flag") keys.
    
    commit 43c831468b3d26dbe8f2e061ccaf1abaf9cc1b8b upstream.
    
    Use case: people who use both Apple and PC keyboards regularly, and desire to
    keep&use their PC muscle memory.
    
    A particular use case: an Apple compact external keyboard connected to a PC
    laptop. (This use case can't be covered well by X.org key remappings etc.)
    
    Signed-off-by: Nanno Langstraat <langstr@gmail.com>
    Signed-off-by: Jiri Kosina <jkosina@suse.cz>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 6ede31ca15e96341e2e1597d4916592c74380292
Author: Stefan Achatz <erazor_de@users.sourceforge.net>
Date:   Sun Nov 3 06:25:33 2013 +0100

    HID: roccat: fix Coverity CID 141438
    
    commit 7be63f20b00840a6f1c718dcee00855688d64acd upstream.
    
    Add missing switch breaks.
    
    Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net>
    Signed-off-by: Jiri Kosina <jkosina@suse.cz>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit ffd4ce123eb153aba8cee4d4f9994f9e80a1fbe9
Author: Mauro Carvalho Chehab <m.chehab@samsung.com>
Date:   Sat Nov 2 08:16:47 2013 -0300

    media: lirc_zilog: Don't use dynamic static allocation
    
    commit ac5b4b6bf0c84c48d7e2e3fce22e35b04282ba76 upstream.
    
    Dynamic static allocation is evil, as Kernel stack is too low, and
    ompilation complains about it on some archs:
    	drivers/staging/media/lirc/lirc_zilog.c:967:1: warning: 'read' uses dynamic stack allocation [enabled by default]
    Instead, let's enforce a limit for the buffer to be 64. That should
    be more than enough.
    
    Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
    Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
    Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 51d351d5b949ae7204696ada7ef502ed34d34fb0
Author: Steven Rostedt (Red Hat) <rostedt@goodmis.org>
Date:   Mon Nov 25 20:59:46 2013 -0500

    ftrace: Fix function graph with loading of modules
    
    commit 8a56d7761d2d041ae5e8215d20b4167d8aa93f51 upstream.
    
    Commit 8c4f3c3fa9681 "ftrace: Check module functions being traced on reload"
    fixed module loading and unloading with respect to function tracing, but
    it missed the function graph tracer. If you perform the following
    
     # cd /sys/kernel/debug/tracing
     # echo function_graph > current_tracer
     # modprobe nfsd
     # echo nop > current_tracer
    
    You'll get the following oops message:
    
     ------------[ cut here ]------------
     WARNING: CPU: 2 PID: 2910 at /linux.git/kernel/trace/ftrace.c:1640 __ftrace_hash_rec_update.part.35+0x168/0x1b9()
     Modules linked in: nfsd exportfs nfs_acl lockd ipt_MASQUERADE sunrpc ip6t_REJECT nf_conntrack_ipv6 nf_defrag_ipv6 ip6table_filter ip6_tables uinput snd_hda_codec_idt
     CPU: 2 PID: 2910 Comm: bash Not tainted 3.13.0-rc1-test #7
     Hardware name: To Be Filled By O.E.M. To Be Filled By O.E.M./To be filled by O.E.M., BIOS SDBLI944.86P 05/08/2007
      0000000000000668 ffff8800787efcf8 ffffffff814fe193 ffff88007d500000
      0000000000000000 ffff8800787efd38 ffffffff8103b80a 0000000000000668
      ffffffff810b2b9a ffffffff81a48370 0000000000000001 ffff880037aea000
     Call Trace:
      [<ffffffff814fe193>] dump_stack+0x4f/0x7c
      [<ffffffff8103b80a>] warn_slowpath_common+0x81/0x9b
      [<ffffffff810b2b9a>] ? __ftrace_hash_rec_update.part.35+0x168/0x1b9
      [<ffffffff8103b83e>] warn_slowpath_null+0x1a/0x1c
      [<ffffffff810b2b9a>] __ftrace_hash_rec_update.part.35+0x168/0x1b9
      [<ffffffff81502f89>] ? __mutex_lock_slowpath+0x364/0x364
      [<ffffffff810b2cc2>] ftrace_shutdown+0xd7/0x12b
      [<ffffffff810b47f0>] unregister_ftrace_graph+0x49/0x78
      [<ffffffff810c4b30>] graph_trace_reset+0xe/0x10
      [<ffffffff810bf393>] tracing_set_tracer+0xa7/0x26a
      [<ffffffff810bf5e1>] tracing_set_trace_write+0x8b/0xbd
      [<ffffffff810c501c>] ? ftrace_return_to_handler+0xb2/0xde
      [<ffffffff811240a8>] ? __sb_end_write+0x5e/0x5e
      [<ffffffff81122aed>] vfs_write+0xab/0xf6
      [<ffffffff8150a185>] ftrace_graph_caller+0x85/0x85
      [<ffffffff81122dbd>] SyS_write+0x59/0x82
      [<ffffffff8150a185>] ftrace_graph_caller+0x85/0x85
      [<ffffffff8150a2d2>] system_call_fastpath+0x16/0x1b
     ---[ end trace 940358030751eafb ]---
    
    The above mentioned commit didn't go far enough. Well, it covered the
    function tracer by adding checks in __register_ftrace_function(). The
    problem is that the function graph tracer circumvents that (for a slight
    efficiency gain when function graph trace is running with a function
    tracer. The gain was not worth this).
    
    The problem came with ftrace_startup() which should always be called after
    __register_ftrace_function(), if you want this bug to be completely fixed.
    
    Anyway, this solution moves __register_ftrace_function() inside of
    ftrace_startup() and removes the need to call them both.
    
    Reported-by: Dave Wysochanski <dwysocha@redhat.com>
    Fixes: ed926f9b35cd ("ftrace: Use counters to enable functions to trace")
    Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 5833570f8e15cd7a40dd6c14ec73cb53736048cf
Author: Alex Williamson <alex.williamson@redhat.com>
Date:   Mon Dec 10 10:32:57 2012 -0700

    KVM: Fix iommu map/unmap to handle memory slot moves
    
    commit e40f193f5bb022e927a57a4f5d5194e4f12ddb74 upstream.
    
    The iommu integration into memory slots expects memory slots to be
    added or removed and doesn't handle the move case.  We can unmap
    slots from the iommu after we mark them invalid and map them before
    installing the final memslot array.  Also re-order the kmemdup vs
    map so we don't leave iommu mappings if we get ENOMEM.
    
    Reviewed-by: Gleb Natapov <gleb@redhat.com>
    Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
    Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
    Cc: Luis Henriques <luis.henriques@canonical.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 9af88f0e8b1ce5f10786654c3f00adde1c67a2e5
Author: Marcelo Tosatti <mtosatti@redhat.com>
Date:   Fri Aug 24 15:54:58 2012 -0300

    KVM: perform an invalid memslot step for gpa base change
    
    commit 12d6e7538e2d418c08f082b1b44ffa5fb7270ed8 upstream.
    
    PPC must flush all translations before the new memory slot
    is visible.
    
    Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
    Signed-off-by: Avi Kivity <avi@redhat.com>
    Cc: Luis Henriques <luis.henriques@canonical.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 1fefeae75801ca98b2693ef6b2974f0539f43e29
Author: Tom Gundersen <teg@jklm.no>
Date:   Thu Oct 31 00:33:54 2013 -0700

    Input: i8042 - add PNP modaliases
    
    commit 78551277e4df57864b0b0e7f85c23ede2be2edb8 upstream.
    
    This allows the module to be autoloaded in the common case.
    
    In order to work on non-PnP systems the module should be compiled in or
    loaded unconditionally at boot (c.f. modules-load.d(5)), as before.
    
    Signed-off-by: Tom Gundersen <teg@jklm.no>
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 4d815b62becdae153d9541b49ba323cd58459a97
Author: Steven Rostedt (Red Hat) <rostedt@goodmis.org>
Date:   Tue Nov 26 09:22:54 2013 -0500

    tracing: Allow events to have NULL strings
    
    commit 4e58e54754dc1fec21c3a9e824bc108b05fdf46e upstream.
    
    If an TRACE_EVENT() uses __assign_str() or __get_str on a NULL pointer
    then the following oops will happen:
    
    BUG: unable to handle kernel NULL pointer dereference at   (null)
    IP: [<c127a17b>] strlen+0x10/0x1a
    *pde = 00000000 ^M
    Oops: 0000 [#1] PREEMPT SMP
    Modules linked in:
    CPU: 1 PID: 0 Comm: swapper/1 Not tainted 3.13.0-rc1-test+ #2
    Hardware name:                  /DG965MQ, BIOS MQ96510J.86A.0372.2006.0605.1717 06/05/2006^M
    task: f5cde9f0 ti: f5e5e000 task.ti: f5e5e000
    EIP: 0060:[<c127a17b>] EFLAGS: 00210046 CPU: 1
    EIP is at strlen+0x10/0x1a
    EAX: 00000000 EBX: c2472da8 ECX: ffffffff EDX: c2472da8
    ESI: c1c5e5fc EDI: 00000000 EBP: f5e5fe84 ESP: f5e5fe80
     DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
    CR0: 8005003b CR2: 00000000 CR3: 01f32000 CR4: 000007d0
    Stack:
     f5f18b90 f5e5feb8 c10687a8 0759004f 00000005 00000005 00000005 00200046
     00000002 00000000 c1082a93 f56c7e28 c2472da8 c1082a93 f5e5fee4 c106bc61^M
     00000000 c1082a93 00000000 00000000 00000001 00200046 00200082 00000000
    Call Trace:
     [<c10687a8>] ftrace_raw_event_lock+0x39/0xc0
     [<c1082a93>] ? ktime_get+0x29/0x69
     [<c1082a93>] ? ktime_get+0x29/0x69
     [<c106bc61>] lock_release+0x57/0x1a5
     [<c1082a93>] ? ktime_get+0x29/0x69
     [<c10824dd>] read_seqcount_begin.constprop.7+0x4d/0x75
     [<c1082a93>] ? ktime_get+0x29/0x69^M
     [<c1082a93>] ktime_get+0x29/0x69
     [<c108a46a>] __tick_nohz_idle_enter+0x1e/0x426
     [<c10690e8>] ? lock_release_holdtime.part.19+0x48/0x4d
     [<c10bc184>] ? time_hardirqs_off+0xe/0x28
     [<c1068c82>] ? trace_hardirqs_off_caller+0x3f/0xaf
     [<c108a8cb>] tick_nohz_idle_enter+0x59/0x62
     [<c1079242>] cpu_startup_entry+0x64/0x192
     [<c102299c>] start_secondary+0x277/0x27c
    Code: 90 89 c6 89 d0 88 c4 ac 38 e0 74 09 84 c0 75 f7 be 01 00 00 00 89 f0 48 5e 5d c3 55 89 e5 57 66 66 66 66 90 83 c9 ff 89 c7 31 c0 <f2> ae f7 d1 8d 41 ff 5f 5d c3 55 89 e5 57 66 66 66 66 90 31 ff
    EIP: [<c127a17b>] strlen+0x10/0x1a SS:ESP 0068:f5e5fe80
    CR2: 0000000000000000
    ---[ end trace 01bc47bf519ec1b2 ]---
    
    New tracepoints have been added that have allowed for NULL pointers
    being assigned to strings. To fix this, change the TRACE_EVENT() code
    to check for NULL and if it is, it will assign "(null)" to it instead
    (similar to what glibc printf does).
    
    Reported-by: Shuah Khan <shuah.kh@samsung.com>
    Reported-by: Jovi Zhangwei <jovi.zhangwei@gmail.com>
    Link: http://lkml.kernel.org/r/CAGdX0WFeEuy+DtpsJzyzn0343qEEjLX97+o1VREFkUEhndC+5Q@mail.gmail.com
    Link: http://lkml.kernel.org/r/528D6972.9010702@samsung.com
    Fixes: 9cbf117662e2 ("tracing/events: provide string with undefined size support")
    Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 1d78aecdc9eb045e8c6b90050911324d3d0fc51f
Author: Kailang Yang <kailang@realtek.com>
Date:   Tue Nov 26 15:41:40 2013 +0800

    ALSA: hda/realtek - Set pcbeep amp for ALC668
    
    commit 9ad54547cf6f4410eba83bb95dfd2a0966718d6d upstream.
    
    Set the missing pcbeep default amp for ALC668.
    
    Signed-off-by: Kailang Yang <kailang@realtek.com>
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit fe094c412973269d2fad2e04a852771570e8edf1
Author: Peter Zijlstra <peterz@infradead.org>
Date:   Tue Nov 26 15:03:41 2013 +0100

    cpuset: Fix memory allocator deadlock
    
    commit 0fc0287c9ed1ffd3706f8b4d9b314aa102ef1245 upstream.
    
    Juri hit the below lockdep report:
    
    [    4.303391] ======================================================
    [    4.303392] [ INFO: SOFTIRQ-safe -> SOFTIRQ-unsafe lock order detected ]
    [    4.303394] 3.12.0-dl-peterz+ #144 Not tainted
    [    4.303395] ------------------------------------------------------
    [    4.303397] kworker/u4:3/689 [HC0[0]:SC0[0]:HE0:SE1] is trying to acquire:
    [    4.303399]  (&p->mems_allowed_seq){+.+...}, at: [<ffffffff8114e63c>] new_slab+0x6c/0x290
    [    4.303417]
    [    4.303417] and this task is already holding:
    [    4.303418]  (&(&q->__queue_lock)->rlock){..-...}, at: [<ffffffff812d2dfb>] blk_execute_rq_nowait+0x5b/0x100
    [    4.303431] which would create a new lock dependency:
    [    4.303432]  (&(&q->__queue_lock)->rlock){..-...} -> (&p->mems_allowed_seq){+.+...}
    [    4.303436]
    
    [    4.303898] the dependencies between the lock to be acquired and SOFTIRQ-irq-unsafe lock:
    [    4.303918] -> (&p->mems_allowed_seq){+.+...} ops: 2762 {
    [    4.303922]    HARDIRQ-ON-W at:
    [    4.303923]                     [<ffffffff8108ab9a>] __lock_acquire+0x65a/0x1ff0
    [    4.303926]                     [<ffffffff8108cbe3>] lock_acquire+0x93/0x140
    [    4.303929]                     [<ffffffff81063dd6>] kthreadd+0x86/0x180
    [    4.303931]                     [<ffffffff816ded6c>] ret_from_fork+0x7c/0xb0
    [    4.303933]    SOFTIRQ-ON-W at:
    [    4.303933]                     [<ffffffff8108abcc>] __lock_acquire+0x68c/0x1ff0
    [    4.303935]                     [<ffffffff8108cbe3>] lock_acquire+0x93/0x140
    [    4.303940]                     [<ffffffff81063dd6>] kthreadd+0x86/0x180
    [    4.303955]                     [<ffffffff816ded6c>] ret_from_fork+0x7c/0xb0
    [    4.303959]    INITIAL USE at:
    [    4.303960]                    [<ffffffff8108a884>] __lock_acquire+0x344/0x1ff0
    [    4.303963]                    [<ffffffff8108cbe3>] lock_acquire+0x93/0x140
    [    4.303966]                    [<ffffffff81063dd6>] kthreadd+0x86/0x180
    [    4.303969]                    [<ffffffff816ded6c>] ret_from_fork+0x7c/0xb0
    [    4.303972]  }
    
    Which reports that we take mems_allowed_seq with interrupts enabled. A
    little digging found that this can only be from
    cpuset_change_task_nodemask().
    
    This is an actual deadlock because an interrupt doing an allocation will
    hit get_mems_allowed()->...->__read_seqcount_begin(), which will spin
    forever waiting for the write side to complete.
    
    Cc: John Stultz <john.stultz@linaro.org>
    Cc: Mel Gorman <mgorman@suse.de>
    Reported-by: Juri Lelli <juri.lelli@gmail.com>
    Signed-off-by: Peter Zijlstra <peterz@infradead.org>
    Tested-by: Juri Lelli <juri.lelli@gmail.com>
    Acked-by: Li Zefan <lizefan@huawei.com>
    Acked-by: Mel Gorman <mgorman@suse.de>
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit df29bdd478affb8d81620e43e70635bef110a20e
Author: Michael Neuling <mikey@neuling.org>
Date:   Mon Nov 25 11:12:20 2013 +1100

    powerpc/signals: Improved mark VSX not saved with small contexts fix
    
    commit ec67ad82814bee92251fd963bf01c7a173856555 upstream.
    
    In a recent patch:
      commit c13f20ac48328b05cd3b8c19e31ed6c132b44b42
      Author: Michael Neuling <mikey@neuling.org>
      powerpc/signals: Mark VSX not saved with small contexts
    
    We fixed an issue but an improved solution was later discussed after the patch
    was merged.
    
    Firstly, this patch doesn't handle the 64bit signals case, which could also hit
    this issue (but has never been reported).
    
    Secondly, the original patch isn't clear what MSR VSX should be set to.  The
    new approach below always clears the MSR VSX bit (to indicate no VSX is in the
    context) and sets it only in the specific case where VSX is available (ie. when
    VSX has been used and the signal context passed has space to provide the
    state).
    
    This reverts the original patch and replaces it with the improved solution.  It
    also adds a 64 bit version.
    
    Signed-off-by: Michael Neuling <mikey@neuling.org>
    Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit f69a26d2cff8533570ca3ef3c59f2e1174b084b1
Author: NeilBrown <neilb@suse.de>
Date:   Thu Nov 14 15:16:15 2013 +1100

    md: fix calculation of stacking limits on level change.
    
    commit 02e5f5c0a0f726e66e3d8506ea1691e344277969 upstream.
    
    The various ->run routines of md personalities assume that the 'queue'
    has been initialised by the blk_set_stacking_limits() call in
    md_alloc().
    
    However when the level is changed (by level_store()) the ->run routine
    for the new level is called for an array which has already had the
    stacking limits modified.  This can result in incorrect final
    settings.
    
    So call blk_set_stacking_limits() before ->run in level_store().
    
    A specific consequence of this bug is that it causes
    discard_granularity to be set incorrectly when reshaping a RAID4 to a
    RAID0.
    
    This is suitable for any -stable kernel since 3.3 in which
    blk_set_stacking_limits() was introduced.
    
    Reported-and-tested-by: "Baldysiak, Pawel" <pawel.baldysiak@intel.com>
    Signed-off-by: NeilBrown <neilb@suse.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 3ae78536556792344cad475b78aecaf66e9ab3a6
Author: Jerome Glisse <jglisse@redhat.com>
Date:   Tue Nov 12 10:51:16 2013 -0500

    radeon: workaround pinning failure on low ram gpu
    
    commit 97b6ff6be9da7675aab339334fda996d6c5077d9 upstream.
    
    GPU with low amount of ram can fails at pinning new framebuffer before
    unpinning old one. On such failure, retry with unpinning old one before
    pinning new one allowing to work around the issue. This is somewhat
    ugly but only affect those old GPU we care about.
    
    Signed-off-by: Jerome Glisse <jglisse@redhat.com>
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit e21e0c15bcce325c61d67181d1e1d6ff917eda4d
Author: Alex Deucher <alexander.deucher@amd.com>
Date:   Mon Oct 28 10:56:23 2013 -0400

    drm/radeon/si: fix define for MC_SEQ_TRAIN_WAKEUP_CNTL
    
    commit d5693761b2b4ff530c8af8af9ec55b6eae76e617 upstream.
    
    Typo in the register offset.
    
    Noticed-by: Sylvain BERTRAND <sylware@legeek.net>
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit c417faedff9cf67956760f48a167253609f26fd6
Author: Ben Skeggs <bskeggs@redhat.com>
Date:   Wed Nov 13 15:18:32 2013 +1000

    drm/nouveau: when bailing out of a pushbuf ioctl, do not remove previous fence
    
    commit 9360bd1112d8874d21942e2ae74f5416b00a8db6 upstream.
    
    Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 38b24f2c291160842a855899e04e11952da3da3f
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Mon Nov 4 08:13:45 2013 +0100

    drm/i915: flush cursors harder
    
    commit b2ea8ef559b4d94190009f3651b5b3ab7c05afd3 upstream.
    
    Apparently they need the same treatment as primary planes. This fixes
    modesetting failures because of stuck cursors (!) on Thomas' i830M
    machine.
    
    I've figured while at it I'll also roll it out for the ivb 3 pipe
    version of this function. I didn't do this for i845/i865 since Bspec
    says the update mechanism works differently, and there's some
    additional rules about what can be updated in which order.
    
    Tested-by: Thomas Richter <thor@math.tu-berlin.de>
    Cc:  Thomas Richter <thor@math.tu-berlin.de>
    Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
    Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 6e911aa9fefc5e239e979247aced3b2f6cdb4f38
Author: Jakob Bornecrantz <jakob@vmware.com>
Date:   Wed Oct 30 02:46:56 2013 -0700

    drm/ttm: Handle in-memory region copies
    
    commit 9a0599ddeae012a771bba5e23393fc52d8a59d89 upstream.
    
    Fix the case where the ttm pointer may be NULL causing
    a NULL pointer dereference.
    
    Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
    Signed-off-by: Thomas Hellström <thellstrom@vmware.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 230ab9dec1640dabf4c7932cfc626e51a844a6b6
Author: Dan Williams <dcbw@redhat.com>
Date:   Fri Nov 8 13:39:44 2013 -0600

    prism54: set netdev type to "wlan"
    
    commit 8e3ffa471091c560deb6738ed9ab7445b7a5fd04 upstream.
    
    Userspace uses the netdev devtype for stuff like device naming and type
    detection.  Be nice and set it.  Remove the pointless #if/#endif around
    SET_NETDEV_DEV too.
    
    Signed-off-by: Dan Williams <dcbw@redhat.com>
    Signed-off-by: John W. Linville <linville@tuxdriver.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit fb1601f038505840a2c3bfaf7622e1bae949c064
Author: Andreas Bießmann <andreas@biessmann.de>
Date:   Thu Oct 24 12:31:04 2013 +0200

    avr32: fix out-of-range jump in large kernels
    
    commit d617b338bbfdd77e9cbd8e7dc949cee3dd73d575 upstream.
    
    This patch fixes following error (for big kernels):
    
    ---8<---
    arch/avr32/boot/u-boot/head.o: In function `no_tag_table':
    (.init.text+0x44): relocation truncated to fit: R_AVR32_22H_PCREL against symbol `panic' defined in .text.unlikely section in kernel/built-in.o
    arch/avr32/kernel/built-in.o: In function `bad_return':
    (.ex.text+0x236): relocation truncated to fit: R_AVR32_22H_PCREL against symbol `panic' defined in .text.unlikely section in kernel/built-in.o
    --->8---
    
    It comes up when the kernel increases and 'panic()' is too far away to fit in
    the +/- 2MiB range. Which in turn issues from the 21-bit displacement in
    'br{cond4}' mnemonic which is one of the two ways to do jumps (rjmp has just
    10-bit displacement and therefore a way smaller range). This fact was stated
    before in 8d29b7b9f81d6b83d869ff054e6c189d6da73f1f.
    One solution to solve this is to add a local storage for the symbol address
    and just load the $pc with that value.
    
    Signed-off-by: Andreas Bießmann <andreas@biessmann.de>
    Acked-by: Hans-Christian Egtvedt <egtvedt@samfundet.no>
    Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 07cf6ad31d91fd61bb378b3b62c746cbc2cd49ab
Author: Andreas Bießmann <andreas@biessmann.de>
Date:   Thu Oct 24 12:31:03 2013 +0200

    avr32: setup crt for early panic()
    
    commit 7a2a74f4b856993218aa7cdeeb6c3103101340db upstream.
    
    Before the CRT was (fully) set up in kernel_entry (bss cleared before in
    _start, but also not before jump to panic() in no_tag_table case).
    
    This patch fixes this up to have a fully working CRT when branching to panic()
    in no_tag_table.
    
    Signed-off-by: Andreas Bießmann <andreas@biessmann.de>
    Acked-by: Hans-Christian Egtvedt <egtvedt@samfundet.no>
    Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 17af9d91523a6e44a3721cea48cd3ade66a8b416
Author: Paul Moore <pmoore@redhat.com>
Date:   Thu Sep 26 17:00:46 2013 -0400

    selinux: correct locking in selinux_netlbl_socket_connect)
    
    commit 42d64e1add3a1ce8a787116036163b8724362145 upstream.
    
    The SELinux/NetLabel glue code has a locking bug that affects systems
    with NetLabel enabled, see the kernel error message below.  This patch
    corrects this problem by converting the bottom half socket lock to a
    more conventional, and correct for this call-path, lock_sock() call.
    
     ===============================
     [ INFO: suspicious RCU usage. ]
     3.11.0-rc3+ #19 Not tainted
     -------------------------------
     net/ipv4/cipso_ipv4.c:1928 suspicious rcu_dereference_protected() usage!
    
     other info that might help us debug this:
    
     rcu_scheduler_active = 1, debug_locks = 0
     2 locks held by ping/731:
      #0:  (slock-AF_INET/1){+.-...}, at: [...] selinux_netlbl_socket_connect
      #1:  (rcu_read_lock){.+.+..}, at: [<...>] netlbl_conn_setattr
    
     stack backtrace:
     CPU: 1 PID: 731 Comm: ping Not tainted 3.11.0-rc3+ #19
     Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
      0000000000000001 ffff88006f659d28 ffffffff81726b6a ffff88003732c500
      ffff88006f659d58 ffffffff810e4457 ffff88006b845a00 0000000000000000
      000000000000000c ffff880075aa2f50 ffff88006f659d90 ffffffff8169bec7
     Call Trace:
      [<ffffffff81726b6a>] dump_stack+0x54/0x74
      [<ffffffff810e4457>] lockdep_rcu_suspicious+0xe7/0x120
      [<ffffffff8169bec7>] cipso_v4_sock_setattr+0x187/0x1a0
      [<ffffffff8170f317>] netlbl_conn_setattr+0x187/0x190
      [<ffffffff8170f195>] ? netlbl_conn_setattr+0x5/0x190
      [<ffffffff8131ac9e>] selinux_netlbl_socket_connect+0xae/0xc0
      [<ffffffff81303025>] selinux_socket_connect+0x135/0x170
      [<ffffffff8119d127>] ? might_fault+0x57/0xb0
      [<ffffffff812fb146>] security_socket_connect+0x16/0x20
      [<ffffffff815d3ad3>] SYSC_connect+0x73/0x130
      [<ffffffff81739a85>] ? sysret_check+0x22/0x5d
      [<ffffffff810e5e2d>] ? trace_hardirqs_on_caller+0xfd/0x1c0
      [<ffffffff81373d4e>] ? trace_hardirqs_on_thunk+0x3a/0x3f
      [<ffffffff815d52be>] SyS_connect+0xe/0x10
      [<ffffffff81739a59>] system_call_fastpath+0x16/0x1b
    
    Signed-off-by: Paul Moore <pmoore@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 5d6d6a7a101136aec882cc168c2d6bd4376b3760
Author: Yinghai Lu <yinghai@kernel.org>
Date:   Mon Nov 18 17:02:45 2013 -0700

    PCI: Remove duplicate pci_disable_device() from pcie_portdrv_remove()
    
    commit e7cc5cf74544d97d7b69e2701595037474db1f96 upstream.
    
    The pcie_portdrv .probe() method calls pci_enable_device() once, in
    pcie_port_device_register(), but the .remove() method calls
    pci_disable_device() twice, in pcie_port_device_remove() and in
    pcie_portdrv_remove().
    
    That causes a "disabling already-disabled device" warning when removing a
    PCIe port device.  This happens all the time when removing Thunderbolt
    devices, but is also easy to reproduce with, e.g.,
    "echo 0000:00:1c.3 > /sys/bus/pci/drivers/pcieport/unbind"
    
    This patch removes the disable from pcie_portdrv_remove().
    
    [bhelgaas: changelog, tag for stable]
    Reported-by: David Bulkow <David.Bulkow@stratus.com>
    Reported-by: Mika Westerberg <mika.westerberg@linux.intel.com>
    Signed-off-by: Yinghai Lu <yinghai@kernel.org>
    Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 4e0c56ab133fcb29fa3709c095f9347a033662c1
Author: Mathias Krause <minipli@googlemail.com>
Date:   Mon Sep 30 22:04:24 2013 +0200

    audit: fix info leak in AUDIT_GET requests
    
    commit 64fbff9ae0a0a843365d922e0057fc785f23f0e3 upstream.
    
    We leak 4 bytes of kernel stack in response to an AUDIT_GET request as
    we miss to initialize the mask member of status_set. Fix that.
    
    Cc: Al Viro <viro@zeniv.linux.org.uk>
    Cc: Eric Paris <eparis@redhat.com>
    Signed-off-by: Mathias Krause <minipli@googlemail.com>
    Signed-off-by: Richard Guy Briggs <rgb@redhat.com>
    Signed-off-by: Eric Paris <eparis@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 42979968049cc6a8ed569ae8ceb486e0637c7ce7
Author: Mathias Krause <minipli@googlemail.com>
Date:   Mon Sep 30 22:04:25 2013 +0200

    audit: use nlmsg_len() to get message payload length
    
    commit 4d8fe7376a12bf4524783dd95cbc00f1fece6232 upstream.
    
    Using the nlmsg_len member of the netlink header to test if the message
    is valid is wrong as it includes the size of the netlink header itself.
    Thereby allowing to send short netlink messages that pass those checks.
    
    Use nlmsg_len() instead to test for the right message length. The result
    of nlmsg_len() is guaranteed to be non-negative as the netlink message
    already passed the checks of nlmsg_ok().
    
    Also switch to min_t() to please checkpatch.pl.
    
    Cc: Al Viro <viro@zeniv.linux.org.uk>
    Cc: Eric Paris <eparis@redhat.com>
    Signed-off-by: Mathias Krause <minipli@googlemail.com>
    Signed-off-by: Richard Guy Briggs <rgb@redhat.com>
    Signed-off-by: Eric Paris <eparis@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit e49ee6c66ebfdf4a4fb0cecad2523c7b61fc0282
Author: Tyler Hicks <tyhicks@canonical.com>
Date:   Thu Jul 25 18:02:55 2013 -0700

    audit: printk USER_AVC messages when audit isn't enabled
    
    commit 0868a5e150bc4c47e7a003367cd755811eb41e0b upstream.
    
    When the audit=1 kernel parameter is absent and auditd is not running,
    AUDIT_USER_AVC messages are being silently discarded.
    
    AUDIT_USER_AVC messages should be sent to userspace using printk(), as
    mentioned in the commit message of 4a4cd633 ("AUDIT: Optimise the
    audit-disabled case for discarding user messages").
    
    When audit_enabled is 0, audit_receive_msg() discards all user messages
    except for AUDIT_USER_AVC messages. However, audit_log_common_recv_msg()
    refuses to allocate an audit_buffer if audit_enabled is 0. The fix is to
    special case AUDIT_USER_AVC messages in both functions.
    
    It looks like commit 50397bd1 ("[AUDIT] clean up audit_receive_msg()")
    introduced this bug.
    
    Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
    Cc: Al Viro <viro@zeniv.linux.org.uk>
    Cc: Eric Paris <eparis@redhat.com>
    Cc: linux-audit@redhat.com
    Acked-by: Kees Cook <keescook@chromium.org>
    Signed-off-by: Richard Guy Briggs <rgb@redhat.com>
    Signed-off-by: Eric Paris <eparis@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit d4bb402d7bda612a91235444dd4cf29b464f8eec
Author: Avinash Patil <patila@marvell.com>
Date:   Tue Nov 5 15:01:44 2013 -0800

    mwifiex: correct packet length for packets from SDIO interface
    
    commit d03b4aa77e1187b77dfe37d14a923547f00baa66 upstream.
    
    While receiving a packet on SDIO interface, we allocate skb with
    size multiple of SDIO block size. We need to resize this skb
    after RX using packet length from RX header.
    
    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 7094547c201149598a2bd90ef7f04d477dffae1b
Author: Aaron Lu <aaron.lu@intel.com>
Date:   Wed Nov 6 08:41:31 2013 +0800

    PM / hibernate: Avoid overflow in hibernate_preallocate_memory()
    
    commit fd432b9f8c7c88428a4635b9f5a9c6e174df6e36 upstream.
    
    When system has a lot of highmem (e.g. 16GiB using a 32 bits kernel),
    the code to calculate how much memory we need to preallocate in
    normal zone may cause overflow. As Leon has analysed:
    
     It looks that during computing 'alloc' variable there is overflow:
     alloc = (3943404 - 1970542) - 1978280 = -5418 (signed)
     And this function goes to err_out.
    
    Fix this by avoiding that overflow.
    
    References: https://bugzilla.kernel.org/show_bug.cgi?id=60817
    Reported-and-tested-by: Leon Drugi <eyak@wp.pl>
    Signed-off-by: Aaron Lu <aaron.lu@intel.com>
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 3ccb527f871a225b8eada036d24d41c59e40a2e4
Author: Mikulas Patocka <mpatocka@redhat.com>
Date:   Thu Oct 31 13:55:45 2013 -0400

    dm: allocate buffer for messages with small number of arguments using GFP_NOIO
    
    commit f36afb3957353d2529cb2b00f78fdccd14fc5e9c upstream.
    
    dm-mpath and dm-thin must process messages even if some device is
    suspended, so we allocate argv buffer with GFP_NOIO. These messages have
    a small fixed number of arguments.
    
    On the other hand, dm-switch needs to process bulk data using messages
    so excessive use of GFP_NOIO could cause trouble.
    
    The patch also lowers the default number of arguments from 64 to 8, so
    that there is smaller load on GFP_NOIO allocations.
    
    Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
    Acked-by: Alasdair G Kergon <agk@redhat.com>
    Signed-off-by: Mike Snitzer <snitzer@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit b725146ee9fed4d4c19ae5a6b028d5e856730454
Author: Stanislaw Gruszka <stf_xl@wp.pl>
Date:   Tue Oct 15 14:28:48 2013 +0200

    rt2400pci: fix RSSI read
    
    commit 2bf127a5cc372b9319afcbae10b090663b621c8b upstream.
    
    RSSI value is provided on word3 not on word2.
    
    Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
    Signed-off-by: John W. Linville <linville@tuxdriver.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 401a0f388620de353625f3bc4c06916fd94122f0
Author: Ursula Braun <ursula.braun@de.ibm.com>
Date:   Wed Nov 6 09:04:52 2013 +0100

    qeth: avoid buffer overflow in snmp ioctl
    
    commit 6fb392b1a63ae36c31f62bc3fc8630b49d602b62 upstream.
    
    Check user-defined length in snmp ioctl request and allow request
    only if it fits into a qeth command buffer.
    
    Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
    Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
    Reviewed-by: Heiko Carstens <heicars2@linux.vnet.ibm.com>
    Reported-by: Nico Golde <nico@ngolde.de>
    Reported-by: Fabian Yamaguchi <fabs@goesec.de>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit dca32a77c5eb1d824e36e459c52a4a4b1901d39a
Author: Larry Finger <Larry.Finger@lwfinger.net>
Date:   Tue Nov 5 15:15:29 2013 -0600

    rtlwifi: rtl8192cu: Fix incorrect signal strength for unassociated AP
    
    commit 78dbfecb95be4635b995af3bd29fa10013409fcd upstream.
    
    The routine that processes received frames was returning the RSSI value for the
    signal strength; however, that value is available only for associated APs. As
    a result, the strength was the absurd value of 10 dBm. As a result, scans
    return incorrect values for the strength, which causes unwanted attempts to roam.
    
    Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
    Signed-off-by: John W. Linville <linville@tuxdriver.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit f59cbdcad5f381475da99c2fbc719d5839dd2fcc
Author: Larry Finger <Larry.Finger@lwfinger.net>
Date:   Tue Nov 5 15:15:28 2013 -0600

    rtlwifi: rtl8192se: Fix incorrect signal strength for unassociated AP
    
    commit b4ade797668e33b4e8353c2701ce01d7084dfafa upstream.
    
    The routine that processes received frames was returning the RSSI value for the
    signal strength; however, that value is available only for associated APs. As
    a result, the strength was the absurd value of 10 dBm. As a result, scans
    return incorrect values for the strength, which causes unwanted attempts to roam.
    
    This patch fixes https://bugzilla.kernel.org/show_bug.cgi?id=63881.
    
    Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
    Reported-by: Matthieu Baerts <matttbe@gmail.com>
    Signed-off-by: John W. Linville <linville@tuxdriver.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 80c82f6f9ed328afd7cb183e51626afc348af4b7
Author: Larry Finger <Larry.Finger@lwfinger.net>
Date:   Tue Nov 5 15:15:30 2013 -0600

    rtlwifi: rtl8192de: Fix incorrect signal strength for unassociated AP
    
    commit 3545f3d5f4af715c914394123ce7725a9cf0a1c4 upstream.
    
    The routine that processes received frames was returning the RSSI value for the
    signal strength; however, that value is available only for associated APs. As
    a result, the strength was the absurd value of 10 dBm. As a result, scans
    return incorrect values for the strength, which causes unwanted attempts to roam.
    
    Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
    Signed-off-by: John W. Linville <linville@tuxdriver.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 6aefef7eea073c9b0de5c6e69d50cffd5381b969
Author: Malcolm Priestley <tvboxspy@gmail.com>
Date:   Thu Nov 7 21:49:04 2013 +0000

    staging: vt6656: [BUG] Fix for TX USB resets from vendors driver.
    
    commit 9df682927c2e3a92f43803d6b52095992e3b2ab8 upstream.
    
    This fixes resets on heavy TX data traffic.
    
    Vendor driver
    VT6656_Linux_src_v1.21.03_x86_11.04.zip
    http://www.viaembedded.com/servlet/downloadSvl?id=1890&download_file_id=14704
    This is GPL-licensed code.
    
    original code
    BBbVT3184Init
    ...
    //2007-0725, RobertChang add, Enable Squelch detect reset option(SQ_RST_Opt), USB (register4, bit1)
    CONTROLnsRequestIn(pDevice,
                                     MESSAGE_TYPE_READ,
                                     (WORD)0x600+4,     // USB's Reg4's bit1
                                     MESSAGE_REQUEST_MEM,
                                     1,
                                     (PBYTE) &byData);
    byData = byData|2 ;
    CONTROLnsRequestOut(pDevice,
                                  MESSAGE_TYPE_WRITE,
                                  (WORD)0x600+4,     // USB's Reg4's bit1
                                  MESSAGE_REQUEST_MEM,
                                  1,
                                  (PBYTE) &byData);
    
    return TRUE;//ntStatus;
    ....
    
    A back port patch is needed for kernels less than 3.10.
    
    Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit fbd604987d9c53f79abd385fc8d510d7e71dac9e
Author: Vegard Nossum <vegard.nossum@oracle.com>
Date:   Thu Sep 5 13:00:14 2013 +0200

    xen/blkback: fix reference counting
    
    commit ea5ec76d76da9279d12027c1828544c5ccbe7932 upstream.
    
    If the permission check fails, we drop a reference to the blkif without
    having taken it in the first place. The bug was introduced in commit
    604c499cbbcc3d5fe5fb8d53306aa0fae1990109 (xen/blkback: Check device
    permissions before allowing OP_DISCARD).
    
    Cc: Jan Beulich <JBeulich@suse.com>
    Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
    Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
    Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
    Signed-off-by: Jens Axboe <axboe@kernel.dk>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit dc51161bf8064f63470ee718843a1b4fd75d0bb5
Author: Theodore Ts'o <tytso@mit.edu>
Date:   Thu Oct 31 23:00:24 2013 -0400

    ext4: avoid bh leak in retry path of ext4_expand_extra_isize_ea()
    
    commit dcb9917ba041866686fe152850364826c4622a36 upstream.
    
    Reported-by: Dave Jones <davej@redhat.com>
    Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 1eb9c3425abb5a187ef7b52206eb395aa896151e
Author: Huang Shijie <b32955@freescale.com>
Date:   Mon Nov 11 12:13:45 2013 +0800

    mtd: gpmi: fix kernel BUG due to racing DMA operations
    
    commit 7b3d2fb92067bcb29f0f085a9fa9fa64920a6646 upstream.
    
    [1] The gpmi uses the nand_command_lp to issue the commands to NAND chips.
        The gpmi issues a DMA operation with gpmi_cmd_ctrl when it handles
        a NAND_CMD_NONE control command. So when we read a page(NAND_CMD_READ0)
        from the NAND, we may send two DMA operations back-to-back.
    
        If we do not serialize the two DMA operations, we will meet a bug when
    
        1.1) we enable CONFIG_DMA_API_DEBUG, CONFIG_DMADEVICES_DEBUG,
             and CONFIG_DEBUG_SG.
    
        1.2) Use the following commands in an UART console and a SSH console:
             cmd 1: while true;do dd if=/dev/mtd0 of=/dev/null;done
             cmd 1: while true;do dd if=/dev/mmcblk0 of=/dev/null;done
    
        The kernel log shows below:
        -----------------------------------------------------------------
        kernel BUG at lib/scatterlist.c:28!
        Unable to handle kernel NULL pointer dereference at virtual address 00000000
          .........................
        [<80044a0c>] (__bug+0x18/0x24) from [<80249b74>] (sg_next+0x48/0x4c)
        [<80249b74>] (sg_next+0x48/0x4c) from [<80255398>] (debug_dma_unmap_sg+0x170/0x1a4)
        [<80255398>] (debug_dma_unmap_sg+0x170/0x1a4) from [<8004af58>] (dma_unmap_sg+0x14/0x6c)
        [<8004af58>] (dma_unmap_sg+0x14/0x6c) from [<8027e594>] (mxs_dma_tasklet+0x18/0x1c)
        [<8027e594>] (mxs_dma_tasklet+0x18/0x1c) from [<8007d444>] (tasklet_action+0x114/0x164)
        -----------------------------------------------------------------
    
        1.3) Assume the two DMA operations is X (first) and Y (second).
    
             The root cause of the bug:
    	   Assume process P issues DMA X, and sleep on the completion
    	 @this->dma_done. X's tasklet callback is dma_irq_callback. It firstly
    	 wake up the process sleeping on the completion @this->dma_done,
    	 and then trid to unmap the scatterlist S. The waked process P will
    	 issue Y in another ARM core. Y initializes S->sg_magic to zero
    	 with sg_init_one(), while dma_irq_callback is unmapping S at the same
    	 time.
    
    	 See the diagram:
    
                       ARM core 0              |         ARM core 1
    	 -------------------------------------------------------------
             (P issues DMA X, then sleep)  --> |
                                               |
             (X's tasklet wakes P)         --> |
                                               |
                                               | <-- (P begin to issue DMA Y)
                                               |
             (X's tasklet unmap the            |
          scatterlist S with dma_unmap_sg) --> | <-- (Y calls sg_init_one() to init
                                               |      scatterlist S)
                                               |
    
    [2] This patch serialize both the X and Y in the following way:
         Unmap the DMA scatterlist S firstly, and wake up the process at the end
         of the DMA callback, in such a way, Y will be executed after X.
    
         After this patch:
    
                       ARM core 0              |         ARM core 1
    	 -------------------------------------------------------------
             (P issues DMA X, then sleep)  --> |
                                               |
             (X's tasklet unmap the            |
          scatterlist S with dma_unmap_sg) --> |
                                               |
             (X's tasklet wakes P)         --> |
                                               |
                                               | <-- (P begin to issue DMA Y)
                                               |
                                               | <-- (Y calls sg_init_one() to init
                                               |     scatterlist S)
                                               |
    
    Signed-off-by: Huang Shijie <b32955@freescale.com>
    Signed-off-by: Brian Norris <computersforpeace@gmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 09f665049d7ecde55c5fbe4bb419b992288c4608
Author: Wang Haitao <wang.haitao1@zte.com.cn>
Date:   Thu Aug 22 19:32:38 2013 +0800

    mtd: map: fixed bug in 64-bit systems
    
    commit a4d62babf988fe5dfde24437fa135ef147bc7aa0 upstream.
    
    Hardware:
    	CPU: XLP832,the 64-bit OS
    	NOR Flash:S29GL128S 128M
    Software:
    	Kernel:2.6.32.41
    	Filesystem:JFFS2
    When writing files, errors appear:
    	Write len 182  but return retlen 180
    	Write of 182 bytes at 0x072c815c failed. returned -5, retlen 180
    	Write len 186  but return retlen 184
    	Write of 186 bytes at 0x072caff4 failed. returned -5, retlen 184
    These errors exist only in 64-bit systems,not in 32-bit systems. After analysis, we
    found that the left shift operation is wrong in map_word_load_partial. For instance:
    	unsigned char buf[3] ={0x9e,0x3a,0xea};
    	map_bankwidth(map) is 4;
    	for (i=0; i < 3; i++) {
    		int bitpos;
    		bitpos = (map_bankwidth(map)-1-i)*8;
    		orig.x[0] &= ~(0xff << bitpos);
    		orig.x[0] |= buf[i] << bitpos;
    	}
    
    The value of orig.x[0] is expected to be 0x9e3aeaff, but in this situation(64-bit
    System) we'll get the wrong value of 0xffffffff9e3aeaff due to the 64-bit sign
    extension:
    buf[i] is defined as "unsigned char" and the left-shift operation will convert it
    to the type of "signed int", so when left-shift buf[i] by 24 bits, the final result
    will get the wrong value: 0xffffffff9e3aeaff.
    
    If the left-shift bits are less than 24, then sign extension will not occur. Whereas
    the bankwidth of the nor flash we used is 4, therefore this BUG emerges.
    
    Signed-off-by: Pang Xunlei <pang.xunlei@zte.com.cn>
    Signed-off-by: Zhang Yi <zhang.yi20@zte.com.cn>
    Signed-off-by: Lu Zhongjun <lu.zhongjun@zte.com.cn>
    Signed-off-by: Brian Norris <computersforpeace@gmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit b22831e6611bec1fdf84e71d80f7917199212ee8
Author: Brian Norris <computersforpeace@gmail.com>
Date:   Tue Aug 27 18:45:10 2013 -0700

    mtd: nand: hack ONFI for non-power-of-2 dimensions
    
    commit 4355b70cf48363c50a9de450b01178c83aba8f6a upstream.
    
    Some bright specification writers decided to write this in the ONFI spec
    (from ONFI 3.0, Section 3.1):
    
      "The number of blocks and number of pages per block is not required to
      be a power of two. In the case where one of these values is not a
      power of two, the corresponding address shall be rounded to an
      integral number of bits such that it addresses a range up to the
      subsequent power of two value. The host shall not access upper
      addresses in a range that is shown as not supported."
    
    This breaks every assumption MTD makes about NAND block/chip-size
    dimensions -- they *must* be a power of two!
    
    And of course, an enterprising manufacturer has made use of this lovely
    freedom. Exhibit A: Micron MT29F32G08CBADAWP
    
      "- Plane size: 2 planes x 1064 blocks per plane
       - Device size: 32Gb: 2128 blockss [sic]"
    
    This quickly hits a BUG() in nand_base.c, since the extra dimensions
    overflow so we think it's a second chip (on my single-chip setup):
    
        ONFI param page 0 valid
        ONFI flash detected
        NAND device: Manufacturer ID: 0x2c, Chip ID: 0x44 (Micron MT29F32G08CBADAWP), 4256MiB, page size: 8192, OOB size: 744
        ------------[ cut here ]------------
        kernel BUG at drivers/mtd/nand/nand_base.c:203!
        Internal error: Oops - BUG: 0 [#1] SMP ARM
        [... trim ...]
        [<c02cf3e4>] (nand_select_chip+0x18/0x2c) from [<c02d25c0>] (nand_do_read_ops+0x90/0x424)
        [<c02d25c0>] (nand_do_read_ops+0x90/0x424) from [<c02d2dd8>] (nand_read+0x54/0x78)
        [<c02d2dd8>] (nand_read+0x54/0x78) from [<c02ad2c8>] (mtd_read+0x84/0xbc)
        [<c02ad2c8>] (mtd_read+0x84/0xbc) from [<c02d4b28>] (scan_read.clone.4+0x4c/0x64)
        [<c02d4b28>] (scan_read.clone.4+0x4c/0x64) from [<c02d4c88>] (search_bbt+0x148/0x290)
        [<c02d4c88>] (search_bbt+0x148/0x290) from [<c02d4ea4>] (nand_scan_bbt+0xd4/0x5c0)
        [... trim ...]
        ---[ end trace 0c9363860d865ff2 ]---
    
    So to fix this, just truncate these dimensions down to the greatest
    power-of-2 dimension that is less than or equal to the specified
    dimension.
    
    Signed-off-by: Brian Norris <computersforpeace@gmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 0aa9fced961d071a0e19c384b2f2c2e50a676602
Author: Mikulas Patocka <mpatocka@redhat.com>
Date:   Mon Oct 14 12:12:24 2013 -0400

    loop: fix crash if blk_alloc_queue fails
    
    commit 3ec981e30fae1f3c8728a05c730acaa1f627bcfb upstream.
    
    loop: fix crash if blk_alloc_queue fails
    
    If blk_alloc_queue fails, loop_add cleans up, but it doesn't clean up the
    identifier allocated with idr_alloc. That causes crash on module unload in
    idr_for_each(&loop_index_idr, &loop_exit_cb, NULL); where we attempt to
    remove non-existed device with that id.
    
    BUG: unable to handle kernel NULL pointer dereference at 0000000000000380
    IP: [<ffffffff812057c9>] del_gendisk+0x19/0x2d0
    PGD 43d399067 PUD 43d0ad067 PMD 0
    Oops: 0000 [#1] PREEMPT SMP
    Modules linked in: loop(-) dm_snapshot dm_zero dm_mirror dm_region_hash dm_log dm_loop dm_mod ip6table_filter ip6_tables uvesafb cfbcopyarea cfbimgblt cfbfillrect fbcon font bitblit fbcon_rotate fbcon_cw fbcon_ud fbcon_ccw softcursor fb fbdev msr ipt_MASQUERADE iptable_nat nf_nat_ipv4 nf_conntrack_ipv4 nf_defrag_ipv4 xt_state ipt_REJECT xt_tcpudp iptable_filter ip_tables x_tables bridge stp llc tun ipv6 cpufreq_userspace cpufreq_stats cpufreq_ondemand cpufreq_conservative cpufreq_powersave spadfs fuse hid_generic usbhid hid raid0 md_mod dmi_sysfs nf_nat_ftp nf_nat nf_conntrack_ftp nf_conntrack snd_usb_audio snd_pcm_oss snd_mixer_oss snd_pcm snd_timer snd_page_alloc lm85 hwmon_vid snd_hwdep snd_usbmidi_lib snd_rawmidi snd soundcore acpi_cpufreq ohci_hcd freq_table tg3 ehci_pci mperf ehci_hcd kvm_amd kvm sata_svw serverworks libphy libata ide_core k10temp usbcore hwmon microcode ptp pcspkr pps_core e100 skge mii usb_common i2c_piix4 floppy evdev rtc_cmos i2c_core processor but!
     ton unix
    CPU: 7 PID: 2735 Comm: rmmod Tainted: G        W    3.10.15-devel #15
    Hardware name: empty empty/S3992-E, BIOS 'V1.06   ' 06/09/2009
    task: ffff88043d38e780 ti: ffff88043d21e000 task.ti: ffff88043d21e000
    RIP: 0010:[<ffffffff812057c9>]  [<ffffffff812057c9>] del_gendisk+0x19/0x2d0
    RSP: 0018:ffff88043d21fe10  EFLAGS: 00010282
    RAX: ffffffffa05102e0 RBX: 0000000000000000 RCX: 0000000000000000
    RDX: 0000000000000000 RSI: ffff88043ea82800 RDI: 0000000000000000
    RBP: ffff88043d21fe48 R08: 0000000000000000 R09: 0000000000000001
    R10: 0000000000000001 R11: 0000000000000000 R12: 00000000000000ff
    R13: 0000000000000080 R14: 0000000000000000 R15: ffff88043ea82800
    FS:  00007ff646534700(0000) GS:ffff880447000000(0000) knlGS:0000000000000000
    CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
    CR2: 0000000000000380 CR3: 000000043e9bf000 CR4: 00000000000007e0
    DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
    Stack:
     ffffffff8100aba4 0000000000000092 ffff88043d21fe48 ffff88043ea82800
     00000000000000ff ffff88043d21fe98 0000000000000000 ffff88043d21fe60
     ffffffffa05102b4 0000000000000000 ffff88043d21fe70 ffffffffa05102ec
    Call Trace:
     [<ffffffff8100aba4>] ? native_sched_clock+0x24/0x80
     [<ffffffffa05102b4>] loop_remove+0x14/0x40 [loop]
     [<ffffffffa05102ec>] loop_exit_cb+0xc/0x10 [loop]
     [<ffffffff81217b74>] idr_for_each+0x104/0x190
     [<ffffffffa05102e0>] ? loop_remove+0x40/0x40 [loop]
     [<ffffffff8109adc5>] ? trace_hardirqs_on_caller+0x105/0x1d0
     [<ffffffffa05135dc>] loop_exit+0x34/0xa58 [loop]
     [<ffffffff810a98ea>] SyS_delete_module+0x13a/0x260
     [<ffffffff81221d5e>] ? trace_hardirqs_on_thunk+0x3a/0x3f
     [<ffffffff813cff16>] system_call_fastpath+0x1a/0x1f
    Code: f0 4c 8b 6d f8 c9 c3 66 66 2e 0f 1f 84 00 00 00 00 00 55 48 89 e5 41 56 41 55 4c 8d af 80 00 00 00 41 54 53 48 89 fb 48 83 ec 18 <48> 83 bf 80 03 00
    00 00 74 4d e8 98 fe ff ff 31 f6 48 c7 c7 20
    RIP  [<ffffffff812057c9>] del_gendisk+0x19/0x2d0
     RSP <ffff88043d21fe10>
    CR2: 0000000000000380
    ---[ end trace 64ec069ec70f1309 ]---
    
    Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
    Acked-by: Tejun Heo <tj@kernel.org>
    Signed-off-by: Jens Axboe <axboe@kernel.dk>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit ac6638ed78e168e6c6c77e5ac6d9a6c4f49d0040
Author: Jan Kara <jack@suse.cz>
Date:   Fri Oct 4 09:29:06 2013 -0400

    IB/ipath: Convert ipath_user_sdma_pin_pages() to use get_user_pages_fast()
    
    commit 4adcf7fb6783e354aab38824d803fa8c4f8e8a27 upstream.
    
    ipath_user_sdma_queue_pkts() gets called with mmap_sem held for
    writing.  Except for get_user_pages() deep down in
    ipath_user_sdma_pin_pages() we don't seem to need mmap_sem at all.
    
    Even more interestingly the function ipath_user_sdma_queue_pkts() (and
    also ipath_user_sdma_coalesce() called somewhat later) call
    copy_from_user() which can hit a page fault and we deadlock on trying
    to get mmap_sem when handling that fault.  So just make
    ipath_user_sdma_pin_pages() use get_user_pages_fast() and leave
    mmap_sem locking for mm.
    
    This deadlock has actually been observed in the wild when the node
    is under memory pressure.
    
    Signed-off-by: Jan Kara <jack@suse.cz>
    Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
    [ Merged in fix for call to get_user_pages_fast from Tetsuo Handa
      <penguin-kernel@I-love.SAKURA.ne.jp>.  - Roland ]
    Signed-off-by: Roland Dreier <roland@purestorage.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 27c0008c75ddfa759d5645ecbc3f86e0de37472a
Author: Eric Seppanen <eric@purestorage.com>
Date:   Wed Nov 20 14:19:52 2013 -0800

    iscsi-target: chap auth shouldn't match username with trailing garbage
    
    commit 86784c6bdeeef78eed94d298be7a8879f6a97ee2 upstream.
    
    In iSCSI negotiations with initiator CHAP enabled, usernames with
    trailing garbage are permitted, because the string comparison only
    checks the strlen of the configured username.
    
    e.g. "usernameXXXXX" will be permitted to match "username".
    
    Just check one more byte so the trailing null char is also matched.
    
    Signed-off-by: Eric Seppanen <eric@purestorage.com>
    Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 7dac7f101e7b6e5b1dd5164cba7cf7268311e13e
Author: Eric Seppanen <eric@purestorage.com>
Date:   Wed Nov 20 14:19:51 2013 -0800

    iscsi-target: fix extract_param to handle buffer length corner case
    
    commit 369653e4fb511928511b0ce81f41c812ff1f28b6 upstream.
    
    extract_param() is called with max_length set to the total size of the
    output buffer.  It's not safe to allow a parameter length equal to the
    buffer size as the terminating null would be written one byte past the
    end of the output buffer.
    
    Signed-off-by: Eric Seppanen <eric@purestorage.com>
    Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 34bf7634b6d5dd7ce87588b51420cc0a23f3d9d6
Author: Samir Benmendil <samir.benmendil@gmail.com>
Date:   Sun Nov 17 23:56:17 2013 +0100

    ahci: add Marvell 9230 to the AHCI PCI device list
    
    commit 6d5278a68a75891db1df5ae1ecf83d288fc58c65 upstream.
    
    Tested with a DAWICONTROL DC-624e on 3.10.10
    
    Signed-off-by: Samir Benmendil <samir.benmendil@gmail.com>
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Reviewed-by: Levente Kurusa <levex@linux.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 6ca439d8f323780eec60f52c90a6cc61a39347ac
Author: xiangliang yu <yxlraid@gmail.com>
Date:   Sun Oct 27 08:03:04 2013 -0400

    ahci: disabled FBS prior to issuing software reset
    
    commit 89dafa20f3daab5b3e0c13d0068a28e8e64e2102 upstream.
    
    Tested with Marvell 88se9125, attached with one port mulitplier(5 ports)
    and one disk, we will get following boot log messages if using current
    code:
    
      ata8: SATA link up 6.0 Gbps (SStatus 133 SControl 330)
      ata8.15: Port Multiplier 1.2, 0x1b4b:0x9715 r160, 5 ports, feat 0x1/0x1f
      ahci 0000:03:00.0: FBS is enabled
      ata8.00: hard resetting link
      ata8.00: SATA link down (SStatus 0 SControl 330)
      ata8.01: hard resetting link
      ata8.01: SATA link down (SStatus 0 SControl 330)
      ata8.02: hard resetting link
      ata8.02: SATA link down (SStatus 0 SControl 330)
      ata8.03: hard resetting link
      ata8.03: SATA link up 6.0 Gbps (SStatus 133 SControl 133)
      ata8.04: hard resetting link
      ata8.04: failed to resume link (SControl 133)
      ata8.04: failed to read SCR 0 (Emask=0x40)
      ata8.04: failed to read SCR 0 (Emask=0x40)
      ata8.04: failed to read SCR 1 (Emask=0x40)
      ata8.04: failed to read SCR 0 (Emask=0x40)
      ata8.03: native sectors (2) is smaller than sectors (976773168)
      ata8.03: ATA-8: ST3500413AS, JC4B, max UDMA/133
      ata8.03: 976773168 sectors, multi 0: LBA48 NCQ (depth 31/32)
      ata8.03: configured for UDMA/133
      ata8.04: failed to IDENTIFY (I/O error, err_mask=0x100)
      ata8.15: hard resetting link
      ata8.15: SATA link up 6.0 Gbps (SStatus 133 SControl 330)
      ata8.15: Port Multiplier vendor mismatch '0x1b4b' != '0x133'
      ata8.15: PMP revalidation failed (errno=-19)
      ata8.15: hard resetting link
      ata8.15: SATA link up 6.0 Gbps (SStatus 133 SControl 330)
      ata8.15: Port Multiplier vendor mismatch '0x1b4b' != '0x133'
      ata8.15: PMP revalidation failed (errno=-19)
      ata8.15: limiting SATA link speed to 3.0 Gbps
      ata8.15: hard resetting link
      ata8.15: SATA link up 3.0 Gbps (SStatus 123 SControl 320)
      ata8.15: Port Multiplier vendor mismatch '0x1b4b' != '0x133'
      ata8.15: PMP revalidation failed (errno=-19)
      ata8.15: failed to recover PMP after 5 tries, giving up
      ata8.15: Port Multiplier detaching
      ata8.03: disabled
      ata8.00: disabled
      ata8: EH complete
    
    The reason is that current detection code doesn't follow AHCI spec:
    
    First,the port multiplier detection process look like this:
    
    	ahci_hardreset(link, class, deadline)
    	if (class == ATA_DEV_PMP) {
    		sata_pmp_attach(dev)	/* will enable FBS */
    		sata_pmp_init_links(ap, nr_ports);
    		ata_for_each_link(link, ap, EDGE) {
    			sata_std_hardreset(link, class, deadline);
    			if (link_is_online)	/* do soft reset */
    				ahci_softreset(link, class, deadline);
    		}
    	}
    But, according to chapter 9.3.9 in AHCI spec: Prior to issuing software
    reset, software shall clear PxCMD.ST to '0' and then clear PxFBS.EN to
    '0'.
    
    The patch test ok with kernel 3.11.1.
    
    tj: Patch white space contaminated, applied manually with trivial
        updates.
    
    Signed-off-by: Xiangliang Yu <yuxiangl@marvell.com>
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 4b2162b7f846b9b4326734e305138137ae3491d3
Author: Larry Finger <Larry.Finger@lwfinger.net>
Date:   Sun Nov 10 22:11:16 2013 -0600

    rtlwifi: rtl8192cu: Fix more pointer arithmetic errors
    
    commit eafbdde9c5629bea58df07275c5917eb42afbbe7 upstream.
    
    This driver uses a number of macros to get and set various fields in the
    RX and TX descriptors. To work correctly, a u8 pointer to the descriptor
    must be used; however, in some cases a descriptor structure pointer is used
    instead. In addition, a duplicated statement is removed.
    
    Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
    Reported-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
    Signed-off-by: John W. Linville <linville@tuxdriver.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit bb513cf8a564f6b05836354591435362334e3c66
Author: Felipe Pena <felipensp@gmail.com>
Date:   Fri Oct 18 21:52:40 2013 -0300

    rtlwifi: rtl8192se: Fix wrong assignment
    
    commit 3aef7dde8dcf09e0124f0a2665845a507331972b upstream.
    
    There is a typo in the struct member name on assignment when checking
    rtlphy->current_chan_bw == HT_CHANNEL_WIDTH_20_40, the check uses pwrgroup_ht40
    for bound limit and uses pwrgroup_ht20 when assigning instead.
    
    Signed-off-by: Felipe Pena <felipensp@gmail.com>
    Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
    Signed-off-by: John W. Linville <linville@tuxdriver.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 22363fb4b996766c83d25f47f2de605a6720ccf0
Author: Ryan Mallon <rmallon@gmail.com>
Date:   Tue Nov 12 15:08:51 2013 -0800

    vsprintf: check real user/group id for %pK
    
    commit 312b4e226951f707e120b95b118cbc14f3d162b2 upstream.
    
    Some setuid binaries will allow reading of files which have read
    permission by the real user id.  This is problematic with files which
    use %pK because the file access permission is checked at open() time,
    but the kptr_restrict setting is checked at read() time.  If a setuid
    binary opens a %pK file as an unprivileged user, and then elevates
    permissions before reading the file, then kernel pointer values may be
    leaked.
    
    This happens for example with the setuid pppd application on Ubuntu 12.04:
    
      $ head -1 /proc/kallsyms
      00000000 T startup_32
    
      $ pppd file /proc/kallsyms
      pppd: In file /proc/kallsyms: unrecognized option 'c1000000'
    
    This will only leak the pointer value from the first line, but other
    setuid binaries may leak more information.
    
    Fix this by adding a check that in addition to the current process having
    CAP_SYSLOG, that effective user and group ids are equal to the real ids.
    If a setuid binary reads the contents of a file which uses %pK then the
    pointer values will be printed as NULL if the real user is unprivileged.
    
    Update the sysctl documentation to reflect the changes, and also correct
    the documentation to state the kptr_restrict=0 is the default.
    
    This is a only temporary solution to the issue.  The correct solution is
    to do the permission check at open() time on files, and to replace %pK
    with a function which checks the open() time permission.  %pK uses in
    printk should be removed since no sane permission check can be done, and
    instead protected by using dmesg_restrict.
    
    Signed-off-by: Ryan Mallon <rmallon@gmail.com>
    Cc: Kees Cook <keescook@chromium.org>
    Cc: Alexander Viro <viro@zeniv.linux.org.uk>
    Cc: Joe Perches <joe@perches.com>
    Cc: "Eric W. Biederman" <ebiederm@xmission.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 80b41caaa1455afd259de89e3d430334f8b57156
Author: Shan Hai <shan.hai@windriver.com>
Date:   Mon Oct 28 16:08:01 2013 +0800

    drivers/libata: Set max sector to 65535 for Slimtype DVD A DS8A9SH drive
    
    commit 0523f037f65dba10191b0fa9c51266f90ba64630 upstream.
    
    The "Slimtype DVD A  DS8A9SH" drive locks up with following backtrace when
    the max sector is smaller than 65535 bytes, fix it by adding a quirk to set
    the max sector to 65535 bytes.
    
    INFO: task flush-11:0:663 blocked for more than 120 seconds.
    "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
    flush-11:0    D 00000000ffff5ceb     0   663      2 0x00000000
     ffff88026d3b1710 0000000000000046 0000000000000001 0000000000000000
     ffff88026f2530c0 ffff88026d365860 ffff88026d3b16e0 ffffffff812ffd52
     ffff88026d4fd3d0 0000000100000001 ffff88026d3b16f0 ffff88026d3b1fd8
    Call Trace:
     [<ffffffff812ffd52>] ? cfq_may_queue+0x52/0xf0
     [<ffffffff81604338>] schedule+0x18/0x30
     [<ffffffff81604392>] io_schedule+0x42/0x60
     [<ffffffff812f22bb>] get_request_wait+0xeb/0x1f0
     [<ffffffff81065660>] ? autoremove_wake_function+0x0/0x40
     [<ffffffff812eb382>] ? elv_merge+0x42/0x210
     [<ffffffff812f26ae>] __make_request+0x8e/0x4e0
     [<ffffffff812f068e>] generic_make_request+0x21e/0x5e0
     [<ffffffff812f0aad>] submit_bio+0x5d/0xd0
     [<ffffffff81141422>] submit_bh+0xf2/0x130
     [<ffffffff8114474c>] __block_write_full_page+0x1dc/0x3a0
     [<ffffffff81143f60>] ? end_buffer_async_write+0x0/0x120
     [<ffffffff811474e0>] ? blkdev_get_block+0x0/0x70
     [<ffffffff811474e0>] ? blkdev_get_block+0x0/0x70
     [<ffffffff81143f60>] ? end_buffer_async_write+0x0/0x120
     [<ffffffff811449ee>] block_write_full_page_endio+0xde/0x100
     [<ffffffff81144a20>] block_write_full_page+0x10/0x20
     [<ffffffff81148703>] blkdev_writepage+0x13/0x20
     [<ffffffff810d7525>] __writepage+0x15/0x40
     [<ffffffff810d7c0f>] write_cache_pages+0x1cf/0x3e0
     [<ffffffff810d7510>] ? __writepage+0x0/0x40
     [<ffffffff810d7e42>] generic_writepages+0x22/0x30
     [<ffffffff810d7e6f>] do_writepages+0x1f/0x40
     [<ffffffff8113ae67>] writeback_single_inode+0xe7/0x3b0
     [<ffffffff8113b574>] writeback_sb_inodes+0x184/0x280
     [<ffffffff8113bedb>] writeback_inodes_wb+0x6b/0x1a0
     [<ffffffff8113c24b>] wb_writeback+0x23b/0x2a0
     [<ffffffff8113c42d>] wb_do_writeback+0x17d/0x190
     [<ffffffff8113c48b>] bdi_writeback_task+0x4b/0xe0
     [<ffffffff810e82a0>] ? bdi_start_fn+0x0/0x100
     [<ffffffff810e8321>] bdi_start_fn+0x81/0x100
     [<ffffffff810e82a0>] ? bdi_start_fn+0x0/0x100
     [<ffffffff8106522e>] kthread+0x8e/0xa0
     [<ffffffff81039274>] ? finish_task_switch+0x54/0xc0
     [<ffffffff81003334>] kernel_thread_helper+0x4/0x10
     [<ffffffff810651a0>] ? kthread+0x0/0xa0
     [<ffffffff81003330>] ? kernel_thread_helper+0x0/0x10
    
     The above trace was triggered by
       "dd if=/dev/zero of=/dev/sr0 bs=2048 count=32768"
    
    Signed-off-by: Shan Hai <shan.hai@windriver.com>
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit e90d50f73953118725bff5b1449e2cbbb9ee3554
Author: Gwendal Grignou <gwendal@google.com>
Date:   Fri Oct 25 16:28:57 2013 -0700

    libata: Fix display of sata speed
    
    commit 3e85c3ecbc520751324a191d23bb94873ed01b10 upstream.
    
    6.0 Gbps link speed was not decoded properly:
    speed was reported at 3.0 Gbps only.
    
    Tested: On a machine where libata reports 6.0 Gbps in
            /var/log/messages:
        ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
    
        Before:
        	cat /sys/class/ata_link/link1/sata_spd
        	3.0 Gbps
        After:
        	cat /sys/class/ata_link/link1/sata_spd
        	6.0 Gbps
    
    Signed-off-by: Gwendal Grignou <gwendal@google.com>
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 799ed0d9c5ee00600823c5762a9e5b20776a1391
Author: Marc Kleine-Budde <mkl@pengutronix.de>
Date:   Fri Sep 27 12:15:05 2013 +0200

    can: flexcan: fix flexcan_chip_start() on imx6
    
    commit 0d1862ea1a5bb876cf05555a7307080cb75bf379 upstream.
    
    In the flexcan_chip_start() function first the flexcan core is going through
    the soft reset sequence, then the RX FIFO is enabled.
    
    With the hardware is put into FIFO mode, message buffers 1...7 are reserved by
    the FIFO engine. The remaining message buffers are in reset default values.
    This patch removes the bogus initialization of the message buffers, as it
    causes an imprecise external abort on imx6.
    
    Reported-by: Lothar Waßmann <LW@KARO-electronics.de>
    Tested-by: Lothar Waßmann <LW@KARO-electronics.de>
    [mkl: adjusted context for stable]
    Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 510e627f364a15db3b0848de1429d15f1473b95e
Author: Ilija Hadzic <ihadzic@research.bell-labs.com>
Date:   Tue Nov 12 15:11:45 2013 -0800

    devpts: plug the memory leak in kill_sb
    
    commit 66da0e1f9034140ae2f571ef96e254a25083906c upstream.
    
    When devpts is unmounted, there may be a no-longer-used IDR tree hanging
    off the superblock we are about to kill.  This needs to be cleaned up
    before destroying the SB.
    
    The leak is usually not a big deal because unmounting devpts is typically
    done when shutting down the whole machine.  However, shutting down an LXC
    container instead of a physical machine exposes the problem (the garbage
    is detectable with kmemleak).
    
    Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com>
    Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.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 3e05092412210f3a298ef2a4e5f58857513e9954
Author: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Date:   Mon Oct 14 17:33:16 2013 -0400

    alarmtimer: return EINVAL instead of ENOTSUPP if rtcdev doesn't exist
    
    commit 98d6f4dd84a134d942827584a3c5f67ffd8ec35f upstream.
    
    Fedora Ruby maintainer reported latest Ruby doesn't work on Fedora Rawhide
    on ARM. (http://bugs.ruby-lang.org/issues/9008)
    
    Because of, commit 1c6b39ad3f (alarmtimers: Return -ENOTSUPP if no
    RTC device is present) intruduced to return ENOTSUPP when
    clock_get{time,res} can't find a RTC device. However this is incorrect.
    
    First, ENOTSUPP isn't exported to userland (ENOTSUP or EOPNOTSUP are the
    closest userland equivlents).
    
    Second, Posix and Linux man pages agree that clock_gettime and
    clock_getres should return EINVAL if clk_id argument is invalid.
    While the arugment that the clockid is valid, but just not supported
    on this hardware could be made, this is just a technicality that
    doesn't help userspace applicaitons, and only complicates error
    handling.
    
    Thus, this patch changes the code to use EINVAL.
    
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: Frederic Weisbecker <fweisbec@gmail.com>
    Reported-by: Vit Ondruch <v.ondruch@tiscali.cz>
    Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
    [jstultz: Tweaks to commit message to include full rational]
    Signed-off-by: John Stultz <john.stultz@linaro.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 664eaaa26bca6272673eff01ba5468f95905039d
Author: Takashi Iwai <tiwai@suse.de>
Date:   Wed Nov 13 17:15:00 2013 +0100

    ASoC: blackfin: Fix missing break
    
    commit afed4dbe3a043dbd833a53b6b4951e155708afd2 upstream.
    
    Fixes: 4b2ffc205cb9 ('ASoC: Blackfin I2S: add 8-bit sample support')
    Reported-by: David Binderman
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Mark Brown <broonie@linaro.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit f5f4825a345b637c81a017ed19a6ea47783cf811
Author: Nicolin Chen <b42378@freescale.com>
Date:   Thu Nov 14 11:59:21 2013 +0800

    ASoC: wm8962: Turn on regcache_cache_only before disabling regulator
    
    commit 50bfcf2df2fadf77e143d6099150e6fa7ef4d78c upstream.
    
    It's safer to turn on regcache_cache_only before disabling regulator since
    the driver will turn off the regcache_cache_only after enabling regulator.
    
    If we remain cache_only false, some command like 'amixer cset' would get
    failure if being run before wm8962_resume().
    
    Signed-off-by: Nicolin Chen <b42378@freescale.com>
    Signed-off-by: Mark Brown <broonie@linaro.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 6a4e636d9f9bab7410c90ac091154d85a81e21ee
Author: Phil Edworthy <phil.edworthy@renesas.com>
Date:   Thu Oct 31 23:06:17 2013 -0700

    ASoC: ak4642: prevent un-necessary changes to SG_SL1
    
    commit 7b5bfb82882b9b1c8423ce0ed6852ca3762d967a upstream.
    
    If you record the sound during playback,
    the playback sound becomes silent.
    Modify so that the codec driver does not clear
    SG_SL1::DACL bit which is controlled under widget
    
    Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
    Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
    Signed-off-by: Mark Brown <broonie@linaro.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit c504aa16ae29f5c60754eff219a1462aa6548b21
Author: Johan Hovold <jhovold@gmail.com>
Date:   Tue Nov 12 15:09:38 2013 -0800

    backlight: atmel-pwm-bl: fix reported brightness
    
    commit 185d91442550110db67a7dc794a32efcea455a36 upstream.
    
    The driver supports 16-bit brightness values, but the value returned
    from get_brightness was truncated to eight bits.
    
    Signed-off-by: Johan Hovold <jhovold@gmail.com>
    Cc: Jingoo Han <jg1.han@samsung.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 e3f8bcd36db9a86b78738224ff37e875cc793782
Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date:   Wed Nov 27 09:32:49 2013 -0800

    Staging: tidspbridge: disable driver
    
    commit 930ba4a374b96560ef9fde2145cdc454a164ddcc upstream.
    
    There seems to be no active maintainer for the driver, and there is an
    unfixed security bug, so disable the driver for now.
    
    Hopefully someone steps up to be the maintainer, and works to get this
    out of staging, otherwise it will be deleted soon.
    
    Reported-by: Nico Golde <nico@ngolde.de>
    Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
    Cc: Omar Ramirez Luna <omar.ramirez@copitl.com>
    Cc: Omar Ramirez Luna <omar.ramirez@ti.com>
    Cc: Kanigeri, Hari <h-kanigeri2@ti.com>
    Cc: Ameya Palande <ameya.palande@nokia.com>
    Cc: Guzman Lugo, Fernando <fernando.lugo@ti.com>
    Cc: Hebbar, Shivananda <x0hebbar@ti.com>
    Cc: Ramos Falcon, Ernesto <ernesto@ti.com>
    Cc: Felipe Contreras <felipe.contreras@gmail.com>
    Cc: Anna, Suman <s-anna@ti.com>
    Cc: Gupta, Ramesh <grgupta@ti.com>
    Cc: Gomez Castellanos, Ivan <ivan.gomez@ti.com>
    Cc: Andy Shevchenko <ext-andriy.shevchenko@nokia.com>
    Cc: Armando Uribe De Leon <x0095078@ti.com>
    Cc: Deepak Chitriki <deepak.chitriki@ti.com>
    Cc: Menon, Nishanth <nm@ti.com>
    Cc: Phil Carmody <ext-phil.2.carmody@nokia.com>
    Cc: Ohad Ben-Cohen <ohad@wizery.com>
    Cc: stable <stable@vger.kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit b823b82878ad6c8d938bb99fb3ed3f6c75b0f323
Author: Jonathan Austin <jonathan.austin@arm.com>
Date:   Thu Aug 29 18:41:11 2013 +0100

    ARM: integrator_cp: Set LCD{0,1} enable lines when turning on CLCD
    
    commit 30aeadd44deea3f3b0df45b9a70ee0fd5f8d6dc2 upstream.
    
    This turns on the internal integrator LCD display(s). It seems that the code
    to do this got lost in refactoring of the CLCD driver.
    
    Signed-off-by: Jonathan Austin <jonathan.austin@arm.com>
    Acked-by: Linus Walleij <linus.walleij@linaro.org>
    Signed-off-by: Olof Johansson <olof@lixom.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit d88da9d09672eddc30d50dec14cd8ddc3fbc284c
Author: Russell King <rmk+kernel@arm.linux.org.uk>
Date:   Wed Oct 16 00:09:02 2013 +0100

    ARM: sa11x0/assabet: ensure CS2 is configured appropriately
    
    commit f3964fe1c9d9a887d65faf594669852e4dec46e0 upstream.
    
    The CS2 region contains the Assabet board configuration and status
    registers, which are 32-bit.  Unfortunately, some boot loaders do not
    configure this region correctly, leaving it setup as a 16-bit region.
    Fix this.
    
    Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>