aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Kroah-Hartman2018-02-22 11:13:23 -0600
committerGreg Kroah-Hartman2018-02-22 11:13:23 -0600
commit46c085dd47225cd86d7778c4ce2b791fda4455b3 (patch)
treed481f3a8f658a65276814c38133b5ce9e8d7a80d
parent24464bc07f85c5399b79d42398100c76a61e20fb (diff)
parente9fd3d16de83cee2e533448d4601ef89a9ab94c8 (diff)
downloadkernel-omap-46c085dd47225cd86d7778c4ce2b791fda4455b3.tar.gz
kernel-omap-46c085dd47225cd86d7778c4ce2b791fda4455b3.tar.xz
kernel-omap-46c085dd47225cd86d7778c4ce2b791fda4455b3.zip
Merge 4.4.117 into android-4.4-o
Changes in 4.4.117 IB/mlx4: Fix incorrectly releasing steerable UD QPs when have only ETH ports PM / devfreq: Propagate error from devfreq_add_device() s390: fix handling of -1 in set{,fs}[gu]id16 syscalls ARM: dts: STi: Add gpio polarity for "hdmi,hpd-gpio" property arm: spear600: Add missing interrupt-parent of rtc arm: spear13xx: Fix dmas cells arm: spear13xx: Fix spics gpio controller's warning ALSA: seq: Fix regression by incorrect ioctl_mutex usages KVM/x86: Reduce retpoline performance impact in slot_handle_level_range(), by always inlining iterator helper methods x86/cpu: Change type of x86_cache_size variable to unsigned int drm/radeon: adjust tested variable rtc-opal: Fix handling of firmware error codes, prevent busy loops ext4: save error to disk in __ext4_grp_locked_error() ext4: correct documentation for grpid mount option mm: hide a #warning for COMPILE_TEST video: fbdev: atmel_lcdfb: fix display-timings lookup console/dummy: leave .con_font_get set to NULL rtlwifi: rtl8821ae: Fix connection lost problem correctly Btrfs: fix deadlock in run_delalloc_nocow Btrfs: fix crash due to not cleaning up tree log block's dirty bits Btrfs: fix unexpected -EEXIST when creating new inode ALSA: hda - Fix headset mic detection problem for two Dell machines ALSA: usb-audio: Fix UAC2 get_ctl request with a RANGE attribute ALSA: hda/realtek: PCI quirk for Fujitsu U7x7 ALSA: usb-audio: add implicit fb quirk for Behringer UFX1204 ALSA: seq: Fix racy pool initializations mvpp2: fix multicast address filter dm: correctly handle chained bios in dec_pending() x86: fix build warnign with 32-bit PAE vfs: don't do RCU lookup of empty pathnames ARM: pxa/tosa-bt: add MODULE_LICENSE tag ARM: dts: s5pv210: add interrupt-parent for ohci media: r820t: fix r820t_write_reg for KASAN Linux 4.4.117 Change-Id: I751654d4f48626769eedddfec1500131820c7881 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-rw-r--r--Documentation/devicetree/bindings/dma/snps-dma.txt2
-rw-r--r--Documentation/filesystems/ext4.txt2
-rw-r--r--Makefile2
-rw-r--r--arch/arm/boot/dts/s5pv210.dtsi1
-rw-r--r--arch/arm/boot/dts/spear1310-evb.dts2
-rw-r--r--arch/arm/boot/dts/spear1340.dtsi4
-rw-r--r--arch/arm/boot/dts/spear13xx.dtsi6
-rw-r--r--arch/arm/boot/dts/spear600.dtsi1
-rw-r--r--arch/arm/boot/dts/stih407.dtsi3
-rw-r--r--arch/arm/boot/dts/stih410.dtsi3
-rw-r--r--arch/arm/mach-pxa/tosa-bt.c4
-rw-r--r--arch/s390/kernel/compat_linux.c8
-rw-r--r--arch/x86/include/asm/processor.h2
-rw-r--r--arch/x86/kernel/cpu/common.c2
-rw-r--r--arch/x86/kernel/cpu/microcode/intel.c2
-rw-r--r--arch/x86/kernel/cpu/proc.c4
-rw-r--r--arch/x86/kvm/mmu.c10
-rw-r--r--drivers/devfreq/devfreq.c2
-rw-r--r--drivers/gpu/drm/radeon/radeon_uvd.c2
-rw-r--r--drivers/infiniband/hw/mlx4/main.c13
-rw-r--r--drivers/md/dm.c3
-rw-r--r--drivers/media/tuners/r820t.c13
-rw-r--r--drivers/net/ethernet/marvell/mvpp2.c11
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/qp.c3
-rw-r--r--drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c5
-rw-r--r--drivers/net/wireless/realtek/rtlwifi/wifi.h1
-rw-r--r--drivers/rtc/rtc-opal.c12
-rw-r--r--drivers/video/console/dummycon.c1
-rw-r--r--drivers/video/fbdev/atmel_lcdfb.c8
-rw-r--r--fs/btrfs/inode.c5
-rw-r--r--fs/btrfs/tree-log.c27
-rw-r--r--fs/ext4/super.c1
-rw-r--r--fs/namei.c3
-rw-r--r--include/linux/kaiser.h2
-rw-r--r--mm/memory.c2
-rw-r--r--sound/core/seq/seq_clientmgr.c23
-rw-r--r--sound/pci/hda/patch_realtek.c28
-rw-r--r--sound/usb/mixer.c18
-rw-r--r--sound/usb/pcm.c9
39 files changed, 180 insertions, 70 deletions
diff --git a/Documentation/devicetree/bindings/dma/snps-dma.txt b/Documentation/devicetree/bindings/dma/snps-dma.txt
index c261598164a7..17d43ca27f41 100644
--- a/Documentation/devicetree/bindings/dma/snps-dma.txt
+++ b/Documentation/devicetree/bindings/dma/snps-dma.txt
@@ -58,6 +58,6 @@ Example:
58 interrupts = <0 35 0x4>; 58 interrupts = <0 35 0x4>;
59 status = "disabled"; 59 status = "disabled";
60 dmas = <&dmahost 12 0 1>, 60 dmas = <&dmahost 12 0 1>,
61 <&dmahost 13 0 1 0>; 61 <&dmahost 13 1 0>;
62 dma-names = "rx", "rx"; 62 dma-names = "rx", "rx";
63 }; 63 };
diff --git a/Documentation/filesystems/ext4.txt b/Documentation/filesystems/ext4.txt
index 6c0108eb0137..2139ea253142 100644
--- a/Documentation/filesystems/ext4.txt
+++ b/Documentation/filesystems/ext4.txt
@@ -233,7 +233,7 @@ data_err=ignore(*) Just print an error message if an error occurs
233data_err=abort Abort the journal if an error occurs in a file 233data_err=abort Abort the journal if an error occurs in a file
234 data buffer in ordered mode. 234 data buffer in ordered mode.
235 235
236grpid Give objects the same group ID as their creator. 236grpid New objects have the group ID of their parent.
237bsdgroups 237bsdgroups
238 238
239nogrpid (*) New objects have the group ID of their creator. 239nogrpid (*) New objects have the group ID of their creator.
diff --git a/Makefile b/Makefile
index 852b087854e4..82e25459fdf9 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
1VERSION = 4 1VERSION = 4
2PATCHLEVEL = 4 2PATCHLEVEL = 4
3SUBLEVEL = 116 3SUBLEVEL = 117
4EXTRAVERSION = 4EXTRAVERSION =
5NAME = Blurry Fish Butt 5NAME = Blurry Fish Butt
6 6
diff --git a/arch/arm/boot/dts/s5pv210.dtsi b/arch/arm/boot/dts/s5pv210.dtsi
index 8344a0ee2b86..b03fe747b98c 100644
--- a/arch/arm/boot/dts/s5pv210.dtsi
+++ b/arch/arm/boot/dts/s5pv210.dtsi
@@ -461,6 +461,7 @@
461 compatible = "samsung,exynos4210-ohci"; 461 compatible = "samsung,exynos4210-ohci";
462 reg = <0xec300000 0x100>; 462 reg = <0xec300000 0x100>;
463 interrupts = <23>; 463 interrupts = <23>;
464 interrupt-parent = <&vic1>;
464 clocks = <&clocks CLK_USB_HOST>; 465 clocks = <&clocks CLK_USB_HOST>;
465 clock-names = "usbhost"; 466 clock-names = "usbhost";
466 #address-cells = <1>; 467 #address-cells = <1>;
diff --git a/arch/arm/boot/dts/spear1310-evb.dts b/arch/arm/boot/dts/spear1310-evb.dts
index e48857249ce7..3d83992efd90 100644
--- a/arch/arm/boot/dts/spear1310-evb.dts
+++ b/arch/arm/boot/dts/spear1310-evb.dts
@@ -349,7 +349,7 @@
349 spi0: spi@e0100000 { 349 spi0: spi@e0100000 {
350 status = "okay"; 350 status = "okay";
351 num-cs = <3>; 351 num-cs = <3>;
352 cs-gpios = <&gpio1 7 0>, <&spics 0>, <&spics 1>; 352 cs-gpios = <&gpio1 7 0>, <&spics 0 0>, <&spics 1 0>;
353 353
354 stmpe610@0 { 354 stmpe610@0 {
355 compatible = "st,stmpe610"; 355 compatible = "st,stmpe610";
diff --git a/arch/arm/boot/dts/spear1340.dtsi b/arch/arm/boot/dts/spear1340.dtsi
index df2232d767ed..6361cbfcbe5e 100644
--- a/arch/arm/boot/dts/spear1340.dtsi
+++ b/arch/arm/boot/dts/spear1340.dtsi
@@ -141,8 +141,8 @@
141 reg = <0xb4100000 0x1000>; 141 reg = <0xb4100000 0x1000>;
142 interrupts = <0 105 0x4>; 142 interrupts = <0 105 0x4>;
143 status = "disabled"; 143 status = "disabled";
144 dmas = <&dwdma0 0x600 0 0 1>, /* 0xC << 11 */ 144 dmas = <&dwdma0 12 0 1>,
145 <&dwdma0 0x680 0 1 0>; /* 0xD << 7 */ 145 <&dwdma0 13 1 0>;
146 dma-names = "tx", "rx"; 146 dma-names = "tx", "rx";
147 }; 147 };
148 148
diff --git a/arch/arm/boot/dts/spear13xx.dtsi b/arch/arm/boot/dts/spear13xx.dtsi
index 14594ce8c18a..8fd8a3328acb 100644
--- a/arch/arm/boot/dts/spear13xx.dtsi
+++ b/arch/arm/boot/dts/spear13xx.dtsi
@@ -100,7 +100,7 @@
100 reg = <0xb2800000 0x1000>; 100 reg = <0xb2800000 0x1000>;
101 interrupts = <0 29 0x4>; 101 interrupts = <0 29 0x4>;
102 status = "disabled"; 102 status = "disabled";
103 dmas = <&dwdma0 0 0 0 0>; 103 dmas = <&dwdma0 0 0 0>;
104 dma-names = "data"; 104 dma-names = "data";
105 }; 105 };
106 106
@@ -288,8 +288,8 @@
288 #size-cells = <0>; 288 #size-cells = <0>;
289 interrupts = <0 31 0x4>; 289 interrupts = <0 31 0x4>;
290 status = "disabled"; 290 status = "disabled";
291 dmas = <&dwdma0 0x2000 0 0 0>, /* 0x4 << 11 */ 291 dmas = <&dwdma0 4 0 0>,
292 <&dwdma0 0x0280 0 0 0>; /* 0x5 << 7 */ 292 <&dwdma0 5 0 0>;
293 dma-names = "tx", "rx"; 293 dma-names = "tx", "rx";
294 }; 294 };
295 295
diff --git a/arch/arm/boot/dts/spear600.dtsi b/arch/arm/boot/dts/spear600.dtsi
index 9f60a7b6a42b..bd379034993c 100644
--- a/arch/arm/boot/dts/spear600.dtsi
+++ b/arch/arm/boot/dts/spear600.dtsi
@@ -194,6 +194,7 @@
194 rtc@fc900000 { 194 rtc@fc900000 {
195 compatible = "st,spear600-rtc"; 195 compatible = "st,spear600-rtc";
196 reg = <0xfc900000 0x1000>; 196 reg = <0xfc900000 0x1000>;
197 interrupt-parent = <&vic0>;
197 interrupts = <10>; 198 interrupts = <10>;
198 status = "disabled"; 199 status = "disabled";
199 }; 200 };
diff --git a/arch/arm/boot/dts/stih407.dtsi b/arch/arm/boot/dts/stih407.dtsi
index d60f0d8add26..e4b508ce38a2 100644
--- a/arch/arm/boot/dts/stih407.dtsi
+++ b/arch/arm/boot/dts/stih407.dtsi
@@ -8,6 +8,7 @@
8 */ 8 */
9#include "stih407-clock.dtsi" 9#include "stih407-clock.dtsi"
10#include "stih407-family.dtsi" 10#include "stih407-family.dtsi"
11#include <dt-bindings/gpio/gpio.h>
11/ { 12/ {
12 soc { 13 soc {
13 sti-display-subsystem { 14 sti-display-subsystem {
@@ -112,7 +113,7 @@
112 <&clk_s_d2_quadfs 0>, 113 <&clk_s_d2_quadfs 0>,
113 <&clk_s_d2_quadfs 1>; 114 <&clk_s_d2_quadfs 1>;
114 115
115 hdmi,hpd-gpio = <&pio5 3>; 116 hdmi,hpd-gpio = <&pio5 3 GPIO_ACTIVE_LOW>;
116 reset-names = "hdmi"; 117 reset-names = "hdmi";
117 resets = <&softreset STIH407_HDMI_TX_PHY_SOFTRESET>; 118 resets = <&softreset STIH407_HDMI_TX_PHY_SOFTRESET>;
118 ddc = <&hdmiddc>; 119 ddc = <&hdmiddc>;
diff --git a/arch/arm/boot/dts/stih410.dtsi b/arch/arm/boot/dts/stih410.dtsi
index 40318869c733..3c32fb8cdcac 100644
--- a/arch/arm/boot/dts/stih410.dtsi
+++ b/arch/arm/boot/dts/stih410.dtsi
@@ -9,6 +9,7 @@
9#include "stih410-clock.dtsi" 9#include "stih410-clock.dtsi"
10#include "stih407-family.dtsi" 10#include "stih407-family.dtsi"
11#include "stih410-pinctrl.dtsi" 11#include "stih410-pinctrl.dtsi"
12#include <dt-bindings/gpio/gpio.h>
12/ { 13/ {
13 aliases { 14 aliases {
14 bdisp0 = &bdisp0; 15 bdisp0 = &bdisp0;
@@ -203,7 +204,7 @@
203 <&clk_s_d2_quadfs 0>, 204 <&clk_s_d2_quadfs 0>,
204 <&clk_s_d2_quadfs 1>; 205 <&clk_s_d2_quadfs 1>;
205 206
206 hdmi,hpd-gpio = <&pio5 3>; 207 hdmi,hpd-gpio = <&pio5 3 GPIO_ACTIVE_LOW>;
207 reset-names = "hdmi"; 208 reset-names = "hdmi";
208 resets = <&softreset STIH407_HDMI_TX_PHY_SOFTRESET>; 209 resets = <&softreset STIH407_HDMI_TX_PHY_SOFTRESET>;
209 ddc = <&hdmiddc>; 210 ddc = <&hdmiddc>;
diff --git a/arch/arm/mach-pxa/tosa-bt.c b/arch/arm/mach-pxa/tosa-bt.c
index e0a53208880a..b59a7a2df4e3 100644
--- a/arch/arm/mach-pxa/tosa-bt.c
+++ b/arch/arm/mach-pxa/tosa-bt.c
@@ -132,3 +132,7 @@ static struct platform_driver tosa_bt_driver = {
132 }, 132 },
133}; 133};
134module_platform_driver(tosa_bt_driver); 134module_platform_driver(tosa_bt_driver);
135
136MODULE_LICENSE("GPL");
137MODULE_AUTHOR("Dmitry Baryshkov");
138MODULE_DESCRIPTION("Bluetooth built-in chip control");
diff --git a/arch/s390/kernel/compat_linux.c b/arch/s390/kernel/compat_linux.c
index 0176ebc97bfd..86f934255eb6 100644
--- a/arch/s390/kernel/compat_linux.c
+++ b/arch/s390/kernel/compat_linux.c
@@ -110,7 +110,7 @@ COMPAT_SYSCALL_DEFINE2(s390_setregid16, u16, rgid, u16, egid)
110 110
111COMPAT_SYSCALL_DEFINE1(s390_setgid16, u16, gid) 111COMPAT_SYSCALL_DEFINE1(s390_setgid16, u16, gid)
112{ 112{
113 return sys_setgid((gid_t)gid); 113 return sys_setgid(low2highgid(gid));
114} 114}
115 115
116COMPAT_SYSCALL_DEFINE2(s390_setreuid16, u16, ruid, u16, euid) 116COMPAT_SYSCALL_DEFINE2(s390_setreuid16, u16, ruid, u16, euid)
@@ -120,7 +120,7 @@ COMPAT_SYSCALL_DEFINE2(s390_setreuid16, u16, ruid, u16, euid)
120 120
121COMPAT_SYSCALL_DEFINE1(s390_setuid16, u16, uid) 121COMPAT_SYSCALL_DEFINE1(s390_setuid16, u16, uid)
122{ 122{
123 return sys_setuid((uid_t)uid); 123 return sys_setuid(low2highuid(uid));
124} 124}
125 125
126COMPAT_SYSCALL_DEFINE3(s390_setresuid16, u16, ruid, u16, euid, u16, suid) 126COMPAT_SYSCALL_DEFINE3(s390_setresuid16, u16, ruid, u16, euid, u16, suid)
@@ -173,12 +173,12 @@ COMPAT_SYSCALL_DEFINE3(s390_getresgid16, u16 __user *, rgidp,
173 173
174COMPAT_SYSCALL_DEFINE1(s390_setfsuid16, u16, uid) 174COMPAT_SYSCALL_DEFINE1(s390_setfsuid16, u16, uid)
175{ 175{
176 return sys_setfsuid((uid_t)uid); 176 return sys_setfsuid(low2highuid(uid));
177} 177}
178 178
179COMPAT_SYSCALL_DEFINE1(s390_setfsgid16, u16, gid) 179COMPAT_SYSCALL_DEFINE1(s390_setfsgid16, u16, gid)
180{ 180{
181 return sys_setfsgid((gid_t)gid); 181 return sys_setfsgid(low2highgid(gid));
182} 182}
183 183
184static int groups16_to_user(u16 __user *grouplist, struct group_info *group_info) 184static int groups16_to_user(u16 __user *grouplist, struct group_info *group_info)
diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h
index 86bccb4bd4dc..9e77cea2a8ef 100644
--- a/arch/x86/include/asm/processor.h
+++ b/arch/x86/include/asm/processor.h
@@ -113,7 +113,7 @@ struct cpuinfo_x86 {
113 char x86_vendor_id[16]; 113 char x86_vendor_id[16];
114 char x86_model_id[64]; 114 char x86_model_id[64];
115 /* in KB - valid for CPUS which support this call: */ 115 /* in KB - valid for CPUS which support this call: */
116 int x86_cache_size; 116 unsigned int x86_cache_size;
117 int x86_cache_alignment; /* In bytes */ 117 int x86_cache_alignment; /* In bytes */
118 /* Cache QoS architectural values: */ 118 /* Cache QoS architectural values: */
119 int x86_cache_max_rmid; /* max index */ 119 int x86_cache_max_rmid; /* max index */
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index f7f2ad3687ee..8eabbafff213 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -955,7 +955,7 @@ static void identify_cpu(struct cpuinfo_x86 *c)
955 int i; 955 int i;
956 956
957 c->loops_per_jiffy = loops_per_jiffy; 957 c->loops_per_jiffy = loops_per_jiffy;
958 c->x86_cache_size = -1; 958 c->x86_cache_size = 0;
959 c->x86_vendor = X86_VENDOR_UNKNOWN; 959 c->x86_vendor = X86_VENDOR_UNKNOWN;
960 c->x86_model = c->x86_mask = 0; /* So far unknown... */ 960 c->x86_model = c->x86_mask = 0; /* So far unknown... */
961 c->x86_vendor_id[0] = '\0'; /* Unset */ 961 c->x86_vendor_id[0] = '\0'; /* Unset */
diff --git a/arch/x86/kernel/cpu/microcode/intel.c b/arch/x86/kernel/cpu/microcode/intel.c
index 2c76a1801393..2f38a99cdb98 100644
--- a/arch/x86/kernel/cpu/microcode/intel.c
+++ b/arch/x86/kernel/cpu/microcode/intel.c
@@ -1075,7 +1075,7 @@ static struct microcode_ops microcode_intel_ops = {
1075 1075
1076static int __init calc_llc_size_per_core(struct cpuinfo_x86 *c) 1076static int __init calc_llc_size_per_core(struct cpuinfo_x86 *c)
1077{ 1077{
1078 u64 llc_size = c->x86_cache_size * 1024; 1078 u64 llc_size = c->x86_cache_size * 1024ULL;
1079 1079
1080 do_div(llc_size, c->x86_max_cores); 1080 do_div(llc_size, c->x86_max_cores);
1081 1081
diff --git a/arch/x86/kernel/cpu/proc.c b/arch/x86/kernel/cpu/proc.c
index 18ca99f2798b..935225c0375f 100644
--- a/arch/x86/kernel/cpu/proc.c
+++ b/arch/x86/kernel/cpu/proc.c
@@ -87,8 +87,8 @@ static int show_cpuinfo(struct seq_file *m, void *v)
87 } 87 }
88 88
89 /* Cache size */ 89 /* Cache size */
90 if (c->x86_cache_size >= 0) 90 if (c->x86_cache_size)
91 seq_printf(m, "cache size\t: %d KB\n", c->x86_cache_size); 91 seq_printf(m, "cache size\t: %u KB\n", c->x86_cache_size);
92 92
93 show_cpuinfo_core(m, c, cpu); 93 show_cpuinfo_core(m, c, cpu);
94 show_cpuinfo_misc(m, c); 94 show_cpuinfo_misc(m, c);
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index 1049c3c9b877..2b71f2c03b9e 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
@@ -4503,7 +4503,7 @@ void kvm_mmu_setup(struct kvm_vcpu *vcpu)
4503typedef bool (*slot_level_handler) (struct kvm *kvm, unsigned long *rmap); 4503typedef bool (*slot_level_handler) (struct kvm *kvm, unsigned long *rmap);
4504 4504
4505/* The caller should hold mmu-lock before calling this function. */ 4505/* The caller should hold mmu-lock before calling this function. */
4506static bool 4506static __always_inline bool
4507slot_handle_level_range(struct kvm *kvm, struct kvm_memory_slot *memslot, 4507slot_handle_level_range(struct kvm *kvm, struct kvm_memory_slot *memslot,
4508 slot_level_handler fn, int start_level, int end_level, 4508 slot_level_handler fn, int start_level, int end_level,
4509 gfn_t start_gfn, gfn_t end_gfn, bool lock_flush_tlb) 4509 gfn_t start_gfn, gfn_t end_gfn, bool lock_flush_tlb)
@@ -4533,7 +4533,7 @@ slot_handle_level_range(struct kvm *kvm, struct kvm_memory_slot *memslot,
4533 return flush; 4533 return flush;
4534} 4534}
4535 4535
4536static bool 4536static __always_inline bool
4537slot_handle_level(struct kvm *kvm, struct kvm_memory_slot *memslot, 4537slot_handle_level(struct kvm *kvm, struct kvm_memory_slot *memslot,
4538 slot_level_handler fn, int start_level, int end_level, 4538 slot_level_handler fn, int start_level, int end_level,
4539 bool lock_flush_tlb) 4539 bool lock_flush_tlb)
@@ -4544,7 +4544,7 @@ slot_handle_level(struct kvm *kvm, struct kvm_memory_slot *memslot,
4544 lock_flush_tlb); 4544 lock_flush_tlb);
4545} 4545}
4546 4546
4547static bool 4547static __always_inline bool
4548slot_handle_all_level(struct kvm *kvm, struct kvm_memory_slot *memslot, 4548slot_handle_all_level(struct kvm *kvm, struct kvm_memory_slot *memslot,
4549 slot_level_handler fn, bool lock_flush_tlb) 4549 slot_level_handler fn, bool lock_flush_tlb)
4550{ 4550{
@@ -4552,7 +4552,7 @@ slot_handle_all_level(struct kvm *kvm, struct kvm_memory_slot *memslot,
4552 PT_MAX_HUGEPAGE_LEVEL, lock_flush_tlb); 4552 PT_MAX_HUGEPAGE_LEVEL, lock_flush_tlb);
4553} 4553}
4554 4554
4555static bool 4555static __always_inline bool
4556slot_handle_large_level(struct kvm *kvm, struct kvm_memory_slot *memslot, 4556slot_handle_large_level(struct kvm *kvm, struct kvm_memory_slot *memslot,
4557 slot_level_handler fn, bool lock_flush_tlb) 4557 slot_level_handler fn, bool lock_flush_tlb)
4558{ 4558{
@@ -4560,7 +4560,7 @@ slot_handle_large_level(struct kvm *kvm, struct kvm_memory_slot *memslot,
4560 PT_MAX_HUGEPAGE_LEVEL, lock_flush_tlb); 4560 PT_MAX_HUGEPAGE_LEVEL, lock_flush_tlb);
4561} 4561}
4562 4562
4563static bool 4563static __always_inline bool
4564slot_handle_leaf(struct kvm *kvm, struct kvm_memory_slot *memslot, 4564slot_handle_leaf(struct kvm *kvm, struct kvm_memory_slot *memslot,
4565 slot_level_handler fn, bool lock_flush_tlb) 4565 slot_level_handler fn, bool lock_flush_tlb)
4566{ 4566{
diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
index ca848cc6a8fd..4f6fc1cfd7da 100644
--- a/drivers/devfreq/devfreq.c
+++ b/drivers/devfreq/devfreq.c
@@ -583,7 +583,7 @@ struct devfreq *devm_devfreq_add_device(struct device *dev,
583 devfreq = devfreq_add_device(dev, profile, governor_name, data); 583 devfreq = devfreq_add_device(dev, profile, governor_name, data);
584 if (IS_ERR(devfreq)) { 584 if (IS_ERR(devfreq)) {
585 devres_free(ptr); 585 devres_free(ptr);
586 return ERR_PTR(-ENOMEM); 586 return devfreq;
587 } 587 }
588 588
589 *ptr = devfreq; 589 *ptr = devfreq;
diff --git a/drivers/gpu/drm/radeon/radeon_uvd.c b/drivers/gpu/drm/radeon/radeon_uvd.c
index 6edcb5485092..b35ebabd6a9f 100644
--- a/drivers/gpu/drm/radeon/radeon_uvd.c
+++ b/drivers/gpu/drm/radeon/radeon_uvd.c
@@ -946,7 +946,7 @@ int radeon_uvd_calc_upll_dividers(struct radeon_device *rdev,
946 /* calc dclk divider with current vco freq */ 946 /* calc dclk divider with current vco freq */
947 dclk_div = radeon_uvd_calc_upll_post_div(vco_freq, dclk, 947 dclk_div = radeon_uvd_calc_upll_post_div(vco_freq, dclk,
948 pd_min, pd_even); 948 pd_min, pd_even);
949 if (vclk_div > pd_max) 949 if (dclk_div > pd_max)
950 break; /* vco is too big, it has to stop */ 950 break; /* vco is too big, it has to stop */
951 951
952 /* calc score with current vco freq */ 952 /* calc score with current vco freq */
diff --git a/drivers/infiniband/hw/mlx4/main.c b/drivers/infiniband/hw/mlx4/main.c
index 8763fb832b01..5a2a0b5db938 100644
--- a/drivers/infiniband/hw/mlx4/main.c
+++ b/drivers/infiniband/hw/mlx4/main.c
@@ -2483,9 +2483,8 @@ err_steer_free_bitmap:
2483 kfree(ibdev->ib_uc_qpns_bitmap); 2483 kfree(ibdev->ib_uc_qpns_bitmap);
2484 2484
2485err_steer_qp_release: 2485err_steer_qp_release:
2486 if (ibdev->steering_support == MLX4_STEERING_MODE_DEVICE_MANAGED) 2486 mlx4_qp_release_range(dev, ibdev->steer_qpn_base,
2487 mlx4_qp_release_range(dev, ibdev->steer_qpn_base, 2487 ibdev->steer_qpn_count);
2488 ibdev->steer_qpn_count);
2489err_counter: 2488err_counter:
2490 for (i = 0; i < ibdev->num_ports; ++i) 2489 for (i = 0; i < ibdev->num_ports; ++i)
2491 mlx4_ib_delete_counters_table(ibdev, &ibdev->counters_table[i]); 2490 mlx4_ib_delete_counters_table(ibdev, &ibdev->counters_table[i]);
@@ -2586,11 +2585,9 @@ static void mlx4_ib_remove(struct mlx4_dev *dev, void *ibdev_ptr)
2586 ibdev->iboe.nb.notifier_call = NULL; 2585 ibdev->iboe.nb.notifier_call = NULL;
2587 } 2586 }
2588 2587
2589 if (ibdev->steering_support == MLX4_STEERING_MODE_DEVICE_MANAGED) { 2588 mlx4_qp_release_range(dev, ibdev->steer_qpn_base,
2590 mlx4_qp_release_range(dev, ibdev->steer_qpn_base, 2589 ibdev->steer_qpn_count);
2591 ibdev->steer_qpn_count); 2590 kfree(ibdev->ib_uc_qpns_bitmap);
2592 kfree(ibdev->ib_uc_qpns_bitmap);
2593 }
2594 2591
2595 iounmap(ibdev->uar_map); 2592 iounmap(ibdev->uar_map);
2596 for (p = 0; p < ibdev->num_ports; ++p) 2593 for (p = 0; p < ibdev->num_ports; ++p)
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index 9ec6948e3b8b..3d9a80759d95 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -974,7 +974,8 @@ static void dec_pending(struct dm_io *io, int error)
974 } else { 974 } else {
975 /* done with normal IO or empty flush */ 975 /* done with normal IO or empty flush */
976 trace_block_bio_complete(md->queue, bio, io_error); 976 trace_block_bio_complete(md->queue, bio, io_error);
977 bio->bi_error = io_error; 977 if (io_error)
978 bio->bi_error = io_error;
978 bio_endio(bio); 979 bio_endio(bio);
979 } 980 }
980 } 981 }
diff --git a/drivers/media/tuners/r820t.c b/drivers/media/tuners/r820t.c
index a7a8452e99d2..c1ce8d3ce877 100644
--- a/drivers/media/tuners/r820t.c
+++ b/drivers/media/tuners/r820t.c
@@ -410,9 +410,11 @@ static int r820t_write(struct r820t_priv *priv, u8 reg, const u8 *val,
410 return 0; 410 return 0;
411} 411}
412 412
413static int r820t_write_reg(struct r820t_priv *priv, u8 reg, u8 val) 413static inline int r820t_write_reg(struct r820t_priv *priv, u8 reg, u8 val)
414{ 414{
415 return r820t_write(priv, reg, &val, 1); 415 u8 tmp = val; /* work around GCC PR81715 with asan-stack=1 */
416
417 return r820t_write(priv, reg, &tmp, 1);
416} 418}
417 419
418static int r820t_read_cache_reg(struct r820t_priv *priv, int reg) 420static int r820t_read_cache_reg(struct r820t_priv *priv, int reg)
@@ -425,17 +427,18 @@ static int r820t_read_cache_reg(struct r820t_priv *priv, int reg)
425 return -EINVAL; 427 return -EINVAL;
426} 428}
427 429
428static int r820t_write_reg_mask(struct r820t_priv *priv, u8 reg, u8 val, 430static inline int r820t_write_reg_mask(struct r820t_priv *priv, u8 reg, u8 val,
429 u8 bit_mask) 431 u8 bit_mask)
430{ 432{
433 u8 tmp = val;
431 int rc = r820t_read_cache_reg(priv, reg); 434 int rc = r820t_read_cache_reg(priv, reg);
432 435
433 if (rc < 0) 436 if (rc < 0)
434 return rc; 437 return rc;
435 438
436 val = (rc & ~bit_mask) | (val & bit_mask); 439 tmp = (rc & ~bit_mask) | (tmp & bit_mask);
437 440
438 return r820t_write(priv, reg, &val, 1); 441 return r820t_write(priv, reg, &tmp, 1);
439} 442}
440 443
441static int r820t_read(struct r820t_priv *priv, u8 reg, u8 *val, int len) 444static int r820t_read(struct r820t_priv *priv, u8 reg, u8 *val, int len)
diff --git a/drivers/net/ethernet/marvell/mvpp2.c b/drivers/net/ethernet/marvell/mvpp2.c
index 4f34e1b79705..ac92685dd4e5 100644
--- a/drivers/net/ethernet/marvell/mvpp2.c
+++ b/drivers/net/ethernet/marvell/mvpp2.c
@@ -5666,6 +5666,7 @@ static void mvpp2_set_rx_mode(struct net_device *dev)
5666 int id = port->id; 5666 int id = port->id;
5667 bool allmulti = dev->flags & IFF_ALLMULTI; 5667 bool allmulti = dev->flags & IFF_ALLMULTI;
5668 5668
5669retry:
5669 mvpp2_prs_mac_promisc_set(priv, id, dev->flags & IFF_PROMISC); 5670 mvpp2_prs_mac_promisc_set(priv, id, dev->flags & IFF_PROMISC);
5670 mvpp2_prs_mac_multi_set(priv, id, MVPP2_PE_MAC_MC_ALL, allmulti); 5671 mvpp2_prs_mac_multi_set(priv, id, MVPP2_PE_MAC_MC_ALL, allmulti);
5671 mvpp2_prs_mac_multi_set(priv, id, MVPP2_PE_MAC_MC_IP6, allmulti); 5672 mvpp2_prs_mac_multi_set(priv, id, MVPP2_PE_MAC_MC_IP6, allmulti);
@@ -5673,9 +5674,13 @@ static void mvpp2_set_rx_mode(struct net_device *dev)
5673 /* Remove all port->id's mcast enries */ 5674 /* Remove all port->id's mcast enries */
5674 mvpp2_prs_mcast_del_all(priv, id); 5675 mvpp2_prs_mcast_del_all(priv, id);
5675 5676
5676 if (allmulti && !netdev_mc_empty(dev)) { 5677 if (!allmulti) {
5677 netdev_for_each_mc_addr(ha, dev) 5678 netdev_for_each_mc_addr(ha, dev) {
5678 mvpp2_prs_mac_da_accept(priv, id, ha->addr, true); 5679 if (mvpp2_prs_mac_da_accept(priv, id, ha->addr, true)) {
5680 allmulti = true;
5681 goto retry;
5682 }
5683 }
5679 } 5684 }
5680} 5685}
5681 5686
diff --git a/drivers/net/ethernet/mellanox/mlx4/qp.c b/drivers/net/ethernet/mellanox/mlx4/qp.c
index 168823dde79f..d8359ffba026 100644
--- a/drivers/net/ethernet/mellanox/mlx4/qp.c
+++ b/drivers/net/ethernet/mellanox/mlx4/qp.c
@@ -280,6 +280,9 @@ void mlx4_qp_release_range(struct mlx4_dev *dev, int base_qpn, int cnt)
280 u64 in_param = 0; 280 u64 in_param = 0;
281 int err; 281 int err;
282 282
283 if (!cnt)
284 return;
285
283 if (mlx4_is_mfunc(dev)) { 286 if (mlx4_is_mfunc(dev)) {
284 set_param_l(&in_param, base_qpn); 287 set_param_l(&in_param, base_qpn);
285 set_param_h(&in_param, cnt); 288 set_param_h(&in_param, cnt);
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c
index 738d541a2255..348ed1b0e58b 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c
@@ -1127,7 +1127,7 @@ static u8 _rtl8821ae_dbi_read(struct rtl_priv *rtlpriv, u16 addr)
1127 } 1127 }
1128 if (0 == tmp) { 1128 if (0 == tmp) {
1129 read_addr = REG_DBI_RDATA + addr % 4; 1129 read_addr = REG_DBI_RDATA + addr % 4;
1130 ret = rtl_read_word(rtlpriv, read_addr); 1130 ret = rtl_read_byte(rtlpriv, read_addr);
1131 } 1131 }
1132 return ret; 1132 return ret;
1133} 1133}
@@ -1169,7 +1169,8 @@ static void _rtl8821ae_enable_aspm_back_door(struct ieee80211_hw *hw)
1169 } 1169 }
1170 1170
1171 tmp = _rtl8821ae_dbi_read(rtlpriv, 0x70f); 1171 tmp = _rtl8821ae_dbi_read(rtlpriv, 0x70f);
1172 _rtl8821ae_dbi_write(rtlpriv, 0x70f, tmp | BIT(7)); 1172 _rtl8821ae_dbi_write(rtlpriv, 0x70f, tmp | BIT(7) |
1173 ASPM_L1_LATENCY << 3);
1173 1174
1174 tmp = _rtl8821ae_dbi_read(rtlpriv, 0x719); 1175 tmp = _rtl8821ae_dbi_read(rtlpriv, 0x719);
1175 _rtl8821ae_dbi_write(rtlpriv, 0x719, tmp | BIT(3) | BIT(4)); 1176 _rtl8821ae_dbi_write(rtlpriv, 0x719, tmp | BIT(3) | BIT(4));
diff --git a/drivers/net/wireless/realtek/rtlwifi/wifi.h b/drivers/net/wireless/realtek/rtlwifi/wifi.h
index b6faf624480e..d676d055feda 100644
--- a/drivers/net/wireless/realtek/rtlwifi/wifi.h
+++ b/drivers/net/wireless/realtek/rtlwifi/wifi.h
@@ -99,6 +99,7 @@
99#define RTL_USB_MAX_RX_COUNT 100 99#define RTL_USB_MAX_RX_COUNT 100
100#define QBSS_LOAD_SIZE 5 100#define QBSS_LOAD_SIZE 5
101#define MAX_WMMELE_LENGTH 64 101#define MAX_WMMELE_LENGTH 64
102#define ASPM_L1_LATENCY 7
102 103
103#define TOTAL_CAM_ENTRY 32 104#define TOTAL_CAM_ENTRY 32
104 105
diff --git a/drivers/rtc/rtc-opal.c b/drivers/rtc/rtc-opal.c
index df39ce02a99d..229dd2fe8f45 100644
--- a/drivers/rtc/rtc-opal.c
+++ b/drivers/rtc/rtc-opal.c
@@ -58,6 +58,7 @@ static void tm_to_opal(struct rtc_time *tm, u32 *y_m_d, u64 *h_m_s_ms)
58static int opal_get_rtc_time(struct device *dev, struct rtc_time *tm) 58static int opal_get_rtc_time(struct device *dev, struct rtc_time *tm)
59{ 59{
60 long rc = OPAL_BUSY; 60 long rc = OPAL_BUSY;
61 int retries = 10;
61 u32 y_m_d; 62 u32 y_m_d;
62 u64 h_m_s_ms; 63 u64 h_m_s_ms;
63 __be32 __y_m_d; 64 __be32 __y_m_d;
@@ -67,8 +68,11 @@ static int opal_get_rtc_time(struct device *dev, struct rtc_time *tm)
67 rc = opal_rtc_read(&__y_m_d, &__h_m_s_ms); 68 rc = opal_rtc_read(&__y_m_d, &__h_m_s_ms);
68 if (rc == OPAL_BUSY_EVENT) 69 if (rc == OPAL_BUSY_EVENT)
69 opal_poll_events(NULL); 70 opal_poll_events(NULL);
70 else 71 else if (retries-- && (rc == OPAL_HARDWARE
72 || rc == OPAL_INTERNAL_ERROR))
71 msleep(10); 73 msleep(10);
74 else if (rc != OPAL_BUSY && rc != OPAL_BUSY_EVENT)
75 break;
72 } 76 }
73 77
74 if (rc != OPAL_SUCCESS) 78 if (rc != OPAL_SUCCESS)
@@ -84,6 +88,7 @@ static int opal_get_rtc_time(struct device *dev, struct rtc_time *tm)
84static int opal_set_rtc_time(struct device *dev, struct rtc_time *tm) 88static int opal_set_rtc_time(struct device *dev, struct rtc_time *tm)
85{ 89{
86 long rc = OPAL_BUSY; 90 long rc = OPAL_BUSY;
91 int retries = 10;
87 u32 y_m_d = 0; 92 u32 y_m_d = 0;
88 u64 h_m_s_ms = 0; 93 u64 h_m_s_ms = 0;
89 94
@@ -92,8 +97,11 @@ static int opal_set_rtc_time(struct device *dev, struct rtc_time *tm)
92 rc = opal_rtc_write(y_m_d, h_m_s_ms); 97 rc = opal_rtc_write(y_m_d, h_m_s_ms);
93 if (rc == OPAL_BUSY_EVENT) 98 if (rc == OPAL_BUSY_EVENT)
94 opal_poll_events(NULL); 99 opal_poll_events(NULL);
95 else 100 else if (retries-- && (rc == OPAL_HARDWARE
101 || rc == OPAL_INTERNAL_ERROR))
96 msleep(10); 102 msleep(10);
103 else if (rc != OPAL_BUSY && rc != OPAL_BUSY_EVENT)
104 break;
97 } 105 }
98 106
99 return rc == OPAL_SUCCESS ? 0 : -EIO; 107 return rc == OPAL_SUCCESS ? 0 : -EIO;
diff --git a/drivers/video/console/dummycon.c b/drivers/video/console/dummycon.c
index 0efc52f11ad0..b30e7d87804b 100644
--- a/drivers/video/console/dummycon.c
+++ b/drivers/video/console/dummycon.c
@@ -68,7 +68,6 @@ const struct consw dummy_con = {
68 .con_switch = DUMMY, 68 .con_switch = DUMMY,
69 .con_blank = DUMMY, 69 .con_blank = DUMMY,
70 .con_font_set = DUMMY, 70 .con_font_set = DUMMY,
71 .con_font_get = DUMMY,
72 .con_font_default = DUMMY, 71 .con_font_default = DUMMY,
73 .con_font_copy = DUMMY, 72 .con_font_copy = DUMMY,
74 .con_set_palette = DUMMY, 73 .con_set_palette = DUMMY,
diff --git a/drivers/video/fbdev/atmel_lcdfb.c b/drivers/video/fbdev/atmel_lcdfb.c
index 19eb42b57d87..a6da82648c92 100644
--- a/drivers/video/fbdev/atmel_lcdfb.c
+++ b/drivers/video/fbdev/atmel_lcdfb.c
@@ -1120,7 +1120,7 @@ static int atmel_lcdfb_of_init(struct atmel_lcdfb_info *sinfo)
1120 goto put_display_node; 1120 goto put_display_node;
1121 } 1121 }
1122 1122
1123 timings_np = of_find_node_by_name(display_np, "display-timings"); 1123 timings_np = of_get_child_by_name(display_np, "display-timings");
1124 if (!timings_np) { 1124 if (!timings_np) {
1125 dev_err(dev, "failed to find display-timings node\n"); 1125 dev_err(dev, "failed to find display-timings node\n");
1126 ret = -ENODEV; 1126 ret = -ENODEV;
@@ -1141,6 +1141,12 @@ static int atmel_lcdfb_of_init(struct atmel_lcdfb_info *sinfo)
1141 fb_add_videomode(&fb_vm, &info->modelist); 1141 fb_add_videomode(&fb_vm, &info->modelist);
1142 } 1142 }
1143 1143
1144 /*
1145 * FIXME: Make sure we are not referencing any fields in display_np
1146 * and timings_np and drop our references to them before returning to
1147 * avoid leaking the nodes on probe deferral and driver unbind.
1148 */
1149
1144 return 0; 1150 return 0;
1145 1151
1146put_timings_node: 1152put_timings_node:
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 86d209fc4992..81b5a461d94e 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -1292,8 +1292,11 @@ next_slot:
1292 leaf = path->nodes[0]; 1292 leaf = path->nodes[0];
1293 if (path->slots[0] >= btrfs_header_nritems(leaf)) { 1293 if (path->slots[0] >= btrfs_header_nritems(leaf)) {
1294 ret = btrfs_next_leaf(root, path); 1294 ret = btrfs_next_leaf(root, path);
1295 if (ret < 0) 1295 if (ret < 0) {
1296 if (cow_start != (u64)-1)
1297 cur_offset = cow_start;
1296 goto error; 1298 goto error;
1299 }
1297 if (ret > 0) 1300 if (ret > 0)
1298 break; 1301 break;
1299 leaf = path->nodes[0]; 1302 leaf = path->nodes[0];
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
index ee7832e2d39d..d6359af9789d 100644
--- a/fs/btrfs/tree-log.c
+++ b/fs/btrfs/tree-log.c
@@ -26,6 +26,7 @@
26#include "print-tree.h" 26#include "print-tree.h"
27#include "backref.h" 27#include "backref.h"
28#include "hash.h" 28#include "hash.h"
29#include "inode-map.h"
29 30
30/* magic values for the inode_only field in btrfs_log_inode: 31/* magic values for the inode_only field in btrfs_log_inode:
31 * 32 *
@@ -2445,6 +2446,9 @@ static noinline int walk_down_log_tree(struct btrfs_trans_handle *trans,
2445 next); 2446 next);
2446 btrfs_wait_tree_block_writeback(next); 2447 btrfs_wait_tree_block_writeback(next);
2447 btrfs_tree_unlock(next); 2448 btrfs_tree_unlock(next);
2449 } else {
2450 if (test_and_clear_bit(EXTENT_BUFFER_DIRTY, &next->bflags))
2451 clear_extent_buffer_dirty(next);
2448 } 2452 }
2449 2453
2450 WARN_ON(root_owner != 2454 WARN_ON(root_owner !=
@@ -2524,6 +2528,9 @@ static noinline int walk_up_log_tree(struct btrfs_trans_handle *trans,
2524 next); 2528 next);
2525 btrfs_wait_tree_block_writeback(next); 2529 btrfs_wait_tree_block_writeback(next);
2526 btrfs_tree_unlock(next); 2530 btrfs_tree_unlock(next);
2531 } else {
2532 if (test_and_clear_bit(EXTENT_BUFFER_DIRTY, &next->bflags))
2533 clear_extent_buffer_dirty(next);
2527 } 2534 }
2528 2535
2529 WARN_ON(root_owner != BTRFS_TREE_LOG_OBJECTID); 2536 WARN_ON(root_owner != BTRFS_TREE_LOG_OBJECTID);
@@ -2600,6 +2607,9 @@ static int walk_log_tree(struct btrfs_trans_handle *trans,
2600 clean_tree_block(trans, log->fs_info, next); 2607 clean_tree_block(trans, log->fs_info, next);
2601 btrfs_wait_tree_block_writeback(next); 2608 btrfs_wait_tree_block_writeback(next);
2602 btrfs_tree_unlock(next); 2609 btrfs_tree_unlock(next);
2610 } else {
2611 if (test_and_clear_bit(EXTENT_BUFFER_DIRTY, &next->bflags))
2612 clear_extent_buffer_dirty(next);
2603 } 2613 }
2604 2614
2605 WARN_ON(log->root_key.objectid != 2615 WARN_ON(log->root_key.objectid !=
@@ -5514,6 +5524,23 @@ again:
5514 path); 5524 path);
5515 } 5525 }
5516 5526
5527 if (!ret && wc.stage == LOG_WALK_REPLAY_ALL) {
5528 struct btrfs_root *root = wc.replay_dest;
5529
5530 btrfs_release_path(path);
5531
5532 /*
5533 * We have just replayed everything, and the highest
5534 * objectid of fs roots probably has changed in case
5535 * some inode_item's got replayed.
5536 *
5537 * root->objectid_mutex is not acquired as log replay
5538 * could only happen during mount.
5539 */
5540 ret = btrfs_find_highest_objectid(root,
5541 &root->highest_objectid);
5542 }
5543
5517 key.offset = found_key.offset - 1; 5544 key.offset = found_key.offset - 1;
5518 wc.replay_dest->log_root = NULL; 5545 wc.replay_dest->log_root = NULL;
5519 free_extent_buffer(log->node); 5546 free_extent_buffer(log->node);
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index d3cbdbc8ad33..bc79e2ca4adb 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -688,6 +688,7 @@ __acquires(bitlock)
688 } 688 }
689 689
690 ext4_unlock_group(sb, grp); 690 ext4_unlock_group(sb, grp);
691 ext4_commit_super(sb, 1);
691 ext4_handle_error(sb); 692 ext4_handle_error(sb);
692 /* 693 /*
693 * We only get here in the ERRORS_RO case; relocking the group 694 * We only get here in the ERRORS_RO case; relocking the group
diff --git a/fs/namei.c b/fs/namei.c
index f8eeea956503..c54aaa759ed1 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -2015,6 +2015,9 @@ static const char *path_init(struct nameidata *nd, unsigned flags)
2015 int retval = 0; 2015 int retval = 0;
2016 const char *s = nd->name->name; 2016 const char *s = nd->name->name;
2017 2017
2018 if (!*s)
2019 flags &= ~LOOKUP_RCU;
2020
2018 nd->last_type = LAST_ROOT; /* if there are only slashes... */ 2021 nd->last_type = LAST_ROOT; /* if there are only slashes... */
2019 nd->flags = flags | LOOKUP_JUMPED | LOOKUP_PARENT; 2022 nd->flags = flags | LOOKUP_JUMPED | LOOKUP_PARENT;
2020 nd->depth = 0; 2023 nd->depth = 0;
diff --git a/include/linux/kaiser.h b/include/linux/kaiser.h
index 58c55b1589d0..b56c19010480 100644
--- a/include/linux/kaiser.h
+++ b/include/linux/kaiser.h
@@ -32,7 +32,7 @@ static inline void kaiser_init(void)
32{ 32{
33} 33}
34static inline int kaiser_add_mapping(unsigned long addr, 34static inline int kaiser_add_mapping(unsigned long addr,
35 unsigned long size, unsigned long flags) 35 unsigned long size, u64 flags)
36{ 36{
37 return 0; 37 return 0;
38} 38}
diff --git a/mm/memory.c b/mm/memory.c
index 9ac55172aa7b..31ca97f7ebbc 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -72,7 +72,7 @@
72 72
73#include "internal.h" 73#include "internal.h"
74 74
75#ifdef LAST_CPUPID_NOT_IN_PAGE_FLAGS 75#if defined(LAST_CPUPID_NOT_IN_PAGE_FLAGS) && !defined(CONFIG_COMPILE_TEST)
76#warning Unfortunate NUMA and NUMA Balancing config, growing page-frame for last_cpupid. 76#warning Unfortunate NUMA and NUMA Balancing config, growing page-frame for last_cpupid.
77#endif 77#endif
78 78
diff --git a/sound/core/seq/seq_clientmgr.c b/sound/core/seq/seq_clientmgr.c
index 7bb9fe7a2c8e..167b943469ab 100644
--- a/sound/core/seq/seq_clientmgr.c
+++ b/sound/core/seq/seq_clientmgr.c
@@ -1012,7 +1012,7 @@ static ssize_t snd_seq_write(struct file *file, const char __user *buf,
1012{ 1012{
1013 struct snd_seq_client *client = file->private_data; 1013 struct snd_seq_client *client = file->private_data;
1014 int written = 0, len; 1014 int written = 0, len;
1015 int err = -EINVAL; 1015 int err;
1016 struct snd_seq_event event; 1016 struct snd_seq_event event;
1017 1017
1018 if (!(snd_seq_file_flags(file) & SNDRV_SEQ_LFLG_OUTPUT)) 1018 if (!(snd_seq_file_flags(file) & SNDRV_SEQ_LFLG_OUTPUT))
@@ -1027,11 +1027,15 @@ static ssize_t snd_seq_write(struct file *file, const char __user *buf,
1027 1027
1028 /* allocate the pool now if the pool is not allocated yet */ 1028 /* allocate the pool now if the pool is not allocated yet */
1029 if (client->pool->size > 0 && !snd_seq_write_pool_allocated(client)) { 1029 if (client->pool->size > 0 && !snd_seq_write_pool_allocated(client)) {
1030 if (snd_seq_pool_init(client->pool) < 0) 1030 mutex_lock(&client->ioctl_mutex);
1031 err = snd_seq_pool_init(client->pool);
1032 mutex_unlock(&client->ioctl_mutex);
1033 if (err < 0)
1031 return -ENOMEM; 1034 return -ENOMEM;
1032 } 1035 }
1033 1036
1034 /* only process whole events */ 1037 /* only process whole events */
1038 err = -EINVAL;
1035 while (count >= sizeof(struct snd_seq_event)) { 1039 while (count >= sizeof(struct snd_seq_event)) {
1036 /* Read in the event header from the user */ 1040 /* Read in the event header from the user */
1037 len = sizeof(event); 1041 len = sizeof(event);
@@ -2196,7 +2200,6 @@ static int snd_seq_do_ioctl(struct snd_seq_client *client, unsigned int cmd,
2196 void __user *arg) 2200 void __user *arg)
2197{ 2201{
2198 struct seq_ioctl_table *p; 2202 struct seq_ioctl_table *p;
2199 int ret;
2200 2203
2201 switch (cmd) { 2204 switch (cmd) {
2202 case SNDRV_SEQ_IOCTL_PVERSION: 2205 case SNDRV_SEQ_IOCTL_PVERSION:
@@ -2210,12 +2213,8 @@ static int snd_seq_do_ioctl(struct snd_seq_client *client, unsigned int cmd,
2210 if (! arg) 2213 if (! arg)
2211 return -EFAULT; 2214 return -EFAULT;
2212 for (p = ioctl_tables; p->cmd; p++) { 2215 for (p = ioctl_tables; p->cmd; p++) {
2213 if (p->cmd == cmd) { 2216 if (p->cmd == cmd)
2214 mutex_lock(&client->ioctl_mutex); 2217 return p->func(client, arg);
2215 ret = p->func(client, arg);
2216 mutex_unlock(&client->ioctl_mutex);
2217 return ret;
2218 }
2219 } 2218 }
2220 pr_debug("ALSA: seq unknown ioctl() 0x%x (type='%c', number=0x%02x)\n", 2219 pr_debug("ALSA: seq unknown ioctl() 0x%x (type='%c', number=0x%02x)\n",
2221 cmd, _IOC_TYPE(cmd), _IOC_NR(cmd)); 2220 cmd, _IOC_TYPE(cmd), _IOC_NR(cmd));
@@ -2226,11 +2225,15 @@ static int snd_seq_do_ioctl(struct snd_seq_client *client, unsigned int cmd,
2226static long snd_seq_ioctl(struct file *file, unsigned int cmd, unsigned long arg) 2225static long snd_seq_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
2227{ 2226{
2228 struct snd_seq_client *client = file->private_data; 2227 struct snd_seq_client *client = file->private_data;
2228 long ret;
2229 2229
2230 if (snd_BUG_ON(!client)) 2230 if (snd_BUG_ON(!client))
2231 return -ENXIO; 2231 return -ENXIO;
2232 2232
2233 return snd_seq_do_ioctl(client, cmd, (void __user *) arg); 2233 mutex_lock(&client->ioctl_mutex);
2234 ret = snd_seq_do_ioctl(client, cmd, (void __user *) arg);
2235 mutex_unlock(&client->ioctl_mutex);
2236 return ret;
2234} 2237}
2235 2238
2236#ifdef CONFIG_COMPAT 2239#ifdef CONFIG_COMPAT
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index f14c1f288443..b302d056e5d3 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -3130,6 +3130,19 @@ static void alc269_fixup_pincfg_no_hp_to_lineout(struct hda_codec *codec,
3130 spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP; 3130 spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP;
3131} 3131}
3132 3132
3133static void alc269_fixup_pincfg_U7x7_headset_mic(struct hda_codec *codec,
3134 const struct hda_fixup *fix,
3135 int action)
3136{
3137 unsigned int cfg_headphone = snd_hda_codec_get_pincfg(codec, 0x21);
3138 unsigned int cfg_headset_mic = snd_hda_codec_get_pincfg(codec, 0x19);
3139
3140 if (cfg_headphone && cfg_headset_mic == 0x411111f0)
3141 snd_hda_codec_set_pincfg(codec, 0x19,
3142 (cfg_headphone & ~AC_DEFCFG_DEVICE) |
3143 (AC_JACK_MIC_IN << AC_DEFCFG_DEVICE_SHIFT));
3144}
3145
3133static void alc269_fixup_hweq(struct hda_codec *codec, 3146static void alc269_fixup_hweq(struct hda_codec *codec,
3134 const struct hda_fixup *fix, int action) 3147 const struct hda_fixup *fix, int action)
3135{ 3148{
@@ -4782,6 +4795,7 @@ enum {
4782 ALC269_FIXUP_LIFEBOOK_EXTMIC, 4795 ALC269_FIXUP_LIFEBOOK_EXTMIC,
4783 ALC269_FIXUP_LIFEBOOK_HP_PIN, 4796 ALC269_FIXUP_LIFEBOOK_HP_PIN,
4784 ALC269_FIXUP_LIFEBOOK_NO_HP_TO_LINEOUT, 4797 ALC269_FIXUP_LIFEBOOK_NO_HP_TO_LINEOUT,
4798 ALC255_FIXUP_LIFEBOOK_U7x7_HEADSET_MIC,
4785 ALC269_FIXUP_AMIC, 4799 ALC269_FIXUP_AMIC,
4786 ALC269_FIXUP_DMIC, 4800 ALC269_FIXUP_DMIC,
4787 ALC269VB_FIXUP_AMIC, 4801 ALC269VB_FIXUP_AMIC,
@@ -4972,6 +4986,10 @@ static const struct hda_fixup alc269_fixups[] = {
4972 .type = HDA_FIXUP_FUNC, 4986 .type = HDA_FIXUP_FUNC,
4973 .v.func = alc269_fixup_pincfg_no_hp_to_lineout, 4987 .v.func = alc269_fixup_pincfg_no_hp_to_lineout,
4974 }, 4988 },
4989 [ALC255_FIXUP_LIFEBOOK_U7x7_HEADSET_MIC] = {
4990 .type = HDA_FIXUP_FUNC,
4991 .v.func = alc269_fixup_pincfg_U7x7_headset_mic,
4992 },
4975 [ALC269_FIXUP_AMIC] = { 4993 [ALC269_FIXUP_AMIC] = {
4976 .type = HDA_FIXUP_PINS, 4994 .type = HDA_FIXUP_PINS,
4977 .v.pins = (const struct hda_pintbl[]) { 4995 .v.pins = (const struct hda_pintbl[]) {
@@ -5687,6 +5705,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
5687 SND_PCI_QUIRK(0x10cf, 0x159f, "Lifebook E780", ALC269_FIXUP_LIFEBOOK_NO_HP_TO_LINEOUT), 5705 SND_PCI_QUIRK(0x10cf, 0x159f, "Lifebook E780", ALC269_FIXUP_LIFEBOOK_NO_HP_TO_LINEOUT),
5688 SND_PCI_QUIRK(0x10cf, 0x15dc, "Lifebook T731", ALC269_FIXUP_LIFEBOOK_HP_PIN), 5706 SND_PCI_QUIRK(0x10cf, 0x15dc, "Lifebook T731", ALC269_FIXUP_LIFEBOOK_HP_PIN),
5689 SND_PCI_QUIRK(0x10cf, 0x1757, "Lifebook E752", ALC269_FIXUP_LIFEBOOK_HP_PIN), 5707 SND_PCI_QUIRK(0x10cf, 0x1757, "Lifebook E752", ALC269_FIXUP_LIFEBOOK_HP_PIN),
5708 SND_PCI_QUIRK(0x10cf, 0x1629, "Lifebook U7x7", ALC255_FIXUP_LIFEBOOK_U7x7_HEADSET_MIC),
5690 SND_PCI_QUIRK(0x10cf, 0x1845, "Lifebook U904", ALC269_FIXUP_LIFEBOOK_EXTMIC), 5709 SND_PCI_QUIRK(0x10cf, 0x1845, "Lifebook U904", ALC269_FIXUP_LIFEBOOK_EXTMIC),
5691 SND_PCI_QUIRK(0x144d, 0xc109, "Samsung Ativ book 9 (NP900X3G)", ALC269_FIXUP_INV_DMIC), 5710 SND_PCI_QUIRK(0x144d, 0xc109, "Samsung Ativ book 9 (NP900X3G)", ALC269_FIXUP_INV_DMIC),
5692 SND_PCI_QUIRK(0x1458, 0xfa53, "Gigabyte BXBT-2807", ALC283_FIXUP_BXBT2807_MIC), 5711 SND_PCI_QUIRK(0x1458, 0xfa53, "Gigabyte BXBT-2807", ALC283_FIXUP_BXBT2807_MIC),
@@ -5976,6 +5995,11 @@ static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = {
5976 {0x14, 0x90170110}, 5995 {0x14, 0x90170110},
5977 {0x21, 0x02211020}), 5996 {0x21, 0x02211020}),
5978 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, 5997 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
5998 {0x12, 0x90a60130},
5999 {0x14, 0x90170110},
6000 {0x14, 0x01011020},
6001 {0x21, 0x0221101f}),
6002 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
5979 ALC256_STANDARD_PINS), 6003 ALC256_STANDARD_PINS),
5980 SND_HDA_PIN_QUIRK(0x10ec0280, 0x103c, "HP", ALC280_FIXUP_HP_GPIO4, 6004 SND_HDA_PIN_QUIRK(0x10ec0280, 0x103c, "HP", ALC280_FIXUP_HP_GPIO4,
5981 {0x12, 0x90a60130}, 6005 {0x12, 0x90a60130},
@@ -6031,6 +6055,10 @@ static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = {
6031 {0x12, 0x90a60120}, 6055 {0x12, 0x90a60120},
6032 {0x14, 0x90170110}, 6056 {0x14, 0x90170110},
6033 {0x21, 0x0321101f}), 6057 {0x21, 0x0321101f}),
6058 SND_HDA_PIN_QUIRK(0x10ec0289, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE,
6059 {0x12, 0xb7a60130},
6060 {0x14, 0x90170110},
6061 {0x21, 0x04211020}),
6034 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1, 6062 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1,
6035 ALC290_STANDARD_PINS, 6063 ALC290_STANDARD_PINS,
6036 {0x15, 0x04211040}, 6064 {0x15, 0x04211040},
diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c
index c9ae29068c7c..c5447ff078b3 100644
--- a/sound/usb/mixer.c
+++ b/sound/usb/mixer.c
@@ -343,17 +343,20 @@ static int get_ctl_value_v2(struct usb_mixer_elem_info *cval, int request,
343 int validx, int *value_ret) 343 int validx, int *value_ret)
344{ 344{
345 struct snd_usb_audio *chip = cval->head.mixer->chip; 345 struct snd_usb_audio *chip = cval->head.mixer->chip;
346 unsigned char buf[4 + 3 * sizeof(__u32)]; /* enough space for one range */ 346 /* enough space for one range */
347 unsigned char buf[sizeof(__u16) + 3 * sizeof(__u32)];
347 unsigned char *val; 348 unsigned char *val;
348 int idx = 0, ret, size; 349 int idx = 0, ret, val_size, size;
349 __u8 bRequest; 350 __u8 bRequest;
350 351
352 val_size = uac2_ctl_value_size(cval->val_type);
353
351 if (request == UAC_GET_CUR) { 354 if (request == UAC_GET_CUR) {
352 bRequest = UAC2_CS_CUR; 355 bRequest = UAC2_CS_CUR;
353 size = uac2_ctl_value_size(cval->val_type); 356 size = val_size;
354 } else { 357 } else {
355 bRequest = UAC2_CS_RANGE; 358 bRequest = UAC2_CS_RANGE;
356 size = sizeof(buf); 359 size = sizeof(__u16) + 3 * val_size;
357 } 360 }
358 361
359 memset(buf, 0, sizeof(buf)); 362 memset(buf, 0, sizeof(buf));
@@ -386,16 +389,17 @@ error:
386 val = buf + sizeof(__u16); 389 val = buf + sizeof(__u16);
387 break; 390 break;
388 case UAC_GET_MAX: 391 case UAC_GET_MAX:
389 val = buf + sizeof(__u16) * 2; 392 val = buf + sizeof(__u16) + val_size;
390 break; 393 break;
391 case UAC_GET_RES: 394 case UAC_GET_RES:
392 val = buf + sizeof(__u16) * 3; 395 val = buf + sizeof(__u16) + val_size * 2;
393 break; 396 break;
394 default: 397 default:
395 return -EINVAL; 398 return -EINVAL;
396 } 399 }
397 400
398 *value_ret = convert_signed_value(cval, snd_usb_combine_bytes(val, sizeof(__u16))); 401 *value_ret = convert_signed_value(cval,
402 snd_usb_combine_bytes(val, val_size));
399 403
400 return 0; 404 return 0;
401} 405}
diff --git a/sound/usb/pcm.c b/sound/usb/pcm.c
index 48afae053c56..8e8db4ddf365 100644
--- a/sound/usb/pcm.c
+++ b/sound/usb/pcm.c
@@ -348,6 +348,15 @@ static int set_sync_ep_implicit_fb_quirk(struct snd_usb_substream *subs,
348 348
349 alts = &iface->altsetting[1]; 349 alts = &iface->altsetting[1];
350 goto add_sync_ep; 350 goto add_sync_ep;
351 case USB_ID(0x1397, 0x0002):
352 ep = 0x81;
353 iface = usb_ifnum_to_if(dev, 1);
354
355 if (!iface || iface->num_altsetting == 0)
356 return -EINVAL;
357
358 alts = &iface->altsetting[1];
359 goto add_sync_ep;
351 } 360 }
352 if (attr == USB_ENDPOINT_SYNC_ASYNC && 361 if (attr == USB_ENDPOINT_SYNC_ASYNC &&
353 altsd->bInterfaceClass == USB_CLASS_VENDOR_SPEC && 362 altsd->bInterfaceClass == USB_CLASS_VENDOR_SPEC &&