From 5a70a7f77ba05e0ae3fad66393a55614f6c56255 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 9 Oct 2009 16:14:36 -0700 Subject: [PATCH] start 2.6.31.4 review cycle --- ...pi-clarify-resource-conflict-message.patch | 0 ...ompaq-evo-n800c-boot-hang-regression.patch | 0 ...irk-to-enable-sound-on-toshiba-nb200.patch | 0 ...m8350-capture-pga-mutes-are-inverted.patch | 0 ...heck-for-failure-for-all-conversions.patch | 0 .../futex-fix-locking-imbalance.patch | 0 .../futex-fix-requeue_pi-key-imbalance.patch | 0 ...ove-exit_pi_state-call-to-release_mm.patch | 0 ...x-nullify-robust-lists-after-cleanup.patch | 0 .../ima-ecryptfs-fix-imbalance-message.patch | 0 .../ima-open-new-file-for-read.patch | 0 .../kvm-fix-lapic-timer-period-overflow.patch | 0 ...-overflow-in-kvm_get_supported_cpuid.patch | 0 ...ffset-adjustment-when-running-nested.patch | 0 ...ush-tlb-with-invept-on-cpu-migration.patch | 0 ...rrect-link-online-check-during-probe.patch | 0 review-2.6.31/mbox | 2117 +++++++++++++++++ .../mm-add_to_swap_cache-must-not-sleep.patch | 0 .../net-fix-wrong-sizeof.patch | 0 ...dle-state-also-when-nohz-is-inactive.patch | 0 .../pit-fixes-to-unbreak-suspend-resume.patch | 0 {queue-2.6.31 => review-2.6.31}/series | 0 ...5513-fix-pio-setup-for-atapi-devices.patch | 0 ...dxs-volume-controls-to-pcm-interface.patch | 0 ...module-boundaries-for-ftrace_release.patch | 0 ...ex-over-hangup-tty-re-initialization.patch | 0 ...-register-values-to-32-bit-processes.patch | 0 ...x-csum_ipv6_magic-asm-memory-clobber.patch | 0 28 files changed, 2117 insertions(+) rename {queue-2.6.31 => review-2.6.31}/acpi-clarify-resource-conflict-message.patch (100%) rename {queue-2.6.31 => review-2.6.31}/acpi-fix-compaq-evo-n800c-boot-hang-regression.patch (100%) rename {queue-2.6.31 => review-2.6.31}/alsa-hda-added-quirk-to-enable-sound-on-toshiba-nb200.patch (100%) rename {queue-2.6.31 => review-2.6.31}/asoc-wm8350-capture-pga-mutes-are-inverted.patch (100%) rename {queue-2.6.31 => review-2.6.31}/ftrace-check-for-failure-for-all-conversions.patch (100%) rename {queue-2.6.31 => review-2.6.31}/futex-fix-locking-imbalance.patch (100%) rename {queue-2.6.31 => review-2.6.31}/futex-fix-requeue_pi-key-imbalance.patch (100%) rename {queue-2.6.31 => review-2.6.31}/futex-move-exit_pi_state-call-to-release_mm.patch (100%) rename {queue-2.6.31 => review-2.6.31}/futex-nullify-robust-lists-after-cleanup.patch (100%) rename {queue-2.6.31 => review-2.6.31}/ima-ecryptfs-fix-imbalance-message.patch (100%) rename {queue-2.6.31 => review-2.6.31}/ima-open-new-file-for-read.patch (100%) rename {queue-2.6.31 => review-2.6.31}/kvm-fix-lapic-timer-period-overflow.patch (100%) rename {queue-2.6.31 => review-2.6.31}/kvm-prevent-overflow-in-kvm_get_supported_cpuid.patch (100%) rename {queue-2.6.31 => review-2.6.31}/kvm-svm-fix-tsc-offset-adjustment-when-running-nested.patch (100%) rename {queue-2.6.31 => review-2.6.31}/kvm-vmx-flush-tlb-with-invept-on-cpu-migration.patch (100%) rename {queue-2.6.31 => review-2.6.31}/libata-fix-incorrect-link-online-check-during-probe.patch (100%) create mode 100644 review-2.6.31/mbox rename {queue-2.6.31 => review-2.6.31}/mm-add_to_swap_cache-must-not-sleep.patch (100%) rename {queue-2.6.31 => review-2.6.31}/net-fix-wrong-sizeof.patch (100%) rename {queue-2.6.31 => review-2.6.31}/nohz-update-idle-state-also-when-nohz-is-inactive.patch (100%) rename {queue-2.6.31 => review-2.6.31}/pit-fixes-to-unbreak-suspend-resume.patch (100%) rename {queue-2.6.31 => review-2.6.31}/series (100%) rename {queue-2.6.31 => review-2.6.31}/sis5513-fix-pio-setup-for-atapi-devices.patch (100%) rename {queue-2.6.31 => review-2.6.31}/sound-via82xx-move-dxs-volume-controls-to-pcm-interface.patch (100%) rename {queue-2.6.31 => review-2.6.31}/tracing-correct-module-boundaries-for-ftrace_release.patch (100%) rename {queue-2.6.31 => review-2.6.31}/tty-avoid-dropping-ldisc_mutex-over-hangup-tty-re-initialization.patch (100%) rename {queue-2.6.31 => review-2.6.31}/x86-don-t-leak-64-bit-kernel-register-values-to-32-bit-processes.patch (100%) rename {queue-2.6.31 => review-2.6.31}/x86-fix-csum_ipv6_magic-asm-memory-clobber.patch (100%) diff --git a/queue-2.6.31/acpi-clarify-resource-conflict-message.patch b/review-2.6.31/acpi-clarify-resource-conflict-message.patch similarity index 100% rename from queue-2.6.31/acpi-clarify-resource-conflict-message.patch rename to review-2.6.31/acpi-clarify-resource-conflict-message.patch diff --git a/queue-2.6.31/acpi-fix-compaq-evo-n800c-boot-hang-regression.patch b/review-2.6.31/acpi-fix-compaq-evo-n800c-boot-hang-regression.patch similarity index 100% rename from queue-2.6.31/acpi-fix-compaq-evo-n800c-boot-hang-regression.patch rename to review-2.6.31/acpi-fix-compaq-evo-n800c-boot-hang-regression.patch diff --git a/queue-2.6.31/alsa-hda-added-quirk-to-enable-sound-on-toshiba-nb200.patch b/review-2.6.31/alsa-hda-added-quirk-to-enable-sound-on-toshiba-nb200.patch similarity index 100% rename from queue-2.6.31/alsa-hda-added-quirk-to-enable-sound-on-toshiba-nb200.patch rename to review-2.6.31/alsa-hda-added-quirk-to-enable-sound-on-toshiba-nb200.patch diff --git a/queue-2.6.31/asoc-wm8350-capture-pga-mutes-are-inverted.patch b/review-2.6.31/asoc-wm8350-capture-pga-mutes-are-inverted.patch similarity index 100% rename from queue-2.6.31/asoc-wm8350-capture-pga-mutes-are-inverted.patch rename to review-2.6.31/asoc-wm8350-capture-pga-mutes-are-inverted.patch diff --git a/queue-2.6.31/ftrace-check-for-failure-for-all-conversions.patch b/review-2.6.31/ftrace-check-for-failure-for-all-conversions.patch similarity index 100% rename from queue-2.6.31/ftrace-check-for-failure-for-all-conversions.patch rename to review-2.6.31/ftrace-check-for-failure-for-all-conversions.patch diff --git a/queue-2.6.31/futex-fix-locking-imbalance.patch b/review-2.6.31/futex-fix-locking-imbalance.patch similarity index 100% rename from queue-2.6.31/futex-fix-locking-imbalance.patch rename to review-2.6.31/futex-fix-locking-imbalance.patch diff --git a/queue-2.6.31/futex-fix-requeue_pi-key-imbalance.patch b/review-2.6.31/futex-fix-requeue_pi-key-imbalance.patch similarity index 100% rename from queue-2.6.31/futex-fix-requeue_pi-key-imbalance.patch rename to review-2.6.31/futex-fix-requeue_pi-key-imbalance.patch diff --git a/queue-2.6.31/futex-move-exit_pi_state-call-to-release_mm.patch b/review-2.6.31/futex-move-exit_pi_state-call-to-release_mm.patch similarity index 100% rename from queue-2.6.31/futex-move-exit_pi_state-call-to-release_mm.patch rename to review-2.6.31/futex-move-exit_pi_state-call-to-release_mm.patch diff --git a/queue-2.6.31/futex-nullify-robust-lists-after-cleanup.patch b/review-2.6.31/futex-nullify-robust-lists-after-cleanup.patch similarity index 100% rename from queue-2.6.31/futex-nullify-robust-lists-after-cleanup.patch rename to review-2.6.31/futex-nullify-robust-lists-after-cleanup.patch diff --git a/queue-2.6.31/ima-ecryptfs-fix-imbalance-message.patch b/review-2.6.31/ima-ecryptfs-fix-imbalance-message.patch similarity index 100% rename from queue-2.6.31/ima-ecryptfs-fix-imbalance-message.patch rename to review-2.6.31/ima-ecryptfs-fix-imbalance-message.patch diff --git a/queue-2.6.31/ima-open-new-file-for-read.patch b/review-2.6.31/ima-open-new-file-for-read.patch similarity index 100% rename from queue-2.6.31/ima-open-new-file-for-read.patch rename to review-2.6.31/ima-open-new-file-for-read.patch diff --git a/queue-2.6.31/kvm-fix-lapic-timer-period-overflow.patch b/review-2.6.31/kvm-fix-lapic-timer-period-overflow.patch similarity index 100% rename from queue-2.6.31/kvm-fix-lapic-timer-period-overflow.patch rename to review-2.6.31/kvm-fix-lapic-timer-period-overflow.patch diff --git a/queue-2.6.31/kvm-prevent-overflow-in-kvm_get_supported_cpuid.patch b/review-2.6.31/kvm-prevent-overflow-in-kvm_get_supported_cpuid.patch similarity index 100% rename from queue-2.6.31/kvm-prevent-overflow-in-kvm_get_supported_cpuid.patch rename to review-2.6.31/kvm-prevent-overflow-in-kvm_get_supported_cpuid.patch diff --git a/queue-2.6.31/kvm-svm-fix-tsc-offset-adjustment-when-running-nested.patch b/review-2.6.31/kvm-svm-fix-tsc-offset-adjustment-when-running-nested.patch similarity index 100% rename from queue-2.6.31/kvm-svm-fix-tsc-offset-adjustment-when-running-nested.patch rename to review-2.6.31/kvm-svm-fix-tsc-offset-adjustment-when-running-nested.patch diff --git a/queue-2.6.31/kvm-vmx-flush-tlb-with-invept-on-cpu-migration.patch b/review-2.6.31/kvm-vmx-flush-tlb-with-invept-on-cpu-migration.patch similarity index 100% rename from queue-2.6.31/kvm-vmx-flush-tlb-with-invept-on-cpu-migration.patch rename to review-2.6.31/kvm-vmx-flush-tlb-with-invept-on-cpu-migration.patch diff --git a/queue-2.6.31/libata-fix-incorrect-link-online-check-during-probe.patch b/review-2.6.31/libata-fix-incorrect-link-online-check-during-probe.patch similarity index 100% rename from queue-2.6.31/libata-fix-incorrect-link-online-check-during-probe.patch rename to review-2.6.31/libata-fix-incorrect-link-online-check-during-probe.patch diff --git a/review-2.6.31/mbox b/review-2.6.31/mbox new file mode 100644 index 00000000000..fe8d232866e --- /dev/null +++ b/review-2.6.31/mbox @@ -0,0 +1,2117 @@ +From gregkh@mini.kroah.org Fri Oct 9 16:10:00 2009 +Message-Id: <20091009231000.229589417@mini.kroah.org> +User-Agent: quilt/0.48-1 +Date: Fri, 09 Oct 2009 16:08:37 -0700 +From: Greg KH +To: linux-kernel@vger.kernel.org, + stable@kernel.org +Cc: stable-review@kernel.org, + torvalds@linux-foundation.org, + akpm@linux-foundation.org, + alan@lxorguk.ukuu.org.uk, + Samuel Thibault , + Ingo Molnar , + Thomas Gleixner , + "H. Peter Anvin" , + "David S. Miller" , + Andi Kleen +Subject: [patch 01/26] x86: fix csum_ipv6_magic asm memory clobber +References: <20091009230836.316410305@mini.kroah.org> +Content-Disposition: inline; filename=x86-fix-csum_ipv6_magic-asm-memory-clobber.patch +Content-Length: 1311 +Lines: 38 + +2.6.31-stable review patch. If anyone has any objections, please let us know. + +------------------ +From: Samuel Thibault + +commit 392d814daf460a9564d29b2cebc51e1ea34e0504 upstream. + +Just like ip_fast_csum, the assembly snippet in csum_ipv6_magic needs a +memory clobber, as it is only passed the address of the buffer, not a +memory reference to the buffer itself. + +This caused failures in Hurd's pfinetv4 when we tried to compile it with +gcc-4.3 (bogus checksums). + +Signed-off-by: Samuel Thibault +Cc: Ingo Molnar +Cc: Thomas Gleixner +Cc: "H. Peter Anvin" +Acked-by: "David S. Miller" +Cc: Andi Kleen +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/include/asm/checksum_32.h | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/arch/x86/include/asm/checksum_32.h ++++ b/arch/x86/include/asm/checksum_32.h +@@ -161,7 +161,8 @@ static inline __sum16 csum_ipv6_magic(co + "adcl $0, %0 ;\n" + : "=&r" (sum) + : "r" (saddr), "r" (daddr), +- "r" (htonl(len)), "r" (htonl(proto)), "0" (sum)); ++ "r" (htonl(len)), "r" (htonl(proto)), "0" (sum) ++ : "memory"); + + return csum_fold(sum); + } + + +From gregkh@mini.kroah.org Fri Oct 9 16:10:00 2009 +Message-Id: <20091009231000.380054491@mini.kroah.org> +User-Agent: quilt/0.48-1 +Date: Fri, 09 Oct 2009 16:08:38 -0700 +From: Greg KH +To: linux-kernel@vger.kernel.org, + stable@kernel.org +Cc: stable-review@kernel.org, + torvalds@linux-foundation.org, + akpm@linux-foundation.org, + alan@lxorguk.ukuu.org.uk +Subject: [patch 02/26] tty: Avoid dropping ldisc_mutex over hangup tty re-initialization +References: <20091009230836.316410305@mini.kroah.org> +Content-Disposition: inline; filename=tty-avoid-dropping-ldisc_mutex-over-hangup-tty-re-initialization.patch +Content-Length: 2355 +Lines: 66 + +2.6.31-stable review patch. If anyone has any objections, please let us know. + +------------------ +From: Linus Torvalds + +commit 0b5759c654e74c8dc317ea2c6b3a7476160f688a upstream. + +A couple of people have hit the WARN_ON() in drivers/char/tty_io.c, +tty_open() that is unhappy about seeing the tty line discipline go away +during the tty hangup. See for example + + http://bugzilla.kernel.org/show_bug.cgi?id=14255 + +and the reason is that we do the tty_ldisc_halt() outside the +ldisc_mutex in order to be able to flush the scheduled work without a +deadlock with vhangup_work. + +However, it turns out that we can solve this particular case by + + - using "cancel_delayed_work_sync()" in tty_ldisc_halt(), which waits + for just the particular work, rather than synchronizing with any + random outstanding pending work. + + This won't deadlock, since the buf.work we synchronize with doesn't + care about the ldisc_mutex, it just flushes the tty ldisc buffers. + + - realize that for this particular case, we don't need to wait for any + hangup work, because we are inside the hangup codepaths ourselves. + +so as a result we can just drop the flush_scheduled_work() entirely, and +then move the tty_ldisc_halt() call to inside the mutex. That way we +never expose the partially torn down ldisc state to tty_open(), and hold +the ldisc_mutex over the whole sequence. + +Reported-by: Ingo Molnar +Reported-by: Heinz Diehl +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/char/tty_ldisc.c | 7 ++----- + 1 file changed, 2 insertions(+), 5 deletions(-) + +--- a/drivers/char/tty_ldisc.c ++++ b/drivers/char/tty_ldisc.c +@@ -516,7 +516,7 @@ static void tty_ldisc_restore(struct tty + static int tty_ldisc_halt(struct tty_struct *tty) + { + clear_bit(TTY_LDISC, &tty->flags); +- return cancel_delayed_work(&tty->buf.work); ++ return cancel_delayed_work_sync(&tty->buf.work); + } + + /** +@@ -754,12 +754,9 @@ void tty_ldisc_hangup(struct tty_struct + * N_TTY. + */ + if (tty->driver->flags & TTY_DRIVER_RESET_TERMIOS) { +- /* Make sure the old ldisc is quiescent */ +- tty_ldisc_halt(tty); +- flush_scheduled_work(); +- + /* Avoid racing set_ldisc or tty_ldisc_release */ + mutex_lock(&tty->ldisc_mutex); ++ tty_ldisc_halt(tty); + if (tty->ldisc) { /* Not yet closed */ + /* Switch back to N_TTY */ + tty_ldisc_reinit(tty); + + +From gregkh@mini.kroah.org Fri Oct 9 16:10:00 2009 +Message-Id: <20091009231000.480936034@mini.kroah.org> +User-Agent: quilt/0.48-1 +Date: Fri, 09 Oct 2009 16:08:39 -0700 +From: Greg KH +To: linux-kernel@vger.kernel.org, + stable@kernel.org +Cc: stable-review@kernel.org, + torvalds@linux-foundation.org, + akpm@linux-foundation.org, + alan@lxorguk.ukuu.org.uk, + Jan Beulich , + Ingo Molnar +Subject: [patch 03/26] x86: Dont leak 64-bit kernel register values to 32-bit processes +References: <20091009230836.316410305@mini.kroah.org> +Content-Disposition: inline; filename=x86-don-t-leak-64-bit-kernel-register-values-to-32-bit-processes.patch +Content-Length: 3104 +Lines: 119 + +2.6.31-stable review patch. If anyone has any objections, please let us know. + +------------------ +From: Jan Beulich + +commit 24e35800cdc4350fc34e2bed37b608a9e13ab3b6 upstream. + +While 32-bit processes can't directly access R8...R15, they can +gain access to these registers by temporarily switching themselves +into 64-bit mode. + +Therefore, registers not preserved anyway by called C functions +(i.e. R8...R11) must be cleared prior to returning to user mode. + +Signed-off-by: Jan Beulich +LKML-Reference: <4AC34D73020000780001744A@vpn.id2.novell.com> +Signed-off-by: Ingo Molnar +Signed-off-by: Greg Kroah-Hartman + +--- a/arch/x86/ia32/ia32entry.S ++++ b/arch/x86/ia32/ia32entry.S +@@ -21,8 +21,8 @@ + #define __AUDIT_ARCH_LE 0x40000000 + + #ifndef CONFIG_AUDITSYSCALL +-#define sysexit_audit int_ret_from_sys_call +-#define sysretl_audit int_ret_from_sys_call ++#define sysexit_audit ia32_ret_from_sys_call ++#define sysretl_audit ia32_ret_from_sys_call + #endif + + #define IA32_NR_syscalls ((ia32_syscall_end - ia32_sys_call_table)/8) +@@ -39,12 +39,12 @@ + .endm + + /* clobbers %eax */ +- .macro CLEAR_RREGS _r9=rax ++ .macro CLEAR_RREGS offset=0, _r9=rax + xorl %eax,%eax +- movq %rax,R11(%rsp) +- movq %rax,R10(%rsp) +- movq %\_r9,R9(%rsp) +- movq %rax,R8(%rsp) ++ movq %rax,\offset+R11(%rsp) ++ movq %rax,\offset+R10(%rsp) ++ movq %\_r9,\offset+R9(%rsp) ++ movq %rax,\offset+R8(%rsp) + .endm + + /* +@@ -172,6 +172,10 @@ sysexit_from_sys_call: + movl RIP-R11(%rsp),%edx /* User %eip */ + CFI_REGISTER rip,rdx + RESTORE_ARGS 1,24,1,1,1,1 ++ xorq %r8,%r8 ++ xorq %r9,%r9 ++ xorq %r10,%r10 ++ xorq %r11,%r11 + popfq + CFI_ADJUST_CFA_OFFSET -8 + /*CFI_RESTORE rflags*/ +@@ -202,7 +206,7 @@ sysexit_from_sys_call: + + .macro auditsys_exit exit,ebpsave=RBP + testl $(_TIF_ALLWORK_MASK & ~_TIF_SYSCALL_AUDIT),TI_flags(%r10) +- jnz int_ret_from_sys_call ++ jnz ia32_ret_from_sys_call + TRACE_IRQS_ON + sti + movl %eax,%esi /* second arg, syscall return value */ +@@ -218,8 +222,9 @@ sysexit_from_sys_call: + cli + TRACE_IRQS_OFF + testl %edi,TI_flags(%r10) +- jnz int_with_check +- jmp \exit ++ jz \exit ++ CLEAR_RREGS -ARGOFFSET ++ jmp int_with_check + .endm + + sysenter_auditsys: +@@ -329,6 +334,9 @@ sysretl_from_sys_call: + CFI_REGISTER rip,rcx + movl EFLAGS-ARGOFFSET(%rsp),%r11d + /*CFI_REGISTER rflags,r11*/ ++ xorq %r10,%r10 ++ xorq %r9,%r9 ++ xorq %r8,%r8 + TRACE_IRQS_ON + movl RSP-ARGOFFSET(%rsp),%esp + CFI_RESTORE rsp +@@ -353,7 +361,7 @@ cstar_tracesys: + #endif + xchgl %r9d,%ebp + SAVE_REST +- CLEAR_RREGS r9 ++ CLEAR_RREGS 0, r9 + movq $-ENOSYS,RAX(%rsp) /* ptrace can change this for a bad syscall */ + movq %rsp,%rdi /* &pt_regs -> arg1 */ + call syscall_trace_enter +@@ -425,6 +433,8 @@ ia32_do_call: + call *ia32_sys_call_table(,%rax,8) # xxx: rip relative + ia32_sysret: + movq %rax,RAX-ARGOFFSET(%rsp) ++ia32_ret_from_sys_call: ++ CLEAR_RREGS -ARGOFFSET + jmp int_ret_from_sys_call + + ia32_tracesys: +@@ -442,8 +452,8 @@ END(ia32_syscall) + + ia32_badsys: + movq $0,ORIG_RAX-ARGOFFSET(%rsp) +- movq $-ENOSYS,RAX-ARGOFFSET(%rsp) +- jmp int_ret_from_sys_call ++ movq $-ENOSYS,%rax ++ jmp ia32_sysret + + quiet_ni_syscall: + movq $-ENOSYS,%rax + + +From gregkh@mini.kroah.org Fri Oct 9 16:10:00 2009 +Message-Id: <20091009231000.609618671@mini.kroah.org> +User-Agent: quilt/0.48-1 +Date: Fri, 09 Oct 2009 16:08:40 -0700 +From: Greg KH +To: linux-kernel@vger.kernel.org, + stable@kernel.org +Cc: stable-review@kernel.org, + torvalds@linux-foundation.org, + akpm@linux-foundation.org, + alan@lxorguk.ukuu.org.uk, + Manoj Iyer , + Takashi Iwai +Subject: [patch 04/26] ALSA: hda - Added quirk to enable sound on Toshiba NB200 +References: <20091009230836.316410305@mini.kroah.org> +Content-Disposition: inline; filename=alsa-hda-added-quirk-to-enable-sound-on-toshiba-nb200.patch +Content-Length: 906 +Lines: 25 + +2.6.31-stable review patch. If anyone has any objections, please let us know. + +------------------ +From: Manoj Iyer + +commit 3db6c037c6954ed6d98ef199938e4004fea96908 upstream. + +Patch was tested on Toshiba NB200 and is found to enable sound. + +Signed-off-by: Manoj Iyer +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/hda/patch_realtek.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/sound/pci/hda/patch_realtek.c ++++ b/sound/pci/hda/patch_realtek.c +@@ -16876,6 +16876,7 @@ static struct snd_pci_quirk alc662_cfg_t + SND_PCI_QUIRK(0x105b, 0x0cd6, "Foxconn", ALC662_ECS), + SND_PCI_QUIRK(0x105b, 0x0d47, "Foxconn 45CMX/45GMX/45CMX-K", + ALC662_3ST_6ch_DIG), ++ SND_PCI_QUIRK(0x1179, 0xff6e, "Toshiba NB200", ALC663_ASUS_MODE4), + SND_PCI_QUIRK(0x144d, 0xca00, "Samsung NC10", ALC272_SAMSUNG_NC10), + SND_PCI_QUIRK(0x1458, 0xa002, "Gigabyte 945GCM-S2L", + ALC662_3ST_6ch_DIG), + + +From gregkh@mini.kroah.org Fri Oct 9 16:10:00 2009 +Message-Id: <20091009231000.733529740@mini.kroah.org> +User-Agent: quilt/0.48-1 +Date: Fri, 09 Oct 2009 16:08:41 -0700 +From: Greg KH +To: linux-kernel@vger.kernel.org, + stable@kernel.org +Cc: stable-review@kernel.org, + torvalds@linux-foundation.org, + akpm@linux-foundation.org, + alan@lxorguk.ukuu.org.uk, + Jiri Olsa , + Steven Rostedt +Subject: [patch 05/26] tracing: correct module boundaries for ftrace_release +References: <20091009230836.316410305@mini.kroah.org> +Content-Disposition: inline; filename=tracing-correct-module-boundaries-for-ftrace_release.patch +Content-Length: 2234 +Lines: 68 + +2.6.31-stable review patch. If anyone has any objections, please let us know. + +------------------ +From: jolsa@redhat.com + +commit e7247a15ff3bbdab0a8b402dffa1171e5c05a8e0 upstream. + +When the module is about the unload we release its call records. +The ftrace_release function was given wrong values representing +the module core boundaries, thus not releasing its call records. + +Plus making ftrace_release function module specific. + +Signed-off-by: Jiri Olsa +LKML-Reference: <1254934835-363-3-git-send-email-jolsa@redhat.com> +Signed-off-by: Steven Rostedt +Signed-off-by: Greg Kroah-Hartman + +--- + include/linux/ftrace.h | 2 +- + kernel/trace/ftrace.c | 12 ++++-------- + 2 files changed, 5 insertions(+), 9 deletions(-) + +--- a/include/linux/ftrace.h ++++ b/include/linux/ftrace.h +@@ -241,7 +241,7 @@ extern void ftrace_enable_daemon(void); + # define ftrace_set_filter(buf, len, reset) do { } while (0) + # define ftrace_disable_daemon() do { } while (0) + # define ftrace_enable_daemon() do { } while (0) +-static inline void ftrace_release(void *start, unsigned long size) { } ++static inline void ftrace_release_mod(struct module *mod) {} + static inline int register_ftrace_command(struct ftrace_func_command *cmd) + { + return -EINVAL; +--- a/kernel/trace/ftrace.c ++++ b/kernel/trace/ftrace.c +@@ -2801,19 +2801,17 @@ static int ftrace_convert_nops(struct mo + } + + #ifdef CONFIG_MODULES +-void ftrace_release(void *start, void *end) ++void ftrace_release_mod(struct module *mod) + { + struct dyn_ftrace *rec; + struct ftrace_page *pg; +- unsigned long s = (unsigned long)start; +- unsigned long e = (unsigned long)end; + +- if (ftrace_disabled || !start || start == end) ++ if (ftrace_disabled) + return; + + mutex_lock(&ftrace_lock); + do_for_each_ftrace_rec(pg, rec) { +- if ((rec->ip >= s) && (rec->ip < e)) { ++ if (within_module_core(rec->ip, mod)) { + /* + * rec->ip is changed in ftrace_free_rec() + * It should not between s and e if record was freed. +@@ -2845,9 +2843,7 @@ static int ftrace_module_notify(struct n + mod->num_ftrace_callsites); + break; + case MODULE_STATE_GOING: +- ftrace_release(mod->ftrace_callsites, +- mod->ftrace_callsites + +- mod->num_ftrace_callsites); ++ ftrace_release_mod(mod); + break; + } + + + +From gregkh@mini.kroah.org Fri Oct 9 16:10:00 2009 +Message-Id: <20091009231000.889034070@mini.kroah.org> +User-Agent: quilt/0.48-1 +Date: Fri, 09 Oct 2009 16:08:42 -0700 +From: Greg KH +To: linux-kernel@vger.kernel.org, + stable@kernel.org +Cc: stable-review@kernel.org, + torvalds@linux-foundation.org, + akpm@linux-foundation.org, + alan@lxorguk.ukuu.org.uk, + Steven Rostedt +Subject: [patch 06/26] ftrace: check for failure for all conversions +References: <20091009230836.316410305@mini.kroah.org> +Content-Disposition: inline; filename=ftrace-check-for-failure-for-all-conversions.patch +Content-Length: 1056 +Lines: 36 + +2.6.31-stable review patch. If anyone has any objections, please let us know. + +------------------ +From: Steven Rostedt + +commit 3279ba37db5d65c4ab0dcdee3b211ccb85bb563f upstream. + +Due to legacy code from back when the dynamic tracer used a daemon, +only core kernel code was checking for failures. This is no longer +the case. We must check for failures any time we perform text modifications. + +Signed-off-by: Steven Rostedt +Signed-off-by: Greg Kroah-Hartman + +--- + kernel/trace/ftrace.c | 11 +++-------- + 1 file changed, 3 insertions(+), 8 deletions(-) + +--- a/kernel/trace/ftrace.c ++++ b/kernel/trace/ftrace.c +@@ -1110,14 +1110,9 @@ static void ftrace_replace_code(int enab + failed = __ftrace_replace_code(rec, enable); + if (failed) { + rec->flags |= FTRACE_FL_FAILED; +- if ((system_state == SYSTEM_BOOTING) || +- !core_kernel_text(rec->ip)) { +- ftrace_free_rec(rec); +- } else { +- ftrace_bug(failed, rec->ip); +- /* Stop processing */ +- return; +- } ++ ftrace_bug(failed, rec->ip); ++ /* Stop processing */ ++ return; + } + } while_for_each_ftrace_rec(); + } + + +From gregkh@mini.kroah.org Fri Oct 9 16:10:01 2009 +Message-Id: <20091009231000.985919710@mini.kroah.org> +User-Agent: quilt/0.48-1 +Date: Fri, 09 Oct 2009 16:08:43 -0700 +From: Greg KH +To: linux-kernel@vger.kernel.org, + stable@kernel.org +Cc: stable-review@kernel.org, + torvalds@linux-foundation.org, + akpm@linux-foundation.org, + alan@lxorguk.ukuu.org.uk, + Darren Hart , + Helge Bahmann , + Peter Zijlstra , + Eric Dumazet , + Dinakar Guniguntala , + John Stultz , + Thomas Gleixner +Subject: [patch 07/26] futex: fix requeue_pi key imbalance +References: <20091009230836.316410305@mini.kroah.org> +Content-Disposition: inline; filename=futex-fix-requeue_pi-key-imbalance.patch +Content-Length: 1197 +Lines: 37 + +2.6.31-stable review patch. If anyone has any objections, please let us know. + +------------------ +From: Darren Hart + +commit da085681014fb43d67d9bf6d14bc068e9254bd49 upstream. + +If futex_wait_requeue_pi() wakes prior to requeue, we drop the +reference to the source futex_key twice, once in +handle_early_requeue_pi_wakeup() and once on our way out. + +Remove the drop from the handle_early_requeue_pi_wakeup() and keep +the get/drops together in futex_wait_requeue_pi(). + +Reported-by: Helge Bahmann +Signed-off-by: Darren Hart +Cc: Helge Bahmann +Cc: Peter Zijlstra +Cc: Eric Dumazet +Cc: Dinakar Guniguntala +Cc: John Stultz +LKML-Reference: <4ACCE21E.5030805@us.ibm.com> +Signed-off-by: Thomas Gleixner +Signed-off-by: Greg Kroah-Hartman + +--- + kernel/futex.c | 1 - + 1 file changed, 1 deletion(-) + +--- a/kernel/futex.c ++++ b/kernel/futex.c +@@ -2087,7 +2087,6 @@ int handle_early_requeue_pi_wakeup(struc + * Unqueue the futex_q and determine which it was. + */ + plist_del(&q->list, &q->list.plist); +- drop_futex_key_refs(&q->key); + + if (timeout && !timeout->task) + ret = -ETIMEDOUT; + + +From gregkh@mini.kroah.org Fri Oct 9 16:10:01 2009 +Message-Id: <20091009231001.140032602@mini.kroah.org> +User-Agent: quilt/0.48-1 +Date: Fri, 09 Oct 2009 16:08:44 -0700 +From: Greg KH +To: linux-kernel@vger.kernel.org, + stable@kernel.org +Cc: stable-review@kernel.org, + torvalds@linux-foundation.org, + akpm@linux-foundation.org, + alan@lxorguk.ukuu.org.uk, + Thomas Gleixner , + Anirban Sinha , + Peter Zijlstra +Subject: [patch 08/26] futex: Move exit_pi_state() call to release_mm() +References: <20091009230836.316410305@mini.kroah.org> +Content-Disposition: inline; filename=futex-move-exit_pi_state-call-to-release_mm.patch +Content-Length: 1187 +Lines: 41 + +2.6.31-stable review patch. If anyone has any objections, please let us know. + +------------------ +From: Thomas Gleixner + +commit 322a2c100a8998158445599ea437fb556aa95b11 upstream. + +exit_pi_state() is called from do_exit() but not from do_execve(). +Move it to release_mm() so it gets called from do_execve() as well. + +Signed-off-by: Thomas Gleixner +LKML-Reference: +Cc: Anirban Sinha +Cc: Peter Zijlstra +Signed-off-by: Greg Kroah-Hartman + +--- + kernel/exit.c | 2 -- + kernel/fork.c | 2 ++ + 2 files changed, 2 insertions(+), 2 deletions(-) + +--- a/kernel/exit.c ++++ b/kernel/exit.c +@@ -987,8 +987,6 @@ NORET_TYPE void do_exit(long code) + tsk->mempolicy = NULL; + #endif + #ifdef CONFIG_FUTEX +- if (unlikely(!list_empty(&tsk->pi_state_list))) +- exit_pi_state_list(tsk); + if (unlikely(current->pi_state_cache)) + kfree(current->pi_state_cache); + #endif +--- a/kernel/fork.c ++++ b/kernel/fork.c +@@ -550,6 +550,8 @@ void mm_release(struct task_struct *tsk, + if (unlikely(tsk->compat_robust_list)) + compat_exit_robust_list(tsk); + #endif ++ if (unlikely(!list_empty(&tsk->pi_state_list))) ++ exit_pi_state_list(tsk); + #endif + + /* Get rid of any cached register state */ + + +From gregkh@mini.kroah.org Fri Oct 9 16:10:01 2009 +Message-Id: <20091009231001.277012503@mini.kroah.org> +User-Agent: quilt/0.48-1 +Date: Fri, 09 Oct 2009 16:08:45 -0700 +From: Greg KH +To: linux-kernel@vger.kernel.org, + stable@kernel.org +Cc: stable-review@kernel.org, + torvalds@linux-foundation.org, + akpm@linux-foundation.org, + alan@lxorguk.ukuu.org.uk, + Peter Zijlstra , + Thomas Gleixner +Subject: [patch 09/26] futex: Nullify robust lists after cleanup +References: <20091009230836.316410305@mini.kroah.org> +Content-Disposition: inline; filename=futex-nullify-robust-lists-after-cleanup.patch +Content-Length: 1402 +Lines: 44 + +2.6.31-stable review patch. If anyone has any objections, please let us know. + +------------------ +From: Peter Zijlstra + +commit fc6b177dee33365ccb29fe6d2092223cf8d679f9 upstream. + +The robust list pointers of user space held futexes are kept intact +over an exec() call. When the exec'ed task exits exit_robust_list() is +called with the stale pointer. The risk of corruption is minimal, but +still it is incorrect to keep the pointers valid. Actually glibc +should uninstall the robust list before calling exec() but we have to +deal with it anyway. + +Nullify the pointers after [compat_]exit_robust_list() has been +called. + +Reported-by: Anirban Sinha +Signed-off-by: Peter Zijlstra +Signed-off-by: Thomas Gleixner +Signed-off-by: Greg Kroah-Hartman + +--- + kernel/fork.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +--- a/kernel/fork.c ++++ b/kernel/fork.c +@@ -544,11 +544,15 @@ void mm_release(struct task_struct *tsk, + + /* Get rid of any futexes when releasing the mm */ + #ifdef CONFIG_FUTEX +- if (unlikely(tsk->robust_list)) ++ if (unlikely(tsk->robust_list)) { + exit_robust_list(tsk); ++ tsk->robust_list = NULL; ++ } + #ifdef CONFIG_COMPAT +- if (unlikely(tsk->compat_robust_list)) ++ if (unlikely(tsk->compat_robust_list)) { + compat_exit_robust_list(tsk); ++ tsk->compat_robust_list = NULL; ++ } + #endif + if (unlikely(!list_empty(&tsk->pi_state_list))) + exit_pi_state_list(tsk); + + +From gregkh@mini.kroah.org Fri Oct 9 16:10:01 2009 +Message-Id: <20091009231001.413018337@mini.kroah.org> +User-Agent: quilt/0.48-1 +Date: Fri, 09 Oct 2009 16:08:46 -0700 +From: Greg KH +To: linux-kernel@vger.kernel.org, + stable@kernel.org +Cc: stable-review@kernel.org, + torvalds@linux-foundation.org, + akpm@linux-foundation.org, + alan@lxorguk.ukuu.org.uk, + Thomas Gleixner , + Peter Zijlstra , + Darren Hart , + Ingo Molnar +Subject: [patch 10/26] futex: Fix locking imbalance +References: <20091009230836.316410305@mini.kroah.org> +Content-Disposition: inline; filename=futex-fix-locking-imbalance.patch +Content-Length: 1158 +Lines: 40 + +2.6.31-stable review patch. If anyone has any objections, please let us know. + +------------------ +From: Thomas Gleixner + +commit eaaea8036d0261d87d7072c5bc88c7ea730c18ac upstream. + +Rich reported a lock imbalance in the futex code: + + http://bugzilla.kernel.org/show_bug.cgi?id=14288 + +It's caused by the displacement of the retry_private label in +futex_wake_op(). The code unlocks the hash bucket locks in the +error handling path and retries without locking them again which +makes the next unlock fail. + +Move retry_private so we lock the hash bucket locks when we retry. + +Reported-by: Rich Ercolany +Signed-off-by: Thomas Gleixner +Cc: Peter Zijlstra +Cc: Darren Hart +LKML-Reference: +Signed-off-by: Ingo Molnar +Signed-off-by: Greg Kroah-Hartman + +--- + kernel/futex.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/kernel/futex.c ++++ b/kernel/futex.c +@@ -912,8 +912,8 @@ retry: + hb1 = hash_futex(&key1); + hb2 = hash_futex(&key2); + +- double_lock_hb(hb1, hb2); + retry_private: ++ double_lock_hb(hb1, hb2); + op_ret = futex_atomic_op_inuser(op, uaddr2); + if (unlikely(op_ret < 0)) { + + + +From gregkh@mini.kroah.org Fri Oct 9 16:10:01 2009 +Message-Id: <20091009231001.532024807@mini.kroah.org> +User-Agent: quilt/0.48-1 +Date: Fri, 09 Oct 2009 16:08:47 -0700 +From: Greg KH +To: linux-kernel@vger.kernel.org, + stable@kernel.org +Cc: stable-review@kernel.org, + torvalds@linux-foundation.org, + akpm@linux-foundation.org, + alan@lxorguk.ukuu.org.uk, + Eero Nurkkala , + Rik van Riel , + Venkatesh Pallipadi , + Steven Noonan , + Thomas Gleixner +Subject: [patch 11/26] NOHZ: update idle state also when NOHZ is inactive +References: <20091009230836.316410305@mini.kroah.org> +Content-Disposition: inline; filename=nohz-update-idle-state-also-when-nohz-is-inactive.patch +Content-Length: 1859 +Lines: 57 + +2.6.31-stable review patch. If anyone has any objections, please let us know. + +------------------ +From: Eero Nurkkala + +commit fdc6f192e7e1ae80565af23cc33dc88e3dcdf184 upstream. + +Commit f2e21c9610991e95621a81407cdbab881226419b had unfortunate side +effects with cpufreq governors on some systems. + +If the system did not switch into NOHZ mode ts->inidle is not set when +tick_nohz_stop_sched_tick() is called from the idle routine. Therefor +all subsequent calls from irq_exit() to tick_nohz_stop_sched_tick() +fail to call tick_nohz_start_idle(). This results in bogus idle +accounting information which is passed to cpufreq governors. + +Set the inidle flag unconditionally of the NOHZ active state to keep +the idle time accounting correct in any case. + +[ tglx: Added comment and tweaked the changelog ] + +Reported-by: Steven Noonan +Signed-off-by: Eero Nurkkala +Cc: Rik van Riel +Cc: Venkatesh Pallipadi +Cc: Steven Noonan +LKML-Reference: <1254907901.30157.93.camel@eenurkka-desktop> +Signed-off-by: Thomas Gleixner +Signed-off-by: Greg Kroah-Hartman + +--- + kernel/time/tick-sched.c | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +--- a/kernel/time/tick-sched.c ++++ b/kernel/time/tick-sched.c +@@ -231,6 +231,13 @@ void tick_nohz_stop_sched_tick(int inidl + if (!inidle && !ts->inidle) + goto end; + ++ /* ++ * Set ts->inidle unconditionally. Even if the system did not ++ * switch to NOHZ mode the cpu frequency governers rely on the ++ * update of the idle time accounting in tick_nohz_start_idle(). ++ */ ++ ts->inidle = 1; ++ + now = tick_nohz_start_idle(ts); + + /* +@@ -248,8 +255,6 @@ void tick_nohz_stop_sched_tick(int inidl + if (unlikely(ts->nohz_mode == NOHZ_MODE_INACTIVE)) + goto end; + +- ts->inidle = 1; +- + if (need_resched()) + goto end; + + + +From gregkh@mini.kroah.org Fri Oct 9 16:10:01 2009 +Message-Id: <20091009231001.649051837@mini.kroah.org> +User-Agent: quilt/0.48-1 +Date: Fri, 09 Oct 2009 16:08:48 -0700 +From: Greg KH +To: linux-kernel@vger.kernel.org, + stable@kernel.org +Cc: stable-review@kernel.org, + torvalds@linux-foundation.org, + akpm@linux-foundation.org, + alan@lxorguk.ukuu.org.uk, + Eric Paris , + Dustin Kirkland , + James Morris , + David Safford , + Mimi Zohar , + Tyler Hicks +Subject: [patch 12/26] ima: ecryptfs fix imbalance message +References: <20091009230836.316410305@mini.kroah.org> +Content-Disposition: inline; filename=ima-ecryptfs-fix-imbalance-message.patch +Content-Length: 1572 +Lines: 53 + +2.6.31-stable review patch. If anyone has any objections, please let us know. + +------------------ +From: Mimi Zohar + +commit 36520be8e32b49bd85a63b7b8b40cd07c3da59a5 upstream. + +The unencrypted files are being measured. Update the counters to get +rid of the ecryptfs imbalance message. (http://bugzilla.redhat.com/519737) + +Reported-by: Sachin Garg +Cc: Eric Paris +Cc: Dustin Kirkland +Cc: James Morris +Cc: David Safford +Signed-off-by: Mimi Zohar +Signed-off-by: Tyler Hicks +Signed-off-by: Greg Kroah-Hartman + +--- + fs/ecryptfs/main.c | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +--- a/fs/ecryptfs/main.c ++++ b/fs/ecryptfs/main.c +@@ -35,6 +35,7 @@ + #include + #include + #include ++#include + #include "ecryptfs_kernel.h" + + /** +@@ -118,6 +119,7 @@ int ecryptfs_init_persistent_file(struct + const struct cred *cred = current_cred(); + struct ecryptfs_inode_info *inode_info = + ecryptfs_inode_to_private(ecryptfs_dentry->d_inode); ++ int opened_lower_file = 0; + int rc = 0; + + mutex_lock(&inode_info->lower_file_mutex); +@@ -134,9 +136,12 @@ int ecryptfs_init_persistent_file(struct + "for lower_dentry [0x%p] and lower_mnt [0x%p]; " + "rc = [%d]\n", lower_dentry, lower_mnt, rc); + inode_info->lower_file = NULL; +- } ++ } else ++ opened_lower_file = 1; + } + mutex_unlock(&inode_info->lower_file_mutex); ++ if (opened_lower_file) ++ ima_counts_get(inode_info->lower_file); + return rc; + } + + + +From gregkh@mini.kroah.org Fri Oct 9 16:10:01 2009 +Message-Id: <20091009231001.785034123@mini.kroah.org> +User-Agent: quilt/0.48-1 +Date: Fri, 09 Oct 2009 16:08:49 -0700 +From: Greg KH +To: linux-kernel@vger.kernel.org, + stable@kernel.org +Cc: stable-review@kernel.org, + torvalds@linux-foundation.org, + akpm@linux-foundation.org, + alan@lxorguk.ukuu.org.uk, + Tejun Heo , + Jeff Garzik +Subject: [patch 13/26] libata: fix incorrect link online check during probe +References: <20091009230836.316410305@mini.kroah.org> +Content-Disposition: inline; filename=libata-fix-incorrect-link-online-check-during-probe.patch +Content-Length: 4117 +Lines: 110 + +2.6.31-stable review patch. If anyone has any objections, please let us know. + +------------------ +From: Tejun Heo + +commit 3b761d3d437cffcaf160a5d37eb6b3b186e491d5 upstream. + +While trying to work around spurious detection retries for +non-existent devices on slave links, commit +816ab89782ac139a8b65147cca990822bb7e8675 incorrectly added link +offline check logic before ata_eh_thaw() was called. This means that +if an occupied link goes down briefly at the time that offline check +was performed, device class will be cleared to ATA_DEV_NONE and libata +wouldn't retry thus failing detection of the device. + +The offline check should be done after the port is thawed together +with online check so that such link glitches can be detected by the +interrupt handler and handled properly. + +Signed-off-by: Tejun Heo +Reported-by: Tim Blechmann +Signed-off-by: Jeff Garzik +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/ata/libata-eh.c | 50 ++++++++++++++++++++++++++++++------------------ + 1 file changed, 32 insertions(+), 18 deletions(-) + +--- a/drivers/ata/libata-eh.c ++++ b/drivers/ata/libata-eh.c +@@ -2541,14 +2541,14 @@ int ata_eh_reset(struct ata_link *link, + dev->pio_mode = XFER_PIO_0; + dev->flags &= ~ATA_DFLAG_SLEEPING; + +- if (!ata_phys_link_offline(ata_dev_phys_link(dev))) { +- /* apply class override */ +- if (lflags & ATA_LFLAG_ASSUME_ATA) +- classes[dev->devno] = ATA_DEV_ATA; +- else if (lflags & ATA_LFLAG_ASSUME_SEMB) +- classes[dev->devno] = ATA_DEV_SEMB_UNSUP; +- } else +- classes[dev->devno] = ATA_DEV_NONE; ++ if (ata_phys_link_offline(ata_dev_phys_link(dev))) ++ continue; ++ ++ /* apply class override */ ++ if (lflags & ATA_LFLAG_ASSUME_ATA) ++ classes[dev->devno] = ATA_DEV_ATA; ++ else if (lflags & ATA_LFLAG_ASSUME_SEMB) ++ classes[dev->devno] = ATA_DEV_SEMB_UNSUP; + } + + /* record current link speed */ +@@ -2581,34 +2581,48 @@ int ata_eh_reset(struct ata_link *link, + slave->eh_info.serror = 0; + spin_unlock_irqrestore(link->ap->lock, flags); + +- /* Make sure onlineness and classification result correspond. ++ /* ++ * Make sure onlineness and classification result correspond. + * Hotplug could have happened during reset and some + * controllers fail to wait while a drive is spinning up after + * being hotplugged causing misdetection. By cross checking +- * link onlineness and classification result, those conditions +- * can be reliably detected and retried. ++ * link on/offlineness and classification result, those ++ * conditions can be reliably detected and retried. + */ + nr_unknown = 0; + ata_for_each_dev(dev, link, ALL) { +- /* convert all ATA_DEV_UNKNOWN to ATA_DEV_NONE */ +- if (classes[dev->devno] == ATA_DEV_UNKNOWN) { +- classes[dev->devno] = ATA_DEV_NONE; +- if (ata_phys_link_online(ata_dev_phys_link(dev))) ++ if (ata_phys_link_online(ata_dev_phys_link(dev))) { ++ if (classes[dev->devno] == ATA_DEV_UNKNOWN) { ++ ata_dev_printk(dev, KERN_DEBUG, "link online " ++ "but device misclassifed\n"); ++ classes[dev->devno] = ATA_DEV_NONE; + nr_unknown++; ++ } ++ } else if (ata_phys_link_offline(ata_dev_phys_link(dev))) { ++ if (ata_class_enabled(classes[dev->devno])) ++ ata_dev_printk(dev, KERN_DEBUG, "link offline, " ++ "clearing class %d to NONE\n", ++ classes[dev->devno]); ++ classes[dev->devno] = ATA_DEV_NONE; ++ } else if (classes[dev->devno] == ATA_DEV_UNKNOWN) { ++ ata_dev_printk(dev, KERN_DEBUG, "link status unknown, " ++ "clearing UNKNOWN to NONE\n"); ++ classes[dev->devno] = ATA_DEV_NONE; + } + } + + if (classify && nr_unknown) { + if (try < max_tries) { + ata_link_printk(link, KERN_WARNING, "link online but " +- "device misclassified, retrying\n"); ++ "%d devices misclassified, retrying\n", ++ nr_unknown); + failed_link = link; + rc = -EAGAIN; + goto fail; + } + ata_link_printk(link, KERN_WARNING, +- "link online but device misclassified, " +- "device detection might fail\n"); ++ "link online but %d devices misclassified, " ++ "device detection might fail\n", nr_unknown); + } + + /* reset successful, schedule revalidation */ + + +From gregkh@mini.kroah.org Fri Oct 9 16:10:01 2009 +Message-Id: <20091009231001.901946466@mini.kroah.org> +User-Agent: quilt/0.48-1 +Date: Fri, 09 Oct 2009 16:08:50 -0700 +From: Greg KH +To: linux-kernel@vger.kernel.org, + stable@kernel.org +Cc: stable-review@kernel.org, + torvalds@linux-foundation.org, + akpm@linux-foundation.org, + alan@lxorguk.ukuu.org.uk, + Clemens Ladisch , + Takashi Iwai +Subject: [patch 14/26] sound: via82xx: move DXS volume controls to PCM interface +References: <20091009230836.316410305@mini.kroah.org> +Content-Disposition: inline; filename=sound-via82xx-move-dxs-volume-controls-to-pcm-interface.patch +Content-Length: 2989 +Lines: 83 + +2.6.31-stable review patch. If anyone has any objections, please let us know. + +------------------ +From: Clemens Ladisch + +commit 2fb930b53f513cbc4c102d415d2923a8a7091337 upstream. + +The "VIA DXS" controls are actually volume controls that apply to the +four PCM substreams, so we better indicate this connection by moving the +controls to the PCM interface. + +Commit b452e08e73c0e3dbb0be82130217be4b7084299e in 2.6.30 broke the +restoring of these volumes by "alsactl restore" that most distributions +use; the renaming in this patch cures that regression by preventing +alsactl from applying the old, wrong volume levels to the new controls. +http://bugzilla.kernel.org/show_bug.cgi?id=14151 +http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=532613 + +Signed-off-by: Clemens Ladisch +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/via82xx.c | 27 ++++++++++++++++++--------- + 1 file changed, 18 insertions(+), 9 deletions(-) + +--- a/sound/pci/via82xx.c ++++ b/sound/pci/via82xx.c +@@ -1626,7 +1626,7 @@ static int snd_via8233_dxs_volume_get(st + struct snd_ctl_elem_value *ucontrol) + { + struct via82xx *chip = snd_kcontrol_chip(kcontrol); +- unsigned int idx = snd_ctl_get_ioff(kcontrol, &ucontrol->id); ++ unsigned int idx = kcontrol->id.subdevice; + + ucontrol->value.integer.value[0] = VIA_DXS_MAX_VOLUME - chip->playback_volume[idx][0]; + ucontrol->value.integer.value[1] = VIA_DXS_MAX_VOLUME - chip->playback_volume[idx][1]; +@@ -1646,7 +1646,7 @@ static int snd_via8233_dxs_volume_put(st + struct snd_ctl_elem_value *ucontrol) + { + struct via82xx *chip = snd_kcontrol_chip(kcontrol); +- unsigned int idx = snd_ctl_get_ioff(kcontrol, &ucontrol->id); ++ unsigned int idx = kcontrol->id.subdevice; + unsigned long port = chip->port + 0x10 * idx; + unsigned char val; + int i, change = 0; +@@ -1705,11 +1705,12 @@ static struct snd_kcontrol_new snd_via82 + }; + + static struct snd_kcontrol_new snd_via8233_dxs_volume_control __devinitdata = { +- .name = "VIA DXS Playback Volume", +- .iface = SNDRV_CTL_ELEM_IFACE_MIXER, ++ .iface = SNDRV_CTL_ELEM_IFACE_PCM, ++ .device = 0, ++ /* .subdevice set later */ ++ .name = "PCM Playback Volume", + .access = (SNDRV_CTL_ELEM_ACCESS_READWRITE | + SNDRV_CTL_ELEM_ACCESS_TLV_READ), +- .count = 4, + .info = snd_via8233_dxs_volume_info, + .get = snd_via8233_dxs_volume_get, + .put = snd_via8233_dxs_volume_put, +@@ -1936,10 +1937,18 @@ static int __devinit snd_via8233_init_mi + } + else /* Using DXS when PCM emulation is enabled is really weird */ + { +- /* Standalone DXS controls */ +- err = snd_ctl_add(chip->card, snd_ctl_new1(&snd_via8233_dxs_volume_control, chip)); +- if (err < 0) +- return err; ++ for (i = 0; i < 4; ++i) { ++ struct snd_kcontrol *kctl; ++ ++ kctl = snd_ctl_new1( ++ &snd_via8233_dxs_volume_control, chip); ++ if (!kctl) ++ return -ENOMEM; ++ kctl->id.subdevice = i; ++ err = snd_ctl_add(chip->card, kctl); ++ if (err < 0) ++ return err; ++ } + } + } + /* select spdif data slot 10/11 */ + + +From gregkh@mini.kroah.org Fri Oct 9 16:10:02 2009 +Message-Id: <20091009231001.998011541@mini.kroah.org> +User-Agent: quilt/0.48-1 +Date: Fri, 09 Oct 2009 16:08:51 -0700 +From: Greg KH +To: linux-kernel@vger.kernel.org, + stable@kernel.org +Cc: stable-review@kernel.org, + torvalds@linux-foundation.org, + akpm@linux-foundation.org, + alan@lxorguk.ukuu.org.uk, + Mark Brown +Subject: [patch 15/26] ASoC: WM8350 capture PGA mutes are inverted +References: <20091009230836.316410305@mini.kroah.org> +Content-Disposition: inline; filename=asoc-wm8350-capture-pga-mutes-are-inverted.patch +Content-Length: 1023 +Lines: 32 + +2.6.31-stable review patch. If anyone has any objections, please let us know. + +------------------ +From: Mark Brown + +commit 5b7dde346881b12246669ae97b3a2793c27b32b6 upstream. + +Signed-off-by: Mark Brown +Signed-off-by: Greg Kroah-Hartman + +--- + sound/soc/codecs/wm8350.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/sound/soc/codecs/wm8350.c ++++ b/sound/soc/codecs/wm8350.c +@@ -580,7 +580,7 @@ static const struct snd_kcontrol_new wm8 + SOC_DAPM_SINGLE_TLV("L3 Capture Volume", + WM8350_INPUT_MIXER_VOLUME_L, 9, 7, 0, out_mix_tlv), + SOC_DAPM_SINGLE("PGA Capture Switch", +- WM8350_LEFT_INPUT_VOLUME, 14, 1, 0), ++ WM8350_LEFT_INPUT_VOLUME, 14, 1, 1), + }; + + /* Right Input Mixer */ +@@ -590,7 +590,7 @@ static const struct snd_kcontrol_new wm8 + SOC_DAPM_SINGLE_TLV("L3 Capture Volume", + WM8350_INPUT_MIXER_VOLUME_R, 13, 7, 0, out_mix_tlv), + SOC_DAPM_SINGLE("PGA Capture Switch", +- WM8350_RIGHT_INPUT_VOLUME, 14, 1, 0), ++ WM8350_RIGHT_INPUT_VOLUME, 14, 1, 1), + }; + + /* Left Mic Mixer */ + + +From gregkh@mini.kroah.org Fri Oct 9 16:10:02 2009 +Message-Id: <20091009231002.148004287@mini.kroah.org> +User-Agent: quilt/0.48-1 +Date: Fri, 09 Oct 2009 16:08:52 -0700 +From: Greg KH +To: linux-kernel@vger.kernel.org, + stable@kernel.org +Cc: stable-review@kernel.org, + torvalds@linux-foundation.org, + akpm@linux-foundation.org, + alan@lxorguk.ukuu.org.uk, + Avi Kivity +Subject: [patch 16/26] KVM: Prevent overflow in KVM_GET_SUPPORTED_CPUID +References: <20091009230836.316410305@mini.kroah.org> +Content-Disposition: inline; filename=kvm-prevent-overflow-in-kvm_get_supported_cpuid.patch +Content-Length: 775 +Lines: 27 + +2.6.31-stable review patch. If anyone has any objections, please let us know. + +------------------ +From: Avi Kivity + +commit 6a54435560efdab1a08f429a954df4d6c740bddf upstream. + +The number of entries is multiplied by the entry size, which can +overflow on 32-bit hosts. Bound the entry count instead. + +Reported-by: David Wagner +Signed-off-by: Avi Kivity +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/kvm/x86.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/arch/x86/kvm/x86.c ++++ b/arch/x86/kvm/x86.c +@@ -1429,6 +1429,8 @@ static int kvm_dev_ioctl_get_supported_c + + if (cpuid->nent < 1) + goto out; ++ if (cpuid->nent > KVM_MAX_CPUID_ENTRIES) ++ cpuid->nent = KVM_MAX_CPUID_ENTRIES; + r = -ENOMEM; + cpuid_entries = vmalloc(sizeof(struct kvm_cpuid_entry2) * cpuid->nent); + if (!cpuid_entries) + + +From gregkh@mini.kroah.org Fri Oct 9 16:10:02 2009 +Message-Id: <20091009231002.272019830@mini.kroah.org> +User-Agent: quilt/0.48-1 +Date: Fri, 09 Oct 2009 16:08:53 -0700 +From: Greg KH +To: linux-kernel@vger.kernel.org, + stable@kernel.org +Cc: stable-review@kernel.org, + torvalds@linux-foundation.org, + akpm@linux-foundation.org, + alan@lxorguk.ukuu.org.uk, + Marcelo Tosatti +Subject: [patch 17/26] KVM: VMX: flush TLB with INVEPT on cpu migration +References: <20091009230836.316410305@mini.kroah.org> +Content-Disposition: inline; filename=kvm-vmx-flush-tlb-with-invept-on-cpu-migration.patch +Content-Length: 881 +Lines: 29 + +2.6.31-stable review patch. If anyone has any objections, please let us know. + +------------------ +From: Marcelo Tosatti + +commit eb5109e311b5152c0614a28d7d615d087f268f19 upstream. + +It is possible that stale EPTP-tagged mappings are used, if a +vcpu migrates to a different pcpu. + +Set KVM_REQ_TLB_FLUSH in vmx_vcpu_load, when switching pcpus, which +will invalidate both VPID and EPT mappings on the next vm-entry. + +Signed-off-by: Marcelo Tosatti +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/kvm/vmx.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/x86/kvm/vmx.c ++++ b/arch/x86/kvm/vmx.c +@@ -661,7 +661,7 @@ static void vmx_vcpu_load(struct kvm_vcp + if (vcpu->cpu != cpu) { + vcpu_clear(vmx); + kvm_migrate_timers(vcpu); +- vpid_sync_vcpu_all(vmx); ++ set_bit(KVM_REQ_TLB_FLUSH, &vcpu->requests); + local_irq_disable(); + list_add(&vmx->local_vcpus_link, + &per_cpu(vcpus_on_cpu, cpu)); + + +From gregkh@mini.kroah.org Fri Oct 9 16:10:02 2009 +Message-Id: <20091009231002.392026141@mini.kroah.org> +User-Agent: quilt/0.48-1 +Date: Fri, 09 Oct 2009 16:08:54 -0700 +From: Greg KH +To: linux-kernel@vger.kernel.org, + stable@kernel.org +Cc: stable-review@kernel.org, + torvalds@linux-foundation.org, + akpm@linux-foundation.org, + alan@lxorguk.ukuu.org.uk, + Aurelien Jarno , + Marcelo Tosatti +Subject: [patch 18/26] KVM: fix LAPIC timer period overflow +References: <20091009230836.316410305@mini.kroah.org> +Content-Disposition: inline; filename=kvm-fix-lapic-timer-period-overflow.patch +Content-Length: 853 +Lines: 28 + +2.6.31-stable review patch. If anyone has any objections, please let us know. + +------------------ +From: Aurelien Jarno + +commit b2d83cfa3fdefe5c6573d443d099a18dc3a93c5f upstream. + +Don't overflow when computing the 64-bit period from 32-bit registers. + +Fixes sourceforge bug #2826486. + +Signed-off-by: Aurelien Jarno +Signed-off-by: Marcelo Tosatti +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/kvm/lapic.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/x86/kvm/lapic.c ++++ b/arch/x86/kvm/lapic.c +@@ -567,7 +567,7 @@ static void start_apic_timer(struct kvm_ + { + ktime_t now = apic->lapic_timer.timer.base->get_time(); + +- apic->lapic_timer.period = apic_get_reg(apic, APIC_TMICT) * ++ apic->lapic_timer.period = (u64)apic_get_reg(apic, APIC_TMICT) * + APIC_BUS_CYCLE_NS * apic->divide_count; + atomic_set(&apic->lapic_timer.pending, 0); + + + +From gregkh@mini.kroah.org Fri Oct 9 16:10:02 2009 +Message-Id: <20091009231002.521034233@mini.kroah.org> +User-Agent: quilt/0.48-1 +Date: Fri, 09 Oct 2009 16:08:55 -0700 +From: Greg KH +To: linux-kernel@vger.kernel.org, + stable@kernel.org +Cc: stable-review@kernel.org, + torvalds@linux-foundation.org, + akpm@linux-foundation.org, + alan@lxorguk.ukuu.org.uk, + Joerg Roedel , + Marcelo Tosatti +Subject: [patch 19/26] KVM: SVM: Fix tsc offset adjustment when running nested +References: <20091009230836.316410305@mini.kroah.org> +Content-Disposition: inline; filename=kvm-svm-fix-tsc-offset-adjustment-when-running-nested.patch +Content-Length: 1006 +Lines: 31 + +2.6.31-stable review patch. If anyone has any objections, please let us know. + +------------------ +From: Joerg Roedel + +commit 77b1ab1732feb5e3dcbaf31d2f7547c5229f5f3a upstream. + +When svm_vcpu_load is called while the vcpu is running in +guest mode the tsc adjustment made there is lost on the next +emulated #vmexit. This causes the tsc running backwards in +the guest. This patch fixes the issue by also adjusting the +tsc_offset in the emulated hsave area so that it will not +get lost. + +Signed-off-by: Joerg Roedel +Signed-off-by: Marcelo Tosatti +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/kvm/svm.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/arch/x86/kvm/svm.c ++++ b/arch/x86/kvm/svm.c +@@ -709,6 +709,8 @@ static void svm_vcpu_load(struct kvm_vcp + rdtscll(tsc_this); + delta = vcpu->arch.host_tsc - tsc_this; + svm->vmcb->control.tsc_offset += delta; ++ if (is_nested(svm)) ++ svm->nested.hsave->control.tsc_offset += delta; + vcpu->cpu = cpu; + kvm_migrate_timers(vcpu); + svm->asid_generation = 0; + + +From gregkh@mini.kroah.org Fri Oct 9 16:10:02 2009 +Message-Id: <20091009231002.649026484@mini.kroah.org> +User-Agent: quilt/0.48-1 +Date: Fri, 09 Oct 2009 16:08:56 -0700 +From: Greg KH +To: linux-kernel@vger.kernel.org, + stable@kernel.org +Cc: stable-review@kernel.org, + torvalds@linux-foundation.org, + akpm@linux-foundation.org, + alan@lxorguk.ukuu.org.uk, + Jean Delvare , + Randy Dunlap , + "David S. Miller" +Subject: [patch 20/26] net: Fix wrong sizeof +References: <20091009230836.316410305@mini.kroah.org> +Content-Disposition: inline; filename=net-fix-wrong-sizeof.patch +Content-Length: 1437 +Lines: 40 + +2.6.31-stable review patch. If anyone has any objections, please let us know. + +------------------ +From: Jean Delvare + +commit b607bd900051efc3308c4edc65dd98b34b230021 upstream. + +Which is why I have always preferred sizeof(struct foo) over +sizeof(var). + +Signed-off-by: Jean Delvare +Acked-by: Randy Dunlap +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman + +--- + Documentation/networking/timestamping/timestamping.c | 2 +- + drivers/net/iseries_veth.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +--- a/Documentation/networking/timestamping/timestamping.c ++++ b/Documentation/networking/timestamping/timestamping.c +@@ -381,7 +381,7 @@ int main(int argc, char **argv) + memset(&hwtstamp, 0, sizeof(hwtstamp)); + strncpy(hwtstamp.ifr_name, interface, sizeof(hwtstamp.ifr_name)); + hwtstamp.ifr_data = (void *)&hwconfig; +- memset(&hwconfig, 0, sizeof(&hwconfig)); ++ memset(&hwconfig, 0, sizeof(hwconfig)); + hwconfig.tx_type = + (so_timestamping_flags & SOF_TIMESTAMPING_TX_HARDWARE) ? + HWTSTAMP_TX_ON : HWTSTAMP_TX_OFF; +--- a/drivers/net/iseries_veth.c ++++ b/drivers/net/iseries_veth.c +@@ -495,7 +495,7 @@ static void veth_take_cap_ack(struct vet + cnx->remote_lp); + } else { + memcpy(&cnx->cap_ack_event, event, +- sizeof(&cnx->cap_ack_event)); ++ sizeof(cnx->cap_ack_event)); + cnx->state |= VETH_STATE_GOTCAPACK; + veth_kick_statemachine(cnx); + } + + +From gregkh@mini.kroah.org Fri Oct 9 16:10:02 2009 +Message-Id: <20091009231002.768016040@mini.kroah.org> +User-Agent: quilt/0.48-1 +Date: Fri, 09 Oct 2009 16:08:57 -0700 +From: Greg KH +To: linux-kernel@vger.kernel.org, + stable@kernel.org +Cc: stable-review@kernel.org, + torvalds@linux-foundation.org, + akpm@linux-foundation.org, + alan@lxorguk.ukuu.org.uk, + Daisuke Nishimura , + KAMEZAWA Hiroyuki , + Balbir Singh , + Hugh Dickins , + Johannes Weiner +Subject: [patch 21/26] mm: add_to_swap_cache() must not sleep +References: <20091009230836.316410305@mini.kroah.org> +Content-Disposition: inline; filename=mm-add_to_swap_cache-must-not-sleep.patch +Content-Length: 4746 +Lines: 153 + +2.6.31-stable review patch. If anyone has any objections, please let us know. + +------------------ +From: Daisuke Nishimura + +commit 31a5639623a487d6db996c8138c9e53fef2e2d91 upstream. + +After commit 355cfa73 ("mm: modify swap_map and add SWAP_HAS_CACHE flag"), +read_swap_cache_async() will busy-wait while a entry doesn't exist in swap +cache but it has SWAP_HAS_CACHE flag. + +Such entries can exist on add/delete path of swap cache. On add path, +add_to_swap_cache() is called soon after SWAP_HAS_CACHE flag is set, and +on delete path, swapcache_free() will be called (SWAP_HAS_CACHE flag is +cleared) soon after __delete_from_swap_cache() is called. So, the +busy-wait works well in most cases. + +But this mechanism can cause soft lockup if add_to_swap_cache() sleeps and +read_swap_cache_async() tries to swap-in the same entry on the same cpu. + +This patch calls radix_tree_preload() before swapcache_prepare() and +divides add_to_swap_cache() into two part: radix_tree_preload() part and +radix_tree_insert() part(define it as __add_to_swap_cache()). + +Signed-off-by: Daisuke Nishimura +Cc: KAMEZAWA Hiroyuki +Cc: Balbir Singh +Cc: Hugh Dickins +Cc: Johannes Weiner +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + mm/swap_state.c | 70 ++++++++++++++++++++++++++++++++++++-------------------- + 1 file changed, 46 insertions(+), 24 deletions(-) + +--- a/mm/swap_state.c ++++ b/mm/swap_state.c +@@ -66,10 +66,10 @@ void show_swap_cache_info(void) + } + + /* +- * add_to_swap_cache resembles add_to_page_cache_locked on swapper_space, ++ * __add_to_swap_cache resembles add_to_page_cache_locked on swapper_space, + * but sets SwapCache flag and private instead of mapping and index. + */ +-int add_to_swap_cache(struct page *page, swp_entry_t entry, gfp_t gfp_mask) ++static int __add_to_swap_cache(struct page *page, swp_entry_t entry) + { + int error; + +@@ -77,28 +77,37 @@ int add_to_swap_cache(struct page *page, + VM_BUG_ON(PageSwapCache(page)); + VM_BUG_ON(!PageSwapBacked(page)); + ++ page_cache_get(page); ++ SetPageSwapCache(page); ++ set_page_private(page, entry.val); ++ ++ spin_lock_irq(&swapper_space.tree_lock); ++ error = radix_tree_insert(&swapper_space.page_tree, entry.val, page); ++ if (likely(!error)) { ++ total_swapcache_pages++; ++ __inc_zone_page_state(page, NR_FILE_PAGES); ++ INC_CACHE_INFO(add_total); ++ } ++ spin_unlock_irq(&swapper_space.tree_lock); ++ ++ if (unlikely(error)) { ++ set_page_private(page, 0UL); ++ ClearPageSwapCache(page); ++ page_cache_release(page); ++ } ++ ++ return error; ++} ++ ++ ++int add_to_swap_cache(struct page *page, swp_entry_t entry, gfp_t gfp_mask) ++{ ++ int error; ++ + error = radix_tree_preload(gfp_mask); + if (!error) { +- page_cache_get(page); +- SetPageSwapCache(page); +- set_page_private(page, entry.val); +- +- spin_lock_irq(&swapper_space.tree_lock); +- error = radix_tree_insert(&swapper_space.page_tree, +- entry.val, page); +- if (likely(!error)) { +- total_swapcache_pages++; +- __inc_zone_page_state(page, NR_FILE_PAGES); +- INC_CACHE_INFO(add_total); +- } +- spin_unlock_irq(&swapper_space.tree_lock); ++ error = __add_to_swap_cache(page, entry); + radix_tree_preload_end(); +- +- if (unlikely(error)) { +- set_page_private(page, 0UL); +- ClearPageSwapCache(page); +- page_cache_release(page); +- } + } + return error; + } +@@ -289,13 +298,24 @@ struct page *read_swap_cache_async(swp_e + } + + /* ++ * call radix_tree_preload() while we can wait. ++ */ ++ err = radix_tree_preload(gfp_mask & GFP_KERNEL); ++ if (err) ++ break; ++ ++ /* + * Swap entry may have been freed since our caller observed it. + */ + err = swapcache_prepare(entry); +- if (err == -EEXIST) /* seems racy */ ++ if (err == -EEXIST) { /* seems racy */ ++ radix_tree_preload_end(); + continue; +- if (err) /* swp entry is obsolete ? */ ++ } ++ if (err) { /* swp entry is obsolete ? */ ++ radix_tree_preload_end(); + break; ++ } + + /* + * Associate the page with swap entry in the swap cache. +@@ -307,8 +327,9 @@ struct page *read_swap_cache_async(swp_e + */ + __set_page_locked(new_page); + SetPageSwapBacked(new_page); +- err = add_to_swap_cache(new_page, entry, gfp_mask & GFP_KERNEL); ++ err = __add_to_swap_cache(new_page, entry); + if (likely(!err)) { ++ radix_tree_preload_end(); + /* + * Initiate read into locked page and return. + */ +@@ -316,6 +337,7 @@ struct page *read_swap_cache_async(swp_e + swap_readpage(new_page); + return new_page; + } ++ radix_tree_preload_end(); + ClearPageSwapBacked(new_page); + __clear_page_locked(new_page); + swapcache_free(entry, NULL); + + +From gregkh@mini.kroah.org Fri Oct 9 16:10:02 2009 +Message-Id: <20091009231002.869068404@mini.kroah.org> +User-Agent: quilt/0.48-1 +Date: Fri, 09 Oct 2009 16:08:58 -0700 +From: Greg KH +To: linux-kernel@vger.kernel.org, + stable@kernel.org +Cc: stable-review@kernel.org, + torvalds@linux-foundation.org, + akpm@linux-foundation.org, + alan@lxorguk.ukuu.org.uk, + Bartlomiej Zolnierkiewicz , + "David S. Miller" +Subject: [patch 22/26] sis5513: fix PIO setup for ATAPI devices +References: <20091009230836.316410305@mini.kroah.org> +Content-Disposition: inline; filename=sis5513-fix-pio-setup-for-atapi-devices.patch +Content-Length: 1869 +Lines: 52 + +2.6.31-stable review patch. If anyone has any objections, please let us know. + +------------------ +From: Bartlomiej Zolnierkiewicz + +commit e13ee546bb06453939014c7b854e77fb643fd6f1 upstream. + +Clear prefetch setting before potentially (re-)enabling it in +config_drive_art_rwp() so the transition of the device type on +the port from ATA to ATAPI (i.e. during warm-plug operation) +is handled correctly. + +This is a really old bug (it probably goes back to very early +days of the driver) but it was only affecting warm-plug operation +until the recent "ide: try to use PIO Mode 0 during probe if +possible" change (commit 6029336426a2b43e4bc6f4a84be8789a047d139e). + +Signed-off-by: Bartlomiej Zolnierkiewicz +Tested-by: David Fries +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/ide/sis5513.c | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) + +--- a/drivers/ide/sis5513.c ++++ b/drivers/ide/sis5513.c +@@ -2,7 +2,7 @@ + * Copyright (C) 1999-2000 Andre Hedrick + * Copyright (C) 2002 Lionel Bouton , Maintainer + * Copyright (C) 2003 Vojtech Pavlik +- * Copyright (C) 2007 Bartlomiej Zolnierkiewicz ++ * Copyright (C) 2007-2009 Bartlomiej Zolnierkiewicz + * + * May be copied or modified under the terms of the GNU General Public License + * +@@ -281,11 +281,13 @@ static void config_drive_art_rwp(ide_dri + + pci_read_config_byte(dev, 0x4b, ®4bh); + ++ rw_prefetch = reg4bh & ~(0x11 << drive->dn); ++ + if (drive->media == ide_disk) +- rw_prefetch = 0x11 << drive->dn; ++ rw_prefetch |= 0x11 << drive->dn; + +- if ((reg4bh & (0x11 << drive->dn)) != rw_prefetch) +- pci_write_config_byte(dev, 0x4b, reg4bh|rw_prefetch); ++ if (reg4bh != rw_prefetch) ++ pci_write_config_byte(dev, 0x4b, rw_prefetch); + } + + static void sis_set_pio_mode(ide_drive_t *drive, const u8 pio) + + +From gregkh@mini.kroah.org Fri Oct 9 16:10:03 2009 +Message-Id: <20091009231003.021053997@mini.kroah.org> +User-Agent: quilt/0.48-1 +Date: Fri, 09 Oct 2009 16:08:59 -0700 +From: Greg KH +To: linux-kernel@vger.kernel.org, + stable@kernel.org +Cc: stable-review@kernel.org, + torvalds@linux-foundation.org, + akpm@linux-foundation.org, + alan@lxorguk.ukuu.org.uk, + Thomas Gleixner , + linux@rainbow-software.org, + John Stultz +Subject: [patch 23/26] PIT fixes to unbreak suspend/resume (bug #14222) +References: <20091009230836.316410305@mini.kroah.org> +Content-Disposition: inline; filename=pit-fixes-to-unbreak-suspend-resume.patch +Content-Length: 3229 +Lines: 115 + +2.6.31-stable review patch. If anyone has any objections, please let us know. + +------------------ +From: john stultz + +Resolved differently upstream in commit 8cab02dc3c58a12235c6d463ce684dded9696848 + +Ondrej Zary reported a suspend/resume hang with 2.6.31 in bug #14222. + +http://bugzilla.kernel.org/show_bug.cgi?id=14222 + +The hang was bisected to c7121843685de2bf7f3afd3ae1d6a146010bf1fc +however, that was really just the last straw that caused the issue. + +The problem was that on suspend, the PIT is removed as a clocksource, +and was using the mult value essentially as a is_enabled() flag. The +mult adjustments done in the commit above caused that usage to break, +causing bad list manipulation and the oops. + +Further, on resume, the PIT clocksource is never restored, causing the +system to run in a degraded mode with jiffies as the clocksource. + +This issue has since been resolved in 2.6.32-rc by commit +8cab02dc3c58a12235c6d463ce684dded9696848 which removes the clocksource +disabling on suspend. Testing shows no issues there. + +So the following patch rectifies the situation for 2.6.31 users of the +PIT clocksource that use suspend and resume (which is probably not that +many). + +Many thanks to Ondrej for helping narrow down what was happening, what +caused it, and verifying the fix. + +--------------- + +Avoid using the unprotected clocksource.mult value as an "is_registered" +flag, instead us an explicit flag variable. This avoids possible list +corruption if the clocksource is double-unregistered. + +Also re-register the PIT clocksource on resume so folks don't have to +use jiffies after suspend. + + +Signed-off-by: John Stultz +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/kernel/i8253.c | 27 ++++++++++++++++++++------- + 1 file changed, 20 insertions(+), 7 deletions(-) + +--- a/arch/x86/kernel/i8253.c ++++ b/arch/x86/kernel/i8253.c +@@ -21,8 +21,10 @@ EXPORT_SYMBOL(i8253_lock); + + #ifdef CONFIG_X86_32 + static void pit_disable_clocksource(void); ++static void pit_enable_clocksource(void); + #else + static inline void pit_disable_clocksource(void) { } ++static inline void pit_enable_clocksource(void) { } + #endif + + /* +@@ -67,7 +69,7 @@ static void init_pit_timer(enum clock_ev + break; + + case CLOCK_EVT_MODE_RESUME: +- /* Nothing to do here */ ++ pit_enable_clocksource(); + break; + } + spin_unlock(&i8253_lock); +@@ -200,19 +202,27 @@ static struct clocksource pit_cs = { + .shift = 20, + }; + ++int pit_cs_registered; + static void pit_disable_clocksource(void) + { +- /* +- * Use mult to check whether it is registered or not +- */ +- if (pit_cs.mult) { ++ if (pit_cs_registered) { + clocksource_unregister(&pit_cs); +- pit_cs.mult = 0; ++ pit_cs_registered = 0; ++ } ++} ++ ++static void pit_enable_clocksource(void) ++{ ++ if (!pit_cs_registered && !clocksource_register(&pit_cs)) { ++ pit_cs_registered = 1; + } + } + ++ ++ + static int __init init_pit_clocksource(void) + { ++ int ret; + /* + * Several reasons not to register PIT as a clocksource: + * +@@ -226,7 +236,10 @@ static int __init init_pit_clocksource(v + + pit_cs.mult = clocksource_hz2mult(CLOCK_TICK_RATE, pit_cs.shift); + +- return clocksource_register(&pit_cs); ++ ret = clocksource_register(&pit_cs); ++ if (!ret) ++ pit_cs_registered = 1; ++ return ret; + } + arch_initcall(init_pit_clocksource); + + + +From gregkh@mini.kroah.org Fri Oct 9 16:10:03 2009 +Message-Id: <20091009231003.148054572@mini.kroah.org> +User-Agent: quilt/0.48-1 +Date: Fri, 09 Oct 2009 16:09:00 -0700 +From: Greg KH +To: linux-kernel@vger.kernel.org, + stable@kernel.org +Cc: stable-review@kernel.org, + torvalds@linux-foundation.org, + akpm@linux-foundation.org, + alan@lxorguk.ukuu.org.uk, + Mimi Zohar , + James Morris +Subject: [patch 24/26] IMA: open new file for read +References: <20091009230836.316410305@mini.kroah.org> +Content-Disposition: inline; filename=ima-open-new-file-for-read.patch +Content-Length: 906 +Lines: 30 + +2.6.31-stable review patch. If anyone has any objections, please let us know. + +------------------ +From: Mimi Zohar + +commit 6c1488fd581a447ec87c4b59f0d33f95f0aa441b upstream. + +When creating a new file, ima_path_check() assumed the new file +was being opened for write. Call ima_path_check() with the +appropriate acc_mode so that the read/write counters are +incremented correctly. + +Signed-off-by: Mimi Zohar +Signed-off-by: James Morris +Signed-off-by: Greg Kroah-Hartman + +--- a/fs/namei.c ++++ b/fs/namei.c +@@ -1533,9 +1533,11 @@ int may_open(struct path *path, int acc_mode, int flag) + if (error) + return error; + +- error = ima_path_check(path, +- acc_mode & (MAY_READ | MAY_WRITE | MAY_EXEC), ++ error = ima_path_check(path, acc_mode ? ++ acc_mode & (MAY_READ | MAY_WRITE | MAY_EXEC) : ++ ACC_MODE(flag) & (MAY_READ | MAY_WRITE), + IMA_COUNT_UPDATE); ++ + if (error) + return error; + /* + + +From gregkh@mini.kroah.org Fri Oct 9 16:10:03 2009 +Message-Id: <20091009231003.272029049@mini.kroah.org> +User-Agent: quilt/0.48-1 +Date: Fri, 09 Oct 2009 16:09:01 -0700 +From: Greg KH +To: linux-kernel@vger.kernel.org, + stable@kernel.org +Cc: stable-review@kernel.org, + torvalds@linux-foundation.org, + akpm@linux-foundation.org, + alan@lxorguk.ukuu.org.uk, + Jean Delvare , + Thomas Renninger , + Alan Jenkins , + Len Brown +Subject: [patch 25/26] ACPI: Clarify resource conflict message +References: <20091009230836.316410305@mini.kroah.org> +Content-Disposition: inline; filename=acpi-clarify-resource-conflict-message.patch +Content-Length: 1820 +Lines: 49 + +2.6.31-stable review patch. If anyone has any objections, please let us know. + +------------------ +From: Jean Delvare + +commit 14f03343ad1080c2fea29ab2c13f05b976c4584e upstream. + +The message "ACPI: Device needs an ACPI driver" is misleading. The +device _may_ need an ACPI driver, if the BIOS implemented a custom +API for the device in question (which, AFAIK, can't be checked.) If +not, then either a generic ACPI driver may be used (for example +"thermal"), or nothing can be done (other than a white list). + +I propose to reword the message to: + +ACPI: If an ACPI driver is available for this device, you should use +it instead of the native driver + +which I think is more correct. Comments and suggestions welcome. + +I also added a message warning about possible problems and system +instability when users pass acpi_enforce_resources=lax, as suggested +by Len. + +Signed-off-by: Jean Delvare +Cc: Thomas Renninger +Cc: Alan Jenkins +Signed-off-by: Len Brown +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/acpi/osl.c | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +--- a/drivers/acpi/osl.c ++++ b/drivers/acpi/osl.c +@@ -1182,7 +1182,13 @@ int acpi_check_resource_conflict(struct + res_list_elem->name, + (long long) res_list_elem->start, + (long long) res_list_elem->end); +- printk(KERN_INFO "ACPI: Device needs an ACPI driver\n"); ++ if (acpi_enforce_resources == ENFORCE_RESOURCES_LAX) ++ printk(KERN_NOTICE "ACPI: This conflict may" ++ " cause random problems and system" ++ " instability\n"); ++ printk(KERN_INFO "ACPI: If an ACPI driver is available" ++ " for this device, you should use it instead of" ++ " the native driver\n"); + } + if (acpi_enforce_resources == ENFORCE_RESOURCES_STRICT) + return -EBUSY; + + +From gregkh@mini.kroah.org Fri Oct 9 16:10:03 2009 +Message-Id: <20091009231003.396030841@mini.kroah.org> +User-Agent: quilt/0.48-1 +Date: Fri, 09 Oct 2009 16:09:02 -0700 +From: Greg KH +To: linux-kernel@vger.kernel.org, + stable@kernel.org +Cc: stable-review@kernel.org, + torvalds@linux-foundation.org, + akpm@linux-foundation.org, + alan@lxorguk.ukuu.org.uk, + Zhao Yakui , + Len Brown +Subject: [patch 26/26] ACPI: fix Compaq Evo N800c (Pentium 4m) boot hang regression +References: <20091009230836.316410305@mini.kroah.org> +Content-Disposition: inline; filename=acpi-fix-compaq-evo-n800c-boot-hang-regression.patch +Content-Length: 949 +Lines: 31 + +2.6.31-stable review patch. If anyone has any objections, please let us know. + +------------------ +From: Zhao Yakui + +commit 3e2ada5867b7e9fa0b296d30fa8f3726ebd0a8b7 upstream. + +Don't disable ARB_DISABLE when the familary ID is 0x0F. + +http://bugzilla.kernel.org/show_bug.cgi?id=14211 + +This was a 2.6.31 regression, and so this patch +needs to be applied to 2.6.31.stable + +Signed-off-by: Zhao Yakui +Signed-off-by: Len Brown +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/kernel/acpi/cstate.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/x86/kernel/acpi/cstate.c ++++ b/arch/x86/kernel/acpi/cstate.c +@@ -48,7 +48,7 @@ void acpi_processor_power_init_bm_check( + * P4, Core and beyond CPUs + */ + if (c->x86_vendor == X86_VENDOR_INTEL && +- (c->x86 > 0x6 || (c->x86 == 6 && c->x86_model >= 14))) ++ (c->x86 > 0xf || (c->x86 == 6 && c->x86_model >= 14))) + flags->bm_control = 0; + } + EXPORT_SYMBOL(acpi_processor_power_init_bm_check); + + +From gregkh@mini.kroah.org Fri Oct 9 16:10:00 2009 +Message-Id: <20091009230836.316410305@mini.kroah.org> +User-Agent: quilt/0.48-1 +Date: Fri, 09 Oct 2009 16:08:36 -0700 +From: Greg KH +To: linux-kernel@vger.kernel.org, + stable@kernel.org +Cc: stable-review@kernel.org, + torvalds@linux-foundation.org, + akpm@linux-foundation.org, + alan@lxorguk.ukuu.org.uk +Subject: [patch 00/26] 2.6.31.4-stable review +Status: RO +Content-Length: 2452 +Lines: 48 + +This is the start of the stable review cycle for the 2.6.31.4 release. +There are 26 patches in this series, all will be posted as a response to +this one. If anyone has any issues with these being applied, please let +us know. If anyone is a maintainer of the proper subsystem, and wants +to add a Signed-off-by: line to the patch, please respond with it. + +Responses should be made by Sunday October 11, 23:00:00 UTC. +Anything received after that time might be too late. + +The whole patch series can be found in one patch at: + kernel.org/pub/linux/kernel/v2.6/stable-review/patch-2.6.31.4-rc1.gz +and the diffstat can be found below. + + +thanks, + +greg k-h + +----------- + + .../networking/timestamping/timestamping.c | 2 +- + Makefile | 2 +- + arch/x86/ia32/ia32entry.S | 36 +++++++---- + arch/x86/include/asm/checksum_32.h | 3 +- + arch/x86/kernel/acpi/cstate.c | 2 +- + arch/x86/kernel/i8253.c | 27 ++++++-- + arch/x86/kvm/lapic.c | 2 +- + arch/x86/kvm/svm.c | 2 + + arch/x86/kvm/vmx.c | 2 +- + arch/x86/kvm/x86.c | 2 + + drivers/acpi/osl.c | 8 ++- + drivers/ata/libata-eh.c | 50 +++++++++----- + drivers/char/tty_ldisc.c | 7 +-- + drivers/ide/sis5513.c | 10 ++- + drivers/net/iseries_veth.c | 2 +- + fs/ecryptfs/main.c | 7 ++- + fs/namei.c | 6 +- + include/linux/ftrace.h | 2 +- + kernel/exit.c | 2 - + kernel/fork.c | 10 ++- + kernel/futex.c | 3 +- + kernel/time/tick-sched.c | 9 ++- + kernel/trace/ftrace.c | 23 ++----- + mm/swap_state.c | 70 +++++++++++++------- + sound/pci/hda/patch_realtek.c | 1 + + sound/pci/via82xx.c | 27 +++++--- + sound/soc/codecs/wm8350.c | 4 +- + 27 files changed, 203 insertions(+), 118 deletions(-) + diff --git a/queue-2.6.31/mm-add_to_swap_cache-must-not-sleep.patch b/review-2.6.31/mm-add_to_swap_cache-must-not-sleep.patch similarity index 100% rename from queue-2.6.31/mm-add_to_swap_cache-must-not-sleep.patch rename to review-2.6.31/mm-add_to_swap_cache-must-not-sleep.patch diff --git a/queue-2.6.31/net-fix-wrong-sizeof.patch b/review-2.6.31/net-fix-wrong-sizeof.patch similarity index 100% rename from queue-2.6.31/net-fix-wrong-sizeof.patch rename to review-2.6.31/net-fix-wrong-sizeof.patch diff --git a/queue-2.6.31/nohz-update-idle-state-also-when-nohz-is-inactive.patch b/review-2.6.31/nohz-update-idle-state-also-when-nohz-is-inactive.patch similarity index 100% rename from queue-2.6.31/nohz-update-idle-state-also-when-nohz-is-inactive.patch rename to review-2.6.31/nohz-update-idle-state-also-when-nohz-is-inactive.patch diff --git a/queue-2.6.31/pit-fixes-to-unbreak-suspend-resume.patch b/review-2.6.31/pit-fixes-to-unbreak-suspend-resume.patch similarity index 100% rename from queue-2.6.31/pit-fixes-to-unbreak-suspend-resume.patch rename to review-2.6.31/pit-fixes-to-unbreak-suspend-resume.patch diff --git a/queue-2.6.31/series b/review-2.6.31/series similarity index 100% rename from queue-2.6.31/series rename to review-2.6.31/series diff --git a/queue-2.6.31/sis5513-fix-pio-setup-for-atapi-devices.patch b/review-2.6.31/sis5513-fix-pio-setup-for-atapi-devices.patch similarity index 100% rename from queue-2.6.31/sis5513-fix-pio-setup-for-atapi-devices.patch rename to review-2.6.31/sis5513-fix-pio-setup-for-atapi-devices.patch diff --git a/queue-2.6.31/sound-via82xx-move-dxs-volume-controls-to-pcm-interface.patch b/review-2.6.31/sound-via82xx-move-dxs-volume-controls-to-pcm-interface.patch similarity index 100% rename from queue-2.6.31/sound-via82xx-move-dxs-volume-controls-to-pcm-interface.patch rename to review-2.6.31/sound-via82xx-move-dxs-volume-controls-to-pcm-interface.patch diff --git a/queue-2.6.31/tracing-correct-module-boundaries-for-ftrace_release.patch b/review-2.6.31/tracing-correct-module-boundaries-for-ftrace_release.patch similarity index 100% rename from queue-2.6.31/tracing-correct-module-boundaries-for-ftrace_release.patch rename to review-2.6.31/tracing-correct-module-boundaries-for-ftrace_release.patch diff --git a/queue-2.6.31/tty-avoid-dropping-ldisc_mutex-over-hangup-tty-re-initialization.patch b/review-2.6.31/tty-avoid-dropping-ldisc_mutex-over-hangup-tty-re-initialization.patch similarity index 100% rename from queue-2.6.31/tty-avoid-dropping-ldisc_mutex-over-hangup-tty-re-initialization.patch rename to review-2.6.31/tty-avoid-dropping-ldisc_mutex-over-hangup-tty-re-initialization.patch diff --git a/queue-2.6.31/x86-don-t-leak-64-bit-kernel-register-values-to-32-bit-processes.patch b/review-2.6.31/x86-don-t-leak-64-bit-kernel-register-values-to-32-bit-processes.patch similarity index 100% rename from queue-2.6.31/x86-don-t-leak-64-bit-kernel-register-values-to-32-bit-processes.patch rename to review-2.6.31/x86-don-t-leak-64-bit-kernel-register-values-to-32-bit-processes.patch diff --git a/queue-2.6.31/x86-fix-csum_ipv6_magic-asm-memory-clobber.patch b/review-2.6.31/x86-fix-csum_ipv6_magic-asm-memory-clobber.patch similarity index 100% rename from queue-2.6.31/x86-fix-csum_ipv6_magic-asm-memory-clobber.patch rename to review-2.6.31/x86-fix-csum_ipv6_magic-asm-memory-clobber.patch -- 2.47.3