]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.10-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 2 May 2015 14:20:52 +0000 (16:20 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 2 May 2015 14:20:52 +0000 (16:20 +0200)
added patches:
arm64-kernel-compiling-issue-need-delete.patch
console-disable-vga-text-console-support-on-cris.patch
drivers-parport-kconfig-exclude-h8300-for-parport_pc.patch
ext4-make-fsync-to-sync-parent-dir-in-no-journal-for-real-this-time.patch
fs-binfmt_elf.c-fix-bug-in-loading-of-pie-binaries.patch
input-elantech-fix-absolute-mode-setting-on-some-asus-laptops.patch
parport-disable-pc-style-parallel-port-support-on-cris.patch
ptrace-fix-race-between-ptrace_resume-and-wait_task_stopped.patch
rtlwifi-rtl8192cu-add-new-device-id.patch
rtlwifi-rtl8192cu-add-new-usb-id.patch
video-vgacon-don-t-build-on-arm64.patch

12 files changed:
queue-3.10/arm64-kernel-compiling-issue-need-delete.patch [new file with mode: 0644]
queue-3.10/console-disable-vga-text-console-support-on-cris.patch [new file with mode: 0644]
queue-3.10/drivers-parport-kconfig-exclude-h8300-for-parport_pc.patch [new file with mode: 0644]
queue-3.10/ext4-make-fsync-to-sync-parent-dir-in-no-journal-for-real-this-time.patch [new file with mode: 0644]
queue-3.10/fs-binfmt_elf.c-fix-bug-in-loading-of-pie-binaries.patch [new file with mode: 0644]
queue-3.10/input-elantech-fix-absolute-mode-setting-on-some-asus-laptops.patch [new file with mode: 0644]
queue-3.10/parport-disable-pc-style-parallel-port-support-on-cris.patch [new file with mode: 0644]
queue-3.10/ptrace-fix-race-between-ptrace_resume-and-wait_task_stopped.patch [new file with mode: 0644]
queue-3.10/rtlwifi-rtl8192cu-add-new-device-id.patch [new file with mode: 0644]
queue-3.10/rtlwifi-rtl8192cu-add-new-usb-id.patch [new file with mode: 0644]
queue-3.10/series
queue-3.10/video-vgacon-don-t-build-on-arm64.patch [new file with mode: 0644]

diff --git a/queue-3.10/arm64-kernel-compiling-issue-need-delete.patch b/queue-3.10/arm64-kernel-compiling-issue-need-delete.patch
new file mode 100644 (file)
index 0000000..039bd6e
--- /dev/null
@@ -0,0 +1,66 @@
+From 6916b14ea140ff5c915895eefe9431888a39a84d Mon Sep 17 00:00:00 2001
+From: Chen Gang <gang.chen@asianux.com>
+Date: Tue, 21 May 2013 10:46:05 +0100
+Subject: arm64: kernel: compiling issue, need delete
+ read_current_timer()
+
+From: Chen Gang <gang.chen@asianux.com>
+
+commit 6916b14ea140ff5c915895eefe9431888a39a84d upstream.
+
+Under arm64, we will calibrate the delay loop statically using a known
+timer frequency, so delete read_current_timer(), or it will cause
+compiling issue with allmodconfig.
+
+The related error:
+  ERROR: "read_current_timer" [lib/rbtree_test.ko] undefined!
+  ERROR: "read_current_timer" [lib/interval_tree_test.ko] undefined!
+  ERROR: "read_current_timer" [fs/ext4/ext4.ko] undefined!
+  ERROR: "read_current_timer" [crypto/tcrypt.ko] undefined!
+
+Signed-off-by: Chen Gang <gang.chen@asianux.com>
+Acked-by: Marc Zyngier <marc.zyngier@arm.com>
+Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
+Cc: Guenter Roeck <linux@roeck-us.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm64/include/asm/timex.h |    6 +++---
+ arch/arm64/kernel/time.c       |    6 ------
+ 2 files changed, 3 insertions(+), 9 deletions(-)
+
+--- a/arch/arm64/include/asm/timex.h
++++ b/arch/arm64/include/asm/timex.h
+@@ -16,14 +16,14 @@
+ #ifndef __ASM_TIMEX_H
+ #define __ASM_TIMEX_H
++#include <asm/arch_timer.h>
++
+ /*
+  * Use the current timer as a cycle counter since this is what we use for
+  * the delay loop.
+  */
+-#define get_cycles()  ({ cycles_t c; read_current_timer(&c); c; })
++#define get_cycles()  arch_counter_get_cntvct()
+ #include <asm-generic/timex.h>
+-#define ARCH_HAS_READ_CURRENT_TIMER
+-
+ #endif
+--- a/arch/arm64/kernel/time.c
++++ b/arch/arm64/kernel/time.c
+@@ -68,12 +68,6 @@ unsigned long long notrace sched_clock(v
+       return arch_timer_read_counter() * sched_clock_mult;
+ }
+-int read_current_timer(unsigned long *timer_value)
+-{
+-      *timer_value = arch_timer_read_counter();
+-      return 0;
+-}
+-
+ void __init time_init(void)
+ {
+       u32 arch_timer_rate;
diff --git a/queue-3.10/console-disable-vga-text-console-support-on-cris.patch b/queue-3.10/console-disable-vga-text-console-support-on-cris.patch
new file mode 100644 (file)
index 0000000..0e72c19
--- /dev/null
@@ -0,0 +1,30 @@
+From 3535629264e69ddbec0bd44b6f9a119947fbe4e2 Mon Sep 17 00:00:00 2001
+From: Geert Uytterhoeven <geert@linux-m68k.org>
+Date: Fri, 17 May 2013 11:04:44 +0200
+Subject: console: Disable VGA text console support on cris
+
+From: Geert Uytterhoeven <geert@linux-m68k.org>
+
+commit 3535629264e69ddbec0bd44b6f9a119947fbe4e2 upstream.
+
+Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
+Cc: Guenter Roeck <linux@roeck-us.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/video/console/Kconfig |    4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/drivers/video/console/Kconfig
++++ b/drivers/video/console/Kconfig
+@@ -6,7 +6,9 @@ menu "Console display driver support"
+ config VGA_CONSOLE
+       bool "VGA text console" if EXPERT || !X86
+-      depends on !4xx && !8xx && !SPARC && !M68K && !PARISC && !FRV && !SUPERH && !BLACKFIN && !AVR32 && !MN10300 && (!ARM || ARCH_FOOTBRIDGE || ARCH_INTEGRATOR || ARCH_NETWINDER)
++      depends on !4xx && !8xx && !SPARC && !M68K && !PARISC && !FRV && \
++              !SUPERH && !BLACKFIN && !AVR32 && !MN10300 && !CRIS && \
++              (!ARM || ARCH_FOOTBRIDGE || ARCH_INTEGRATOR || ARCH_NETWINDER)
+       default y
+       help
+         Saying Y here will allow you to use Linux in text mode through a
diff --git a/queue-3.10/drivers-parport-kconfig-exclude-h8300-for-parport_pc.patch b/queue-3.10/drivers-parport-kconfig-exclude-h8300-for-parport_pc.patch
new file mode 100644 (file)
index 0000000..8b1e491
--- /dev/null
@@ -0,0 +1,35 @@
+From d94bb2d756e525a7c67fa71762227533d48b03c9 Mon Sep 17 00:00:00 2001
+From: Chen Gang <gang.chen@asianux.com>
+Date: Fri, 30 Aug 2013 12:09:57 +0800
+Subject: drivers: parport: Kconfig: exclude h8300 for PARPORT_PC
+
+From: Chen Gang <gang.chen@asianux.com>
+
+commit d94bb2d756e525a7c67fa71762227533d48b03c9 upstream.
+
+h8300 does not support PARPORT_PC.
+
+The related error (with allmodconfig for h8300):
+
+    CC [M]  drivers/parport/parport_pc.o
+  drivers/parport/parport_pc.c:67:25: fatal error: asm/parport.h: No such file or directory
+
+Signed-off-by: Chen Gang <gang.chen@asianux.com>
+Cc: Guenter Roeck <linux@roeck-us.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/parport/Kconfig |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/parport/Kconfig
++++ b/drivers/parport/Kconfig
+@@ -37,7 +37,7 @@ config PARPORT_PC
+       tristate "PC-style hardware"
+       depends on (!SPARC64 || PCI) && !SPARC32 && !M32R && !FRV && !S390 && \
+               (!M68K || ISA) && !MN10300 && !AVR32 && !BLACKFIN && \
+-              !XTENSA && !CRIS
++              !XTENSA && !CRIS && !H8300
+       ---help---
+         You should say Y here if you have a PC-style parallel port. All
diff --git a/queue-3.10/ext4-make-fsync-to-sync-parent-dir-in-no-journal-for-real-this-time.patch b/queue-3.10/ext4-make-fsync-to-sync-parent-dir-in-no-journal-for-real-this-time.patch
new file mode 100644 (file)
index 0000000..9241fc3
--- /dev/null
@@ -0,0 +1,101 @@
+From e12fb97222fc41e8442896934f76d39ef99b590a Mon Sep 17 00:00:00 2001
+From: Lukas Czerner <lczerner@redhat.com>
+Date: Fri, 3 Apr 2015 10:46:58 -0400
+Subject: ext4: make fsync to sync parent dir in no-journal for real this time
+
+From: Lukas Czerner <lczerner@redhat.com>
+
+commit e12fb97222fc41e8442896934f76d39ef99b590a upstream.
+
+Previously commit 14ece1028b3ed53ffec1b1213ffc6acaf79ad77c added a
+support for for syncing parent directory of newly created inodes to
+make sure that the inode is not lost after a power failure in
+no-journal mode.
+
+However this does not work in majority of cases, namely:
+ - if the directory has inline data
+ - if the directory is already indexed
+ - if the directory already has at least one block and:
+       - the new entry fits into it
+       - or we've successfully converted it to indexed
+
+So in those cases we might lose the inode entirely even after fsync in
+the no-journal mode. This also includes ext2 default mode obviously.
+
+I've noticed this while running xfstest generic/321 and even though the
+test should fail (we need to run fsck after a crash in no-journal mode)
+I could not find a newly created entries even when if it was fsynced
+before.
+
+Fix this by adjusting the ext4_add_entry() successful exit paths to set
+the inode EXT4_STATE_NEWENTRY so that fsync has the chance to fsync the
+parent directory as well.
+
+Signed-off-by: Lukas Czerner <lczerner@redhat.com>
+Signed-off-by: Theodore Ts'o <tytso@mit.edu>
+Reviewed-by: Jan Kara <jack@suse.cz>
+Cc: Frank Mayhar <fmayhar@google.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/ext4/namei.c |   20 +++++++++++---------
+ 1 file changed, 11 insertions(+), 9 deletions(-)
+
+--- a/fs/ext4/namei.c
++++ b/fs/ext4/namei.c
+@@ -1880,7 +1880,7 @@ static int ext4_add_entry(handle_t *hand
+                         struct inode *inode)
+ {
+       struct inode *dir = dentry->d_parent->d_inode;
+-      struct buffer_head *bh;
++      struct buffer_head *bh = NULL;
+       struct ext4_dir_entry_2 *de;
+       struct ext4_dir_entry_tail *t;
+       struct super_block *sb;
+@@ -1905,14 +1905,14 @@ static int ext4_add_entry(handle_t *hand
+                       return retval;
+               if (retval == 1) {
+                       retval = 0;
+-                      return retval;
++                      goto out;
+               }
+       }
+       if (is_dx(dir)) {
+               retval = ext4_dx_add_entry(handle, dentry, inode);
+               if (!retval || (retval != ERR_BAD_DX_DIR))
+-                      return retval;
++                      goto out;
+               ext4_clear_inode_flag(dir, EXT4_INODE_INDEX);
+               dx_fallback++;
+               ext4_mark_inode_dirty(handle, dir);
+@@ -1924,14 +1924,15 @@ static int ext4_add_entry(handle_t *hand
+                       return PTR_ERR(bh);
+               retval = add_dirent_to_buf(handle, dentry, inode, NULL, bh);
+-              if (retval != -ENOSPC) {
+-                      brelse(bh);
+-                      return retval;
+-              }
++              if (retval != -ENOSPC)
++                      goto out;
+               if (blocks == 1 && !dx_fallback &&
+-                  EXT4_HAS_COMPAT_FEATURE(sb, EXT4_FEATURE_COMPAT_DIR_INDEX))
+-                      return make_indexed_dir(handle, dentry, inode, bh);
++                  EXT4_HAS_COMPAT_FEATURE(sb, EXT4_FEATURE_COMPAT_DIR_INDEX)) {
++                      retval = make_indexed_dir(handle, dentry, inode, bh);
++                      bh = NULL; /* make_indexed_dir releases bh */
++                      goto out;
++              }
+               brelse(bh);
+       }
+       bh = ext4_append(handle, dir, &block);
+@@ -1947,6 +1948,7 @@ static int ext4_add_entry(handle_t *hand
+       }
+       retval = add_dirent_to_buf(handle, dentry, inode, de, bh);
++out:
+       brelse(bh);
+       if (retval == 0)
+               ext4_set_inode_state(inode, EXT4_STATE_NEWENTRY);
diff --git a/queue-3.10/fs-binfmt_elf.c-fix-bug-in-loading-of-pie-binaries.patch b/queue-3.10/fs-binfmt_elf.c-fix-bug-in-loading-of-pie-binaries.patch
new file mode 100644 (file)
index 0000000..e6b3d30
--- /dev/null
@@ -0,0 +1,72 @@
+From a87938b2e246b81b4fb713edb371a9fa3c5c3c86 Mon Sep 17 00:00:00 2001
+From: Michael Davidson <md@google.com>
+Date: Tue, 14 Apr 2015 15:47:38 -0700
+Subject: fs/binfmt_elf.c: fix bug in loading of PIE binaries
+
+From: Michael Davidson <md@google.com>
+
+commit a87938b2e246b81b4fb713edb371a9fa3c5c3c86 upstream.
+
+With CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE enabled, and a normal top-down
+address allocation strategy, load_elf_binary() will attempt to map a PIE
+binary into an address range immediately below mm->mmap_base.
+
+Unfortunately, load_elf_ binary() does not take account of the need to
+allocate sufficient space for the entire binary which means that, while
+the first PT_LOAD segment is mapped below mm->mmap_base, the subsequent
+PT_LOAD segment(s) end up being mapped above mm->mmap_base into the are
+that is supposed to be the "gap" between the stack and the binary.
+
+Since the size of the "gap" on x86_64 is only guaranteed to be 128MB this
+means that binaries with large data segments > 128MB can end up mapping
+part of their data segment over their stack resulting in corruption of the
+stack (and the data segment once the binary starts to run).
+
+Any PIE binary with a data segment > 128MB is vulnerable to this although
+address randomization means that the actual gap between the stack and the
+end of the binary is normally greater than 128MB.  The larger the data
+segment of the binary the higher the probability of failure.
+
+Fix this by calculating the total size of the binary in the same way as
+load_elf_interp().
+
+Signed-off-by: Michael Davidson <md@google.com>
+Cc: Alexander Viro <viro@zeniv.linux.org.uk>
+Cc: Jiri Kosina <jkosina@suse.cz>
+Cc: Kees Cook <keescook@chromium.org>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/binfmt_elf.c |    9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+--- a/fs/binfmt_elf.c
++++ b/fs/binfmt_elf.c
+@@ -756,6 +756,7 @@ static int load_elf_binary(struct linux_
+           i < loc->elf_ex.e_phnum; i++, elf_ppnt++) {
+               int elf_prot = 0, elf_flags;
+               unsigned long k, vaddr;
++              unsigned long total_size = 0;
+               if (elf_ppnt->p_type != PT_LOAD)
+                       continue;
+@@ -820,10 +821,16 @@ static int load_elf_binary(struct linux_
+ #else
+                       load_bias = ELF_PAGESTART(ELF_ET_DYN_BASE - vaddr);
+ #endif
++                      total_size = total_mapping_size(elf_phdata,
++                                                      loc->elf_ex.e_phnum);
++                      if (!total_size) {
++                              error = -EINVAL;
++                              goto out_free_dentry;
++                      }
+               }
+               error = elf_map(bprm->file, load_bias + vaddr, elf_ppnt,
+-                              elf_prot, elf_flags, 0);
++                              elf_prot, elf_flags, total_size);
+               if (BAD_ADDR(error)) {
+                       send_sig(SIGKILL, current, 0);
+                       retval = IS_ERR((void *)error) ?
diff --git a/queue-3.10/input-elantech-fix-absolute-mode-setting-on-some-asus-laptops.patch b/queue-3.10/input-elantech-fix-absolute-mode-setting-on-some-asus-laptops.patch
new file mode 100644 (file)
index 0000000..0d5026c
--- /dev/null
@@ -0,0 +1,86 @@
+From bd884149aca61de269fd9bad83fe2a4232ffab21 Mon Sep 17 00:00:00 2001
+From: Ulrik De Bie <ulrik.debie-os@e2big.org>
+Date: Mon, 6 Apr 2015 15:35:38 -0700
+Subject: Input: elantech - fix absolute mode setting on some ASUS laptops
+
+From: Ulrik De Bie <ulrik.debie-os@e2big.org>
+
+commit bd884149aca61de269fd9bad83fe2a4232ffab21 upstream.
+
+On ASUS TP500LN and X750JN, the touchpad absolute mode is reset each
+time set_rate is done.
+
+In order to fix this, we will verify the firmware version, and if it
+matches the one in those laptops, the set_rate function is overloaded
+with a function elantech_set_rate_restore_reg_07 that performs the
+set_rate with the original function, followed by a restore of reg_07
+(the register that sets the absolute mode on elantech v4 hardware).
+
+Also the ASUS TP500LN and X750JN firmware version, capabilities, and
+button constellation is added to elantech.c
+
+Reported-and-tested-by: George Moutsopoulos <gmoutso@yahoo.co.uk>
+Signed-off-by: Ulrik De Bie <ulrik.debie-os@e2big.org>
+Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/input/mouse/elantech.c |   22 ++++++++++++++++++++++
+ drivers/input/mouse/elantech.h |    1 +
+ 2 files changed, 23 insertions(+)
+
+--- a/drivers/input/mouse/elantech.c
++++ b/drivers/input/mouse/elantech.c
+@@ -784,6 +784,21 @@ static psmouse_ret_t elantech_process_by
+ }
+ /*
++ * This writes the reg_07 value again to the hardware at the end of every
++ * set_rate call because the register loses its value. reg_07 allows setting
++ * absolute mode on v4 hardware
++ */
++static void elantech_set_rate_restore_reg_07(struct psmouse *psmouse,
++              unsigned int rate)
++{
++      struct elantech_data *etd = psmouse->private;
++
++      etd->original_set_rate(psmouse, rate);
++      if (elantech_write_reg(psmouse, 0x07, etd->reg_07))
++              psmouse_err(psmouse, "restoring reg_07 failed\n");
++}
++
++/*
+  * Put the touchpad into absolute mode
+  */
+ static int elantech_set_absolute_mode(struct psmouse *psmouse)
+@@ -985,6 +1000,8 @@ static int elantech_get_resolution_v4(st
+  * Asus K53SV              0x450f01        78, 15, 0c      2 hw buttons
+  * Asus G46VW              0x460f02        00, 18, 0c      2 hw buttons
+  * Asus G750JX             0x360f00        00, 16, 0c      2 hw buttons
++ * Asus TP500LN            0x381f17        10, 14, 0e      clickpad
++ * Asus X750JN             0x381f17        10, 14, 0e      clickpad
+  * Asus UX31               0x361f00        20, 15, 0e      clickpad
+  * Asus UX32VD             0x361f02        00, 15, 0e      clickpad
+  * Avatar AVIU-145A2       0x361f00        ?               clickpad
+@@ -1452,6 +1469,11 @@ int elantech_init(struct psmouse *psmous
+               goto init_fail;
+       }
++      if (etd->fw_version == 0x381f17) {
++              etd->original_set_rate = psmouse->set_rate;
++              psmouse->set_rate = elantech_set_rate_restore_reg_07;
++      }
++
+       if (elantech_set_input_params(psmouse)) {
+               psmouse_err(psmouse, "failed to query touchpad range.\n");
+               goto init_fail;
+--- a/drivers/input/mouse/elantech.h
++++ b/drivers/input/mouse/elantech.h
+@@ -138,6 +138,7 @@ struct elantech_data {
+       struct finger_pos mt[ETP_MAX_FINGERS];
+       unsigned char parity[256];
+       int (*send_cmd)(struct psmouse *psmouse, unsigned char c, unsigned char *param);
++      void (*original_set_rate)(struct psmouse *psmouse, unsigned int rate);
+ };
+ #ifdef CONFIG_MOUSE_PS2_ELANTECH
diff --git a/queue-3.10/parport-disable-pc-style-parallel-port-support-on-cris.patch b/queue-3.10/parport-disable-pc-style-parallel-port-support-on-cris.patch
new file mode 100644 (file)
index 0000000..09675ea
--- /dev/null
@@ -0,0 +1,30 @@
+From cb1ff5f90e1550d5752521205506b99f1aa8b1e0 Mon Sep 17 00:00:00 2001
+From: Geert Uytterhoeven <geert@linux-m68k.org>
+Date: Wed, 15 May 2013 22:51:15 +0200
+Subject: parport: disable PC-style parallel port support on cris
+
+From: Geert Uytterhoeven <geert@linux-m68k.org>
+
+commit cb1ff5f90e1550d5752521205506b99f1aa8b1e0 upstream.
+
+Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
+Cc: Guenter Roeck <linux@roeck-us.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/parport/Kconfig |    4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/drivers/parport/Kconfig
++++ b/drivers/parport/Kconfig
+@@ -36,7 +36,9 @@ if PARPORT
+ config PARPORT_PC
+       tristate "PC-style hardware"
+       depends on (!SPARC64 || PCI) && !SPARC32 && !M32R && !FRV && !S390 && \
+-              (!M68K || ISA) && !MN10300 && !AVR32 && !BLACKFIN && !XTENSA
++              (!M68K || ISA) && !MN10300 && !AVR32 && !BLACKFIN && \
++              !XTENSA && !CRIS
++
+       ---help---
+         You should say Y here if you have a PC-style parallel port. All
+         IBM PC compatible computers and some Alphas have PC-style
diff --git a/queue-3.10/ptrace-fix-race-between-ptrace_resume-and-wait_task_stopped.patch b/queue-3.10/ptrace-fix-race-between-ptrace_resume-and-wait_task_stopped.patch
new file mode 100644 (file)
index 0000000..ad1a2f9
--- /dev/null
@@ -0,0 +1,115 @@
+From b72c186999e689cb0b055ab1c7b3cd8fffbeb5ed Mon Sep 17 00:00:00 2001
+From: Oleg Nesterov <oleg@redhat.com>
+Date: Thu, 16 Apr 2015 12:47:29 -0700
+Subject: ptrace: fix race between ptrace_resume() and wait_task_stopped()
+
+From: Oleg Nesterov <oleg@redhat.com>
+
+commit b72c186999e689cb0b055ab1c7b3cd8fffbeb5ed upstream.
+
+ptrace_resume() is called when the tracee is still __TASK_TRACED.  We set
+tracee->exit_code and then wake_up_state() changes tracee->state.  If the
+tracer's sub-thread does wait() in between, task_stopped_code(ptrace => T)
+wrongly looks like another report from tracee.
+
+This confuses debugger, and since wait_task_stopped() clears ->exit_code
+the tracee can miss a signal.
+
+Test-case:
+
+       #include <stdio.h>
+       #include <unistd.h>
+       #include <sys/wait.h>
+       #include <sys/ptrace.h>
+       #include <pthread.h>
+       #include <assert.h>
+
+       int pid;
+
+       void *waiter(void *arg)
+       {
+               int stat;
+
+               for (;;) {
+                       assert(pid == wait(&stat));
+                       assert(WIFSTOPPED(stat));
+                       if (WSTOPSIG(stat) == SIGHUP)
+                               continue;
+
+                       assert(WSTOPSIG(stat) == SIGCONT);
+                       printf("ERR! extra/wrong report:%x\n", stat);
+               }
+       }
+
+       int main(void)
+       {
+               pthread_t thread;
+
+               pid = fork();
+               if (!pid) {
+                       assert(ptrace(PTRACE_TRACEME, 0,0,0) == 0);
+                       for (;;)
+                               kill(getpid(), SIGHUP);
+               }
+
+               assert(pthread_create(&thread, NULL, waiter, NULL) == 0);
+
+               for (;;)
+                       ptrace(PTRACE_CONT, pid, 0, SIGCONT);
+
+               return 0;
+       }
+
+Note for stable: the bug is very old, but without 9899d11f6544 "ptrace:
+ensure arch_ptrace/ptrace_request can never race with SIGKILL" the fix
+should use lock_task_sighand(child).
+
+Signed-off-by: Oleg Nesterov <oleg@redhat.com>
+Reported-by: Pavel Labath <labath@google.com>
+Tested-by: Pavel Labath <labath@google.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>
+
+---
+ kernel/ptrace.c |   20 ++++++++++++++++++++
+ 1 file changed, 20 insertions(+)
+
+--- a/kernel/ptrace.c
++++ b/kernel/ptrace.c
+@@ -720,6 +720,8 @@ static int ptrace_peek_siginfo(struct ta
+ static int ptrace_resume(struct task_struct *child, long request,
+                        unsigned long data)
+ {
++      bool need_siglock;
++
+       if (!valid_signal(data))
+               return -EIO;
+@@ -747,8 +749,26 @@ static int ptrace_resume(struct task_str
+               user_disable_single_step(child);
+       }
++      /*
++       * Change ->exit_code and ->state under siglock to avoid the race
++       * with wait_task_stopped() in between; a non-zero ->exit_code will
++       * wrongly look like another report from tracee.
++       *
++       * Note that we need siglock even if ->exit_code == data and/or this
++       * status was not reported yet, the new status must not be cleared by
++       * wait_task_stopped() after resume.
++       *
++       * If data == 0 we do not care if wait_task_stopped() reports the old
++       * status and clears the code too; this can't race with the tracee, it
++       * takes siglock after resume.
++       */
++      need_siglock = data && !thread_group_empty(current);
++      if (need_siglock)
++              spin_lock_irq(&child->sighand->siglock);
+       child->exit_code = data;
+       wake_up_state(child, __TASK_TRACED);
++      if (need_siglock)
++              spin_unlock_irq(&child->sighand->siglock);
+       return 0;
+ }
diff --git a/queue-3.10/rtlwifi-rtl8192cu-add-new-device-id.patch b/queue-3.10/rtlwifi-rtl8192cu-add-new-device-id.patch
new file mode 100644 (file)
index 0000000..20887f8
--- /dev/null
@@ -0,0 +1,33 @@
+From 9374e7d2fdcad3c36dafc8d3effd554bc702c4b6 Mon Sep 17 00:00:00 2001
+From: Marek Vasut <marex@denx.de>
+Date: Thu, 26 Mar 2015 02:16:06 +0100
+Subject: rtlwifi: rtl8192cu: Add new device ID
+
+From: Marek Vasut <marex@denx.de>
+
+commit 9374e7d2fdcad3c36dafc8d3effd554bc702c4b6 upstream.
+
+Add new ID for ASUS N10 WiFi dongle.
+
+Signed-off-by: Marek Vasut <marex@denx.de>
+Tested-by: Marek Vasut <marex@denx.de>
+Cc: Larry Finger <Larry.Finger@lwfinger.net>
+Cc: John W. Linville <linville@tuxdriver.com>
+Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
+Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/wireless/rtlwifi/rtl8192cu/sw.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/net/wireless/rtlwifi/rtl8192cu/sw.c
++++ b/drivers/net/wireless/rtlwifi/rtl8192cu/sw.c
+@@ -313,6 +313,7 @@ static struct usb_device_id rtl8192c_usb
+       {RTL_USB_DEVICE(0x07b8, 0x8188, rtl92cu_hal_cfg)}, /*Abocom - Abocom*/
+       {RTL_USB_DEVICE(0x07b8, 0x8189, rtl92cu_hal_cfg)}, /*Funai - Abocom*/
+       {RTL_USB_DEVICE(0x0846, 0x9041, rtl92cu_hal_cfg)}, /*NetGear WNA1000M*/
++      {RTL_USB_DEVICE(0x0b05, 0x17ba, rtl92cu_hal_cfg)}, /*ASUS-Edimax*/
+       {RTL_USB_DEVICE(0x0bda, 0x5088, rtl92cu_hal_cfg)}, /*Thinkware-CC&C*/
+       {RTL_USB_DEVICE(0x0df6, 0x0052, rtl92cu_hal_cfg)}, /*Sitecom - Edimax*/
+       {RTL_USB_DEVICE(0x0df6, 0x005c, rtl92cu_hal_cfg)}, /*Sitecom - Edimax*/
diff --git a/queue-3.10/rtlwifi-rtl8192cu-add-new-usb-id.patch b/queue-3.10/rtlwifi-rtl8192cu-add-new-usb-id.patch
new file mode 100644 (file)
index 0000000..0c1aaf8
--- /dev/null
@@ -0,0 +1,29 @@
+From 2f92b314f4daff2117847ac5343c54d3d041bf78 Mon Sep 17 00:00:00 2001
+From: Larry Finger <Larry.Finger@lwfinger.net>
+Date: Mon, 23 Mar 2015 18:14:10 -0500
+Subject: rtlwifi: rtl8192cu: Add new USB ID
+
+From: Larry Finger <Larry.Finger@lwfinger.net>
+
+commit 2f92b314f4daff2117847ac5343c54d3d041bf78 upstream.
+
+USB ID 2001:330d is used for a D-Link DWA-131.
+
+Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
+Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/wireless/rtlwifi/rtl8192cu/sw.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/net/wireless/rtlwifi/rtl8192cu/sw.c
++++ b/drivers/net/wireless/rtlwifi/rtl8192cu/sw.c
+@@ -369,6 +369,7 @@ static struct usb_device_id rtl8192c_usb
+       {RTL_USB_DEVICE(0x2001, 0x3307, rtl92cu_hal_cfg)}, /*D-Link-Cameo*/
+       {RTL_USB_DEVICE(0x2001, 0x3309, rtl92cu_hal_cfg)}, /*D-Link-Alpha*/
+       {RTL_USB_DEVICE(0x2001, 0x330a, rtl92cu_hal_cfg)}, /*D-Link-Alpha*/
++      {RTL_USB_DEVICE(0x2001, 0x330d, rtl92cu_hal_cfg)}, /*D-Link DWA-131 */
+       {RTL_USB_DEVICE(0x2019, 0xab2b, rtl92cu_hal_cfg)}, /*Planex -Abocom*/
+       {RTL_USB_DEVICE(0x20f4, 0x624d, rtl92cu_hal_cfg)}, /*TRENDNet*/
+       {RTL_USB_DEVICE(0x2357, 0x0100, rtl92cu_hal_cfg)}, /*TP-Link WN8200ND*/
index 54b832227ead59e15d60549c793f82899c7689b7..88fe9361624b8a8699d4f5764ded88154616982e 100644 (file)
@@ -23,3 +23,14 @@ usb-host-xhci-use-new-usb_resume_timeout.patch
 usb-host-sl811-use-new-usb_resume_timeout.patch
 usb-core-hub-use-new-usb_resume_timeout.patch
 alsa-emu10k1-don-t-deadlock-in-proc-functions.patch
+input-elantech-fix-absolute-mode-setting-on-some-asus-laptops.patch
+fs-binfmt_elf.c-fix-bug-in-loading-of-pie-binaries.patch
+ptrace-fix-race-between-ptrace_resume-and-wait_task_stopped.patch
+rtlwifi-rtl8192cu-add-new-usb-id.patch
+rtlwifi-rtl8192cu-add-new-device-id.patch
+parport-disable-pc-style-parallel-port-support-on-cris.patch
+drivers-parport-kconfig-exclude-h8300-for-parport_pc.patch
+console-disable-vga-text-console-support-on-cris.patch
+video-vgacon-don-t-build-on-arm64.patch
+arm64-kernel-compiling-issue-need-delete.patch
+ext4-make-fsync-to-sync-parent-dir-in-no-journal-for-real-this-time.patch
diff --git a/queue-3.10/video-vgacon-don-t-build-on-arm64.patch b/queue-3.10/video-vgacon-don-t-build-on-arm64.patch
new file mode 100644 (file)
index 0000000..0222ab3
--- /dev/null
@@ -0,0 +1,38 @@
+From ee23794b86689e655cedd616e98c03bc3c74f5ec Mon Sep 17 00:00:00 2001
+From: Mark Brown <broonie@linaro.org>
+Date: Tue, 17 Dec 2013 23:37:01 +0000
+Subject: video: vgacon: Don't build on arm64
+
+From: Mark Brown <broonie@linaro.org>
+
+commit ee23794b86689e655cedd616e98c03bc3c74f5ec upstream.
+
+arm64 is unlikely to have a VGA console and does not export screen_info
+causing build failures if the driver is build, for example in all*config.
+Add a dependency on !ARM64 to prevent this.
+
+This list is getting quite long, it may be easier to depend on a symbol
+which architectures that do support the driver can select.
+
+Signed-off-by: Mark Brown <broonie@linaro.org>
+[tomi.valkeinen@ti.com: moved && to first modified line]
+Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
+Cc: Guenter Roeck <linux@roeck-us.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/video/console/Kconfig |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/video/console/Kconfig
++++ b/drivers/video/console/Kconfig
+@@ -8,7 +8,8 @@ config VGA_CONSOLE
+       bool "VGA text console" if EXPERT || !X86
+       depends on !4xx && !8xx && !SPARC && !M68K && !PARISC && !FRV && \
+               !SUPERH && !BLACKFIN && !AVR32 && !MN10300 && !CRIS && \
+-              (!ARM || ARCH_FOOTBRIDGE || ARCH_INTEGRATOR || ARCH_NETWINDER)
++              (!ARM || ARCH_FOOTBRIDGE || ARCH_INTEGRATOR || ARCH_NETWINDER) && \
++              !ARM64
+       default y
+       help
+         Saying Y here will allow you to use Linux in text mode through a