Magellan Linux

Annotation of /trunk/kernel-alx/patches-3.10/0179-3.10.80-all-fixes.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2667 - (hide annotations) (download)
Tue Jul 21 16:20:24 2015 UTC (8 years, 9 months ago) by niro
File size: 40262 byte(s)
-linux-3.10.80
1 niro 2667 diff --git a/Makefile b/Makefile
2     index e26cb1e56266..067433219984 100644
3     --- a/Makefile
4     +++ b/Makefile
5     @@ -1,6 +1,6 @@
6     VERSION = 3
7     PATCHLEVEL = 10
8     -SUBLEVEL = 79
9     +SUBLEVEL = 80
10     EXTRAVERSION =
11     NAME = TOSSUG Baby Fish
12    
13     @@ -241,7 +241,7 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
14    
15     HOSTCC = gcc
16     HOSTCXX = g++
17     -HOSTCFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer
18     +HOSTCFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89
19     HOSTCXXFLAGS = -O2
20    
21     # Decide whether to build built-in, modular, or both.
22     @@ -373,7 +373,9 @@ KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
23     -fno-strict-aliasing -fno-common \
24     -Werror-implicit-function-declaration \
25     -Wno-format-security \
26     - -fno-delete-null-pointer-checks
27     + -fno-delete-null-pointer-checks \
28     + -std=gnu89
29     +
30     KBUILD_AFLAGS_KERNEL :=
31     KBUILD_CFLAGS_KERNEL :=
32     KBUILD_AFLAGS := -D__ASSEMBLY__
33     diff --git a/arch/arm/boot/dts/imx27.dtsi b/arch/arm/boot/dts/imx27.dtsi
34     index 75bd11386516..77730a37344e 100644
35     --- a/arch/arm/boot/dts/imx27.dtsi
36     +++ b/arch/arm/boot/dts/imx27.dtsi
37     @@ -290,7 +290,7 @@
38    
39     fec: ethernet@1002b000 {
40     compatible = "fsl,imx27-fec";
41     - reg = <0x1002b000 0x4000>;
42     + reg = <0x1002b000 0x1000>;
43     interrupts = <50>;
44     clocks = <&clks 48>, <&clks 67>, <&clks 0>;
45     clock-names = "ipg", "ahb", "ptp";
46     diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S
47     index 4bc816a74a2e..f2646934c714 100644
48     --- a/arch/arm/kernel/entry-common.S
49     +++ b/arch/arm/kernel/entry-common.S
50     @@ -32,7 +32,9 @@ ret_fast_syscall:
51     UNWIND(.fnstart )
52     UNWIND(.cantunwind )
53     disable_irq @ disable interrupts
54     - ldr r1, [tsk, #TI_FLAGS]
55     + ldr r1, [tsk, #TI_FLAGS] @ re-check for syscall tracing
56     + tst r1, #_TIF_SYSCALL_WORK
57     + bne __sys_trace_return
58     tst r1, #_TIF_WORK_MASK
59     bne fast_work_pending
60     asm_trace_hardirqs_on
61     diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S
62     index f096e72262f4..1db685104ffc 100644
63     --- a/arch/powerpc/kernel/vmlinux.lds.S
64     +++ b/arch/powerpc/kernel/vmlinux.lds.S
65     @@ -213,6 +213,7 @@ SECTIONS
66     *(.opd)
67     }
68    
69     + . = ALIGN(256);
70     .got : AT(ADDR(.got) - LOAD_OFFSET) {
71     __toc_start = .;
72     #ifndef CONFIG_RELOCATABLE
73     diff --git a/arch/s390/crypto/ghash_s390.c b/arch/s390/crypto/ghash_s390.c
74     index 7940dc90e80b..b258110da952 100644
75     --- a/arch/s390/crypto/ghash_s390.c
76     +++ b/arch/s390/crypto/ghash_s390.c
77     @@ -16,11 +16,12 @@
78     #define GHASH_DIGEST_SIZE 16
79    
80     struct ghash_ctx {
81     - u8 icv[16];
82     - u8 key[16];
83     + u8 key[GHASH_BLOCK_SIZE];
84     };
85    
86     struct ghash_desc_ctx {
87     + u8 icv[GHASH_BLOCK_SIZE];
88     + u8 key[GHASH_BLOCK_SIZE];
89     u8 buffer[GHASH_BLOCK_SIZE];
90     u32 bytes;
91     };
92     @@ -28,8 +29,10 @@ struct ghash_desc_ctx {
93     static int ghash_init(struct shash_desc *desc)
94     {
95     struct ghash_desc_ctx *dctx = shash_desc_ctx(desc);
96     + struct ghash_ctx *ctx = crypto_shash_ctx(desc->tfm);
97    
98     memset(dctx, 0, sizeof(*dctx));
99     + memcpy(dctx->key, ctx->key, GHASH_BLOCK_SIZE);
100    
101     return 0;
102     }
103     @@ -45,7 +48,6 @@ static int ghash_setkey(struct crypto_shash *tfm,
104     }
105    
106     memcpy(ctx->key, key, GHASH_BLOCK_SIZE);
107     - memset(ctx->icv, 0, GHASH_BLOCK_SIZE);
108    
109     return 0;
110     }
111     @@ -54,7 +56,6 @@ static int ghash_update(struct shash_desc *desc,
112     const u8 *src, unsigned int srclen)
113     {
114     struct ghash_desc_ctx *dctx = shash_desc_ctx(desc);
115     - struct ghash_ctx *ctx = crypto_shash_ctx(desc->tfm);
116     unsigned int n;
117     u8 *buf = dctx->buffer;
118     int ret;
119     @@ -70,7 +71,7 @@ static int ghash_update(struct shash_desc *desc,
120     src += n;
121    
122     if (!dctx->bytes) {
123     - ret = crypt_s390_kimd(KIMD_GHASH, ctx, buf,
124     + ret = crypt_s390_kimd(KIMD_GHASH, dctx, buf,
125     GHASH_BLOCK_SIZE);
126     if (ret != GHASH_BLOCK_SIZE)
127     return -EIO;
128     @@ -79,7 +80,7 @@ static int ghash_update(struct shash_desc *desc,
129    
130     n = srclen & ~(GHASH_BLOCK_SIZE - 1);
131     if (n) {
132     - ret = crypt_s390_kimd(KIMD_GHASH, ctx, src, n);
133     + ret = crypt_s390_kimd(KIMD_GHASH, dctx, src, n);
134     if (ret != n)
135     return -EIO;
136     src += n;
137     @@ -94,7 +95,7 @@ static int ghash_update(struct shash_desc *desc,
138     return 0;
139     }
140    
141     -static int ghash_flush(struct ghash_ctx *ctx, struct ghash_desc_ctx *dctx)
142     +static int ghash_flush(struct ghash_desc_ctx *dctx)
143     {
144     u8 *buf = dctx->buffer;
145     int ret;
146     @@ -104,24 +105,24 @@ static int ghash_flush(struct ghash_ctx *ctx, struct ghash_desc_ctx *dctx)
147    
148     memset(pos, 0, dctx->bytes);
149    
150     - ret = crypt_s390_kimd(KIMD_GHASH, ctx, buf, GHASH_BLOCK_SIZE);
151     + ret = crypt_s390_kimd(KIMD_GHASH, dctx, buf, GHASH_BLOCK_SIZE);
152     if (ret != GHASH_BLOCK_SIZE)
153     return -EIO;
154     +
155     + dctx->bytes = 0;
156     }
157    
158     - dctx->bytes = 0;
159     return 0;
160     }
161    
162     static int ghash_final(struct shash_desc *desc, u8 *dst)
163     {
164     struct ghash_desc_ctx *dctx = shash_desc_ctx(desc);
165     - struct ghash_ctx *ctx = crypto_shash_ctx(desc->tfm);
166     int ret;
167    
168     - ret = ghash_flush(ctx, dctx);
169     + ret = ghash_flush(dctx);
170     if (!ret)
171     - memcpy(dst, ctx->icv, GHASH_BLOCK_SIZE);
172     + memcpy(dst, dctx->icv, GHASH_BLOCK_SIZE);
173     return ret;
174     }
175    
176     diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
177     index e14b1f8667bb..5a75ebf3d69f 100644
178     --- a/arch/x86/kvm/mmu.c
179     +++ b/arch/x86/kvm/mmu.c
180     @@ -3975,7 +3975,7 @@ void kvm_mmu_pte_write(struct kvm_vcpu *vcpu, gpa_t gpa,
181     ++vcpu->kvm->stat.mmu_pte_write;
182     kvm_mmu_audit(vcpu, AUDIT_PRE_PTE_WRITE);
183    
184     - mask.cr0_wp = mask.cr4_pae = mask.nxe = 1;
185     + mask.cr0_wp = mask.cr4_pae = mask.nxe = mask.smep_andnot_wp = 1;
186     for_each_gfn_indirect_valid_sp(vcpu->kvm, sp, gfn) {
187     if (detect_write_misaligned(sp, gpa, bytes) ||
188     detect_write_flooding(sp)) {
189     diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
190     index e72186340fec..11441ad69de3 100644
191     --- a/drivers/acpi/osl.c
192     +++ b/drivers/acpi/osl.c
193     @@ -173,7 +173,7 @@ static void __init acpi_request_region (struct acpi_generic_address *gas,
194     request_mem_region(addr, length, desc);
195     }
196    
197     -static int __init acpi_reserve_resources(void)
198     +static void __init acpi_reserve_resources(void)
199     {
200     acpi_request_region(&acpi_gbl_FADT.xpm1a_event_block, acpi_gbl_FADT.pm1_event_length,
201     "ACPI PM1a_EVT_BLK");
202     @@ -202,10 +202,7 @@ static int __init acpi_reserve_resources(void)
203     if (!(acpi_gbl_FADT.gpe1_block_length & 0x1))
204     acpi_request_region(&acpi_gbl_FADT.xgpe1_block,
205     acpi_gbl_FADT.gpe1_block_length, "ACPI GPE1_BLK");
206     -
207     - return 0;
208     }
209     -device_initcall(acpi_reserve_resources);
210    
211     void acpi_os_printf(const char *fmt, ...)
212     {
213     @@ -1727,6 +1724,7 @@ acpi_status __init acpi_os_initialize(void)
214    
215     acpi_status __init acpi_os_initialize1(void)
216     {
217     + acpi_reserve_resources();
218     kacpid_wq = alloc_workqueue("kacpid", 0, 1);
219     kacpi_notify_wq = alloc_workqueue("kacpi_notify", 0, 1);
220     kacpi_hotplug_wq = alloc_workqueue("kacpi_hotplug", 0, 1);
221     diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c
222     index 8905e03a53a2..cf5f35877559 100644
223     --- a/drivers/ata/libahci.c
224     +++ b/drivers/ata/libahci.c
225     @@ -1684,8 +1684,7 @@ static void ahci_handle_port_interrupt(struct ata_port *ap,
226     if (unlikely(resetting))
227     status &= ~PORT_IRQ_BAD_PMP;
228    
229     - /* if LPM is enabled, PHYRDY doesn't mean anything */
230     - if (ap->link.lpm_policy > ATA_LPM_MAX_POWER) {
231     + if (sata_lpm_ignore_phy_events(&ap->link)) {
232     status &= ~PORT_IRQ_PHYRDY;
233     ahci_scr_write(&ap->link, SCR_ERROR, SERR_PHYRDY_CHG);
234     }
235     diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
236     index ca7c23d58a03..5d47a040129a 100644
237     --- a/drivers/ata/libata-core.c
238     +++ b/drivers/ata/libata-core.c
239     @@ -6800,6 +6800,38 @@ u32 ata_wait_register(struct ata_port *ap, void __iomem *reg, u32 mask, u32 val,
240     return tmp;
241     }
242    
243     +/**
244     + * sata_lpm_ignore_phy_events - test if PHY event should be ignored
245     + * @link: Link receiving the event
246     + *
247     + * Test whether the received PHY event has to be ignored or not.
248     + *
249     + * LOCKING:
250     + * None:
251     + *
252     + * RETURNS:
253     + * True if the event has to be ignored.
254     + */
255     +bool sata_lpm_ignore_phy_events(struct ata_link *link)
256     +{
257     + unsigned long lpm_timeout = link->last_lpm_change +
258     + msecs_to_jiffies(ATA_TMOUT_SPURIOUS_PHY);
259     +
260     + /* if LPM is enabled, PHYRDY doesn't mean anything */
261     + if (link->lpm_policy > ATA_LPM_MAX_POWER)
262     + return true;
263     +
264     + /* ignore the first PHY event after the LPM policy changed
265     + * as it is might be spurious
266     + */
267     + if ((link->flags & ATA_LFLAG_CHANGED) &&
268     + time_before(jiffies, lpm_timeout))
269     + return true;
270     +
271     + return false;
272     +}
273     +EXPORT_SYMBOL_GPL(sata_lpm_ignore_phy_events);
274     +
275     /*
276     * Dummy port_ops
277     */
278     diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
279     index 370462fa8e01..063036d876b0 100644
280     --- a/drivers/ata/libata-eh.c
281     +++ b/drivers/ata/libata-eh.c
282     @@ -3481,6 +3481,9 @@ static int ata_eh_set_lpm(struct ata_link *link, enum ata_lpm_policy policy,
283     }
284     }
285    
286     + link->last_lpm_change = jiffies;
287     + link->flags |= ATA_LFLAG_CHANGED;
288     +
289     return 0;
290    
291     fail:
292     diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
293     index 47d8b68c5004..0ebe0c3f5074 100644
294     --- a/drivers/gpu/drm/i915/i915_drv.h
295     +++ b/drivers/gpu/drm/i915/i915_drv.h
296     @@ -1804,7 +1804,7 @@ void i915_teardown_sysfs(struct drm_device *dev_priv);
297     /* intel_i2c.c */
298     extern int intel_setup_gmbus(struct drm_device *dev);
299     extern void intel_teardown_gmbus(struct drm_device *dev);
300     -extern inline bool intel_gmbus_is_port_valid(unsigned port)
301     +static inline bool intel_gmbus_is_port_valid(unsigned port)
302     {
303     return (port >= GMBUS_PORT_SSC && port <= GMBUS_PORT_DPD);
304     }
305     @@ -1813,7 +1813,7 @@ extern struct i2c_adapter *intel_gmbus_get_adapter(
306     struct drm_i915_private *dev_priv, unsigned port);
307     extern void intel_gmbus_set_speed(struct i2c_adapter *adapter, int speed);
308     extern void intel_gmbus_force_bit(struct i2c_adapter *adapter, bool force_bit);
309     -extern inline bool intel_gmbus_is_forced_bit(struct i2c_adapter *adapter)
310     +static inline bool intel_gmbus_is_forced_bit(struct i2c_adapter *adapter)
311     {
312     return container_of(adapter, struct intel_gmbus, adapter)->force_bit;
313     }
314     diff --git a/drivers/hwmon/ntc_thermistor.c b/drivers/hwmon/ntc_thermistor.c
315     index c64d3d497c50..d7bb12ad4945 100644
316     --- a/drivers/hwmon/ntc_thermistor.c
317     +++ b/drivers/hwmon/ntc_thermistor.c
318     @@ -181,8 +181,10 @@ static struct ntc_thermistor_platform_data *
319     ntc_thermistor_parse_dt(struct platform_device *pdev)
320     {
321     struct iio_channel *chan;
322     + enum iio_chan_type type;
323     struct device_node *np = pdev->dev.of_node;
324     struct ntc_thermistor_platform_data *pdata;
325     + int ret;
326    
327     if (!np)
328     return NULL;
329     @@ -195,6 +197,13 @@ ntc_thermistor_parse_dt(struct platform_device *pdev)
330     if (IS_ERR(chan))
331     return ERR_CAST(chan);
332    
333     + ret = iio_get_channel_type(chan, &type);
334     + if (ret < 0)
335     + return ERR_PTR(ret);
336     +
337     + if (type != IIO_VOLTAGE)
338     + return ERR_PTR(-EINVAL);
339     +
340     if (of_property_read_u32(np, "pullup-uv", &pdata->pullup_uv))
341     return ERR_PTR(-ENODEV);
342     if (of_property_read_u32(np, "pullup-ohm", &pdata->pullup_ohm))
343     diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c
344     index 1af7df263368..dbd4f5ad3343 100644
345     --- a/drivers/input/mouse/elantech.c
346     +++ b/drivers/input/mouse/elantech.c
347     @@ -314,7 +314,7 @@ static void elantech_report_semi_mt_data(struct input_dev *dev,
348     unsigned int x2, unsigned int y2)
349     {
350     elantech_set_slot(dev, 0, num_fingers != 0, x1, y1);
351     - elantech_set_slot(dev, 1, num_fingers == 2, x2, y2);
352     + elantech_set_slot(dev, 1, num_fingers >= 2, x2, y2);
353     }
354    
355     /*
356     diff --git a/drivers/lguest/core.c b/drivers/lguest/core.c
357     index 0bf1e4edf04d..19da22249bd8 100644
358     --- a/drivers/lguest/core.c
359     +++ b/drivers/lguest/core.c
360     @@ -176,7 +176,7 @@ static void unmap_switcher(void)
361     bool lguest_address_ok(const struct lguest *lg,
362     unsigned long addr, unsigned long len)
363     {
364     - return (addr+len) / PAGE_SIZE < lg->pfn_limit && (addr+len >= addr);
365     + return addr+len <= lg->pfn_limit * PAGE_SIZE && (addr+len >= addr);
366     }
367    
368     /*
369     diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
370     index 1b6986ce5da9..ef18ca745b1e 100644
371     --- a/drivers/md/raid5.c
372     +++ b/drivers/md/raid5.c
373     @@ -1701,7 +1701,8 @@ static int resize_stripes(struct r5conf *conf, int newsize)
374    
375     conf->slab_cache = sc;
376     conf->active_name = 1-conf->active_name;
377     - conf->pool_size = newsize;
378     + if (!err)
379     + conf->pool_size = newsize;
380     return err;
381     }
382    
383     diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c
384     index 84b054b08462..e742761679fa 100644
385     --- a/drivers/mmc/host/atmel-mci.c
386     +++ b/drivers/mmc/host/atmel-mci.c
387     @@ -1295,7 +1295,7 @@ static void atmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
388    
389     if (ios->clock) {
390     unsigned int clock_min = ~0U;
391     - u32 clkdiv;
392     + int clkdiv;
393    
394     spin_lock_bh(&host->lock);
395     if (!host->mode_reg) {
396     @@ -1320,7 +1320,12 @@ static void atmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
397     /* Calculate clock divider */
398     if (host->caps.has_odd_clk_div) {
399     clkdiv = DIV_ROUND_UP(host->bus_hz, clock_min) - 2;
400     - if (clkdiv > 511) {
401     + if (clkdiv < 0) {
402     + dev_warn(&mmc->class_dev,
403     + "clock %u too fast; using %lu\n",
404     + clock_min, host->bus_hz / 2);
405     + clkdiv = 0;
406     + } else if (clkdiv > 511) {
407     dev_warn(&mmc->class_dev,
408     "clock %u too slow; using %lu\n",
409     clock_min, host->bus_hz / (511 + 2));
410     diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c
411     index 400b8679796a..44b6715ccfb1 100644
412     --- a/drivers/net/wireless/rt2x00/rt2800usb.c
413     +++ b/drivers/net/wireless/rt2x00/rt2800usb.c
414     @@ -1020,6 +1020,7 @@ static struct usb_device_id rt2800usb_device_table[] = {
415     { USB_DEVICE(0x07d1, 0x3c16) },
416     { USB_DEVICE(0x07d1, 0x3c17) },
417     { USB_DEVICE(0x2001, 0x3c1b) },
418     + { USB_DEVICE(0x2001, 0x3c25) },
419     /* Draytek */
420     { USB_DEVICE(0x07fa, 0x7712) },
421     /* DVICO */
422     diff --git a/drivers/net/wireless/rtlwifi/usb.c b/drivers/net/wireless/rtlwifi/usb.c
423     index 57b12a5883a0..3ad79736b255 100644
424     --- a/drivers/net/wireless/rtlwifi/usb.c
425     +++ b/drivers/net/wireless/rtlwifi/usb.c
426     @@ -119,7 +119,7 @@ static int _usbctrl_vendorreq_sync_read(struct usb_device *udev, u8 request,
427    
428     do {
429     status = usb_control_msg(udev, pipe, request, reqtype, value,
430     - index, pdata, len, 0); /*max. timeout*/
431     + index, pdata, len, 1000);
432     if (status < 0) {
433     /* firmware download is checksumed, don't retry */
434     if ((value >= FW_8192C_START_ADDRESS &&
435     diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211.h b/drivers/staging/rtl8187se/ieee80211/ieee80211.h
436     index 8fc9f588b056..9fdd566e8d4a 100644
437     --- a/drivers/staging/rtl8187se/ieee80211/ieee80211.h
438     +++ b/drivers/staging/rtl8187se/ieee80211/ieee80211.h
439     @@ -1447,12 +1447,12 @@ extern void ieee80211_sta_ps_send_null_frame(struct ieee80211_device *ieee, shor
440    
441     extern const long ieee80211_wlan_frequencies[];
442    
443     -extern inline void ieee80211_increment_scans(struct ieee80211_device *ieee)
444     +static inline void ieee80211_increment_scans(struct ieee80211_device *ieee)
445     {
446     ieee->scans++;
447     }
448    
449     -extern inline int ieee80211_get_scans(struct ieee80211_device *ieee)
450     +static inline int ieee80211_get_scans(struct ieee80211_device *ieee)
451     {
452     return ieee->scans;
453     }
454     diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
455     index 3485ef1dfab1..f35948ec5ebf 100644
456     --- a/drivers/staging/rtl8192e/rtllib.h
457     +++ b/drivers/staging/rtl8192e/rtllib.h
458     @@ -2761,7 +2761,6 @@ extern void rtllib_stop_scan(struct rtllib_device *ieee);
459     extern bool rtllib_act_scanning(struct rtllib_device *ieee, bool sync_scan);
460     extern void rtllib_stop_scan_syncro(struct rtllib_device *ieee);
461     extern void rtllib_start_scan_syncro(struct rtllib_device *ieee, u8 is_mesh);
462     -extern inline struct sk_buff *rtllib_probe_req(struct rtllib_device *ieee);
463     extern u8 MgntQuery_MgntFrameTxRate(struct rtllib_device *ieee);
464     extern void rtllib_sta_ps_send_null_frame(struct rtllib_device *ieee,
465     short pwr);
466     @@ -2943,12 +2942,12 @@ void rtllib_softmac_scan_syncro(struct rtllib_device *ieee, u8 is_mesh);
467    
468     extern const long rtllib_wlan_frequencies[];
469    
470     -extern inline void rtllib_increment_scans(struct rtllib_device *ieee)
471     +static inline void rtllib_increment_scans(struct rtllib_device *ieee)
472     {
473     ieee->scans++;
474     }
475    
476     -extern inline int rtllib_get_scans(struct rtllib_device *ieee)
477     +static inline int rtllib_get_scans(struct rtllib_device *ieee)
478     {
479     return ieee->scans;
480     }
481     diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c
482     index 4feecec8609c..0e4e83758d6a 100644
483     --- a/drivers/staging/rtl8192e/rtllib_softmac.c
484     +++ b/drivers/staging/rtl8192e/rtllib_softmac.c
485     @@ -341,7 +341,7 @@ inline void softmac_ps_mgmt_xmit(struct sk_buff *skb,
486     }
487     }
488    
489     -inline struct sk_buff *rtllib_probe_req(struct rtllib_device *ieee)
490     +static inline struct sk_buff *rtllib_probe_req(struct rtllib_device *ieee)
491     {
492     unsigned int len, rate_len;
493     u8 *tag;
494     diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211.h b/drivers/staging/rtl8192u/ieee80211/ieee80211.h
495     index 210898c8e66c..e1339c33888f 100644
496     --- a/drivers/staging/rtl8192u/ieee80211/ieee80211.h
497     +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211.h
498     @@ -2250,7 +2250,7 @@ static inline void *ieee80211_priv(struct net_device *dev)
499     return ((struct ieee80211_device *)netdev_priv(dev))->priv;
500     }
501    
502     -extern inline int ieee80211_is_empty_essid(const char *essid, int essid_len)
503     +static inline int ieee80211_is_empty_essid(const char *essid, int essid_len)
504     {
505     /* Single white space is for Linksys APs */
506     if (essid_len == 1 && essid[0] == ' ')
507     @@ -2266,7 +2266,7 @@ extern inline int ieee80211_is_empty_essid(const char *essid, int essid_len)
508     return 1;
509     }
510    
511     -extern inline int ieee80211_is_valid_mode(struct ieee80211_device *ieee, int mode)
512     +static inline int ieee80211_is_valid_mode(struct ieee80211_device *ieee, int mode)
513     {
514     /*
515     * It is possible for both access points and our device to support
516     @@ -2292,7 +2292,7 @@ extern inline int ieee80211_is_valid_mode(struct ieee80211_device *ieee, int mod
517     return 0;
518     }
519    
520     -extern inline int ieee80211_get_hdrlen(u16 fc)
521     +static inline int ieee80211_get_hdrlen(u16 fc)
522     {
523     int hdrlen = IEEE80211_3ADDR_LEN;
524    
525     @@ -2578,12 +2578,12 @@ void ieee80211_softmac_scan_syncro(struct ieee80211_device *ieee);
526    
527     extern const long ieee80211_wlan_frequencies[];
528    
529     -extern inline void ieee80211_increment_scans(struct ieee80211_device *ieee)
530     +static inline void ieee80211_increment_scans(struct ieee80211_device *ieee)
531     {
532     ieee->scans++;
533     }
534    
535     -extern inline int ieee80211_get_scans(struct ieee80211_device *ieee)
536     +static inline int ieee80211_get_scans(struct ieee80211_device *ieee)
537     {
538     return ieee->scans;
539     }
540     diff --git a/drivers/staging/rtl8712/ieee80211.h b/drivers/staging/rtl8712/ieee80211.h
541     index da4000e49da6..8269be80437a 100644
542     --- a/drivers/staging/rtl8712/ieee80211.h
543     +++ b/drivers/staging/rtl8712/ieee80211.h
544     @@ -734,7 +734,7 @@ enum ieee80211_state {
545     #define IEEE_G (1<<2)
546     #define IEEE_MODE_MASK (IEEE_A|IEEE_B|IEEE_G)
547    
548     -extern inline int ieee80211_is_empty_essid(const char *essid, int essid_len)
549     +static inline int ieee80211_is_empty_essid(const char *essid, int essid_len)
550     {
551     /* Single white space is for Linksys APs */
552     if (essid_len == 1 && essid[0] == ' ')
553     @@ -748,7 +748,7 @@ extern inline int ieee80211_is_empty_essid(const char *essid, int essid_len)
554     return 1;
555     }
556    
557     -extern inline int ieee80211_get_hdrlen(u16 fc)
558     +static inline int ieee80211_get_hdrlen(u16 fc)
559     {
560     int hdrlen = 24;
561    
562     diff --git a/drivers/staging/wlags49_h2/wl_internal.h b/drivers/staging/wlags49_h2/wl_internal.h
563     index b23078164149..11b00c39a98c 100644
564     --- a/drivers/staging/wlags49_h2/wl_internal.h
565     +++ b/drivers/staging/wlags49_h2/wl_internal.h
566     @@ -1014,7 +1014,7 @@ static inline void wl_unlock(struct wl_private *lp,
567     /* Interrupt enable disable functions */
568     /********************************************************************/
569    
570     -extern inline void wl_act_int_on(struct wl_private *lp)
571     +static inline void wl_act_int_on(struct wl_private *lp)
572     {
573     /*
574     * Only do something when the driver is handling
575     @@ -1026,7 +1026,7 @@ extern inline void wl_act_int_on(struct wl_private *lp)
576     }
577     }
578    
579     -extern inline void wl_act_int_off(struct wl_private *lp)
580     +static inline void wl_act_int_off(struct wl_private *lp)
581     {
582     /*
583     * Only do something when the driver is handling
584     diff --git a/drivers/target/target_core_pscsi.c b/drivers/target/target_core_pscsi.c
585     index b1e77ff9a636..244776bec1c7 100644
586     --- a/drivers/target/target_core_pscsi.c
587     +++ b/drivers/target/target_core_pscsi.c
588     @@ -520,6 +520,7 @@ static int pscsi_configure_device(struct se_device *dev)
589     " pdv_host_id: %d\n", pdv->pdv_host_id);
590     return -EINVAL;
591     }
592     + pdv->pdv_lld_host = sh;
593     }
594     } else {
595     if (phv->phv_mode == PHV_VIRTUAL_HOST_ID) {
596     @@ -602,6 +603,8 @@ static void pscsi_free_device(struct se_device *dev)
597     if ((phv->phv_mode == PHV_LLD_SCSI_HOST_NO) &&
598     (phv->phv_lld_host != NULL))
599     scsi_host_put(phv->phv_lld_host);
600     + else if (pdv->pdv_lld_host)
601     + scsi_host_put(pdv->pdv_lld_host);
602    
603     if ((sd->type == TYPE_DISK) || (sd->type == TYPE_ROM))
604     scsi_device_put(sd);
605     diff --git a/drivers/target/target_core_pscsi.h b/drivers/target/target_core_pscsi.h
606     index 1bd757dff8ee..820d3052b775 100644
607     --- a/drivers/target/target_core_pscsi.h
608     +++ b/drivers/target/target_core_pscsi.h
609     @@ -45,6 +45,7 @@ struct pscsi_dev_virt {
610     int pdv_lun_id;
611     struct block_device *pdv_bd;
612     struct scsi_device *pdv_sd;
613     + struct Scsi_Host *pdv_lld_host;
614     } ____cacheline_aligned;
615    
616     typedef enum phv_modes {
617     diff --git a/drivers/usb/gadget/configfs.c b/drivers/usb/gadget/configfs.c
618     index 80e7f75a56c7..3dab424515ef 100644
619     --- a/drivers/usb/gadget/configfs.c
620     +++ b/drivers/usb/gadget/configfs.c
621     @@ -757,6 +757,7 @@ static void purge_configs_funcs(struct gadget_info *gi)
622     }
623     }
624     c->next_interface_id = 0;
625     + memset(c->interface, 0, sizeof(c->interface));
626     c->superspeed = 0;
627     c->highspeed = 0;
628     c->fullspeed = 0;
629     diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
630     index bc7a886e3c36..30533952b4a3 100644
631     --- a/drivers/usb/host/xhci-ring.c
632     +++ b/drivers/usb/host/xhci-ring.c
633     @@ -2144,8 +2144,13 @@ static int process_isoc_td(struct xhci_hcd *xhci, struct xhci_td *td,
634     break;
635     case COMP_DEV_ERR:
636     case COMP_STALL:
637     + frame->status = -EPROTO;
638     + skip_td = true;
639     + break;
640     case COMP_TX_ERR:
641     frame->status = -EPROTO;
642     + if (event_trb != td->last_trb)
643     + return 0;
644     skip_td = true;
645     break;
646     case COMP_STOP:
647     @@ -2762,7 +2767,7 @@ irqreturn_t xhci_irq(struct usb_hcd *hcd)
648     xhci_halt(xhci);
649     hw_died:
650     spin_unlock(&xhci->lock);
651     - return -ESHUTDOWN;
652     + return IRQ_HANDLED;
653     }
654    
655     /*
656     diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
657     index 373d4dada565..ed8de724b285 100644
658     --- a/drivers/usb/host/xhci.h
659     +++ b/drivers/usb/host/xhci.h
660     @@ -1237,7 +1237,7 @@ union xhci_trb {
661     * since the command ring is 64-byte aligned.
662     * It must also be greater than 16.
663     */
664     -#define TRBS_PER_SEGMENT 64
665     +#define TRBS_PER_SEGMENT 256
666     /* Allow two commands + a link TRB, along with any reserved command TRBs */
667     #define MAX_RSVD_CMD_TRBS (TRBS_PER_SEGMENT - 3)
668     #define TRB_SEGMENT_SIZE (TRBS_PER_SEGMENT*16)
669     diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c
670     index 79e9ea005c63..691a82105180 100644
671     --- a/drivers/usb/serial/cp210x.c
672     +++ b/drivers/usb/serial/cp210x.c
673     @@ -127,6 +127,7 @@ static const struct usb_device_id id_table[] = {
674     { USB_DEVICE(0x10C4, 0x88A5) }, /* Planet Innovation Ingeni ZigBee USB Device */
675     { USB_DEVICE(0x10C4, 0x8946) }, /* Ketra N1 Wireless Interface */
676     { USB_DEVICE(0x10C4, 0x8977) }, /* CEL MeshWorks DevKit Device */
677     + { USB_DEVICE(0x10C4, 0x8998) }, /* KCF Technologies PRN */
678     { USB_DEVICE(0x10C4, 0xEA60) }, /* Silicon Labs factory default */
679     { USB_DEVICE(0x10C4, 0xEA61) }, /* Silicon Labs factory default */
680     { USB_DEVICE(0x10C4, 0xEA70) }, /* Silicon Labs factory default */
681     diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c
682     index de3e15d8eb10..33313caed504 100644
683     --- a/drivers/usb/serial/pl2303.c
684     +++ b/drivers/usb/serial/pl2303.c
685     @@ -63,7 +63,6 @@ static const struct usb_device_id id_table[] = {
686     { USB_DEVICE(DCU10_VENDOR_ID, DCU10_PRODUCT_ID) },
687     { USB_DEVICE(SITECOM_VENDOR_ID, SITECOM_PRODUCT_ID) },
688     { USB_DEVICE(ALCATEL_VENDOR_ID, ALCATEL_PRODUCT_ID) },
689     - { USB_DEVICE(SAMSUNG_VENDOR_ID, SAMSUNG_PRODUCT_ID) },
690     { USB_DEVICE(SIEMENS_VENDOR_ID, SIEMENS_PRODUCT_ID_SX1) },
691     { USB_DEVICE(SIEMENS_VENDOR_ID, SIEMENS_PRODUCT_ID_X65) },
692     { USB_DEVICE(SIEMENS_VENDOR_ID, SIEMENS_PRODUCT_ID_X75) },
693     diff --git a/drivers/usb/serial/pl2303.h b/drivers/usb/serial/pl2303.h
694     index 71fd9da1d6e7..e3b7af8adfb7 100644
695     --- a/drivers/usb/serial/pl2303.h
696     +++ b/drivers/usb/serial/pl2303.h
697     @@ -62,10 +62,6 @@
698     #define ALCATEL_VENDOR_ID 0x11f7
699     #define ALCATEL_PRODUCT_ID 0x02df
700    
701     -/* Samsung I330 phone cradle */
702     -#define SAMSUNG_VENDOR_ID 0x04e8
703     -#define SAMSUNG_PRODUCT_ID 0x8001
704     -
705     #define SIEMENS_VENDOR_ID 0x11f5
706     #define SIEMENS_PRODUCT_ID_SX1 0x0001
707     #define SIEMENS_PRODUCT_ID_X65 0x0003
708     diff --git a/drivers/usb/serial/visor.c b/drivers/usb/serial/visor.c
709     index 9910aa2edf4b..727905de0ba4 100644
710     --- a/drivers/usb/serial/visor.c
711     +++ b/drivers/usb/serial/visor.c
712     @@ -96,7 +96,7 @@ static struct usb_device_id id_table [] = {
713     .driver_info = (kernel_ulong_t)&palm_os_4_probe },
714     { USB_DEVICE(ACER_VENDOR_ID, ACER_S10_ID),
715     .driver_info = (kernel_ulong_t)&palm_os_4_probe },
716     - { USB_DEVICE(SAMSUNG_VENDOR_ID, SAMSUNG_SCH_I330_ID),
717     + { USB_DEVICE_INTERFACE_CLASS(SAMSUNG_VENDOR_ID, SAMSUNG_SCH_I330_ID, 0xff),
718     .driver_info = (kernel_ulong_t)&palm_os_4_probe },
719     { USB_DEVICE(SAMSUNG_VENDOR_ID, SAMSUNG_SPH_I500_ID),
720     .driver_info = (kernel_ulong_t)&palm_os_4_probe },
721     diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h
722     index 7f625306ea80..821e1e2f70f6 100644
723     --- a/drivers/usb/storage/unusual_devs.h
724     +++ b/drivers/usb/storage/unusual_devs.h
725     @@ -760,6 +760,13 @@ UNUSUAL_DEV( 0x059f, 0x0643, 0x0000, 0x0000,
726     USB_SC_DEVICE, USB_PR_DEVICE, NULL,
727     US_FL_GO_SLOW ),
728    
729     +/* Reported by Christian Schaller <cschalle@redhat.com> */
730     +UNUSUAL_DEV( 0x059f, 0x0651, 0x0000, 0x0000,
731     + "LaCie",
732     + "External HDD",
733     + USB_SC_DEVICE, USB_PR_DEVICE, NULL,
734     + US_FL_NO_WP_DETECT ),
735     +
736     /* Submitted by Joel Bourquard <numlock@freesurf.ch>
737     * Some versions of this device need the SubClass and Protocol overrides
738     * while others don't.
739     diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
740     index 53f620a4350e..618bcc84a09e 100644
741     --- a/fs/binfmt_elf.c
742     +++ b/fs/binfmt_elf.c
743     @@ -824,7 +824,7 @@ static int load_elf_binary(struct linux_binprm *bprm)
744     total_size = total_mapping_size(elf_phdata,
745     loc->elf_ex.e_phnum);
746     if (!total_size) {
747     - error = -EINVAL;
748     + retval = -EINVAL;
749     goto out_free_dentry;
750     }
751     }
752     diff --git a/fs/dcache.c b/fs/dcache.c
753     index efa4602e064f..e2800926ae05 100644
754     --- a/fs/dcache.c
755     +++ b/fs/dcache.c
756     @@ -1179,13 +1179,13 @@ ascend:
757     /* might go back up the wrong parent if we have had a rename. */
758     if (!locked && read_seqretry(&rename_lock, seq))
759     goto rename_retry;
760     - next = child->d_child.next;
761     - while (unlikely(child->d_flags & DCACHE_DENTRY_KILLED)) {
762     + /* go into the first sibling still alive */
763     + do {
764     + next = child->d_child.next;
765     if (next == &this_parent->d_subdirs)
766     goto ascend;
767     child = list_entry(next, struct dentry, d_child);
768     - next = next->next;
769     - }
770     + } while (unlikely(child->d_flags & DCACHE_DENTRY_KILLED));
771     rcu_read_unlock();
772     goto resume;
773     }
774     diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
775     index 7fbd1c5b74af..df633bb25909 100644
776     --- a/fs/ext4/extents.c
777     +++ b/fs/ext4/extents.c
778     @@ -363,7 +363,7 @@ static int ext4_valid_extent(struct inode *inode, struct ext4_extent *ext)
779     ext4_lblk_t lblock = le32_to_cpu(ext->ee_block);
780     ext4_lblk_t last = lblock + len - 1;
781    
782     - if (lblock > last)
783     + if (len == 0 || lblock > last)
784     return 0;
785     return ext4_data_block_valid(EXT4_SB(inode->i_sb), block, len);
786     }
787     diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
788     index 9e3d8dd6c40a..8a277505a3be 100644
789     --- a/fs/ext4/inode.c
790     +++ b/fs/ext4/inode.c
791     @@ -1032,7 +1032,8 @@ retry_journal:
792     ext4_journal_stop(handle);
793     goto retry_grab;
794     }
795     - wait_on_page_writeback(page);
796     + /* In case writeback began while the page was unlocked */
797     + wait_for_stable_page(page);
798    
799     if (ext4_should_dioread_nolock(inode))
800     ret = __block_write_begin(page, pos, len, ext4_get_block_write);
801     @@ -2729,7 +2730,7 @@ retry_journal:
802     goto retry_grab;
803     }
804     /* In case writeback began while the page was unlocked */
805     - wait_on_page_writeback(page);
806     + wait_for_stable_page(page);
807    
808     ret = __block_write_begin(page, pos, len, ext4_da_get_block_prep);
809     if (ret < 0) {
810     diff --git a/fs/fhandle.c b/fs/fhandle.c
811     index 999ff5c3cab0..d59712dfa3e7 100644
812     --- a/fs/fhandle.c
813     +++ b/fs/fhandle.c
814     @@ -195,8 +195,9 @@ static int handle_to_path(int mountdirfd, struct file_handle __user *ufh,
815     goto out_err;
816     }
817     /* copy the full handle */
818     - if (copy_from_user(handle, ufh,
819     - sizeof(struct file_handle) +
820     + *handle = f_handle;
821     + if (copy_from_user(&handle->f_handle,
822     + &ufh->f_handle,
823     f_handle.handle_bytes)) {
824     retval = -EFAULT;
825     goto out_handle;
826     diff --git a/fs/omfs/inode.c b/fs/omfs/inode.c
827     index d8b0afde2179..2dba0caf1f4a 100644
828     --- a/fs/omfs/inode.c
829     +++ b/fs/omfs/inode.c
830     @@ -361,7 +361,7 @@ nomem:
831     }
832    
833     enum {
834     - Opt_uid, Opt_gid, Opt_umask, Opt_dmask, Opt_fmask
835     + Opt_uid, Opt_gid, Opt_umask, Opt_dmask, Opt_fmask, Opt_err
836     };
837    
838     static const match_table_t tokens = {
839     @@ -370,6 +370,7 @@ static const match_table_t tokens = {
840     {Opt_umask, "umask=%o"},
841     {Opt_dmask, "dmask=%o"},
842     {Opt_fmask, "fmask=%o"},
843     + {Opt_err, NULL},
844     };
845    
846     static int parse_options(char *options, struct omfs_sb_info *sbi)
847     diff --git a/include/linux/libata.h b/include/linux/libata.h
848     index cc82cfb66259..8e5d45fa83cf 100644
849     --- a/include/linux/libata.h
850     +++ b/include/linux/libata.h
851     @@ -187,6 +187,7 @@ enum {
852     ATA_LFLAG_SW_ACTIVITY = (1 << 7), /* keep activity stats */
853     ATA_LFLAG_NO_LPM = (1 << 8), /* disable LPM on this link */
854     ATA_LFLAG_RST_ONCE = (1 << 9), /* limit recovery to one reset */
855     + ATA_LFLAG_CHANGED = (1 << 10), /* LPM state changed on this link */
856    
857     /* struct ata_port flags */
858     ATA_FLAG_SLAVE_POSS = (1 << 0), /* host supports slave dev */
859     @@ -289,6 +290,12 @@ enum {
860     */
861     ATA_TMOUT_PMP_SRST_WAIT = 5000,
862    
863     + /* When the LPM policy is set to ATA_LPM_MAX_POWER, there might
864     + * be a spurious PHY event, so ignore the first PHY event that
865     + * occurs within 10s after the policy change.
866     + */
867     + ATA_TMOUT_SPURIOUS_PHY = 10000,
868     +
869     /* ATA bus states */
870     BUS_UNKNOWN = 0,
871     BUS_DMA = 1,
872     @@ -736,6 +743,8 @@ struct ata_link {
873     struct ata_eh_context eh_context;
874    
875     struct ata_device device[ATA_MAX_DEVICES];
876     +
877     + unsigned long last_lpm_change; /* when last LPM change happened */
878     };
879     #define ATA_LINK_CLEAR_BEGIN offsetof(struct ata_link, active_tag)
880     #define ATA_LINK_CLEAR_END offsetof(struct ata_link, device[0])
881     @@ -1085,6 +1094,7 @@ extern struct ata_device *ata_dev_pair(struct ata_device *adev);
882     extern int ata_do_set_mode(struct ata_link *link, struct ata_device **r_failed_dev);
883     extern void ata_scsi_port_error_handler(struct Scsi_Host *host, struct ata_port *ap);
884     extern void ata_scsi_cmd_error_handler(struct Scsi_Host *host, struct ata_port *ap, struct list_head *eh_q);
885     +extern bool sata_lpm_ignore_phy_events(struct ata_link *link);
886    
887     extern int ata_cable_40wire(struct ata_port *ap);
888     extern int ata_cable_80wire(struct ata_port *ap);
889     diff --git a/lib/strnlen_user.c b/lib/strnlen_user.c
890     index a28df5206d95..11649615c505 100644
891     --- a/lib/strnlen_user.c
892     +++ b/lib/strnlen_user.c
893     @@ -57,7 +57,8 @@ static inline long do_strnlen_user(const char __user *src, unsigned long count,
894     return res + find_zero(data) + 1 - align;
895     }
896     res += sizeof(unsigned long);
897     - if (unlikely(max < sizeof(unsigned long)))
898     + /* We already handled 'unsigned long' bytes. Did we do it all ? */
899     + if (unlikely(max <= sizeof(unsigned long)))
900     break;
901     max -= sizeof(unsigned long);
902     if (unlikely(__get_user(c,(unsigned long __user *)(src+res))))
903     diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c
904     index 1b51d9216e7e..7665ce336e2b 100644
905     --- a/net/ceph/osd_client.c
906     +++ b/net/ceph/osd_client.c
907     @@ -1702,20 +1702,29 @@ static void kick_requests(struct ceph_osd_client *osdc, bool force_resend,
908     err = __map_request(osdc, req,
909     force_resend || force_resend_writes);
910     dout("__map_request returned %d\n", err);
911     - if (err == 0)
912     - continue; /* no change and no osd was specified */
913     if (err < 0)
914     continue; /* hrm! */
915     - if (req->r_osd == NULL) {
916     - dout("tid %llu maps to no valid osd\n", req->r_tid);
917     - needmap++; /* request a newer map */
918     - continue;
919     - }
920     + if (req->r_osd == NULL || err > 0) {
921     + if (req->r_osd == NULL) {
922     + dout("lingering %p tid %llu maps to no osd\n",
923     + req, req->r_tid);
924     + /*
925     + * A homeless lingering request makes
926     + * no sense, as it's job is to keep
927     + * a particular OSD connection open.
928     + * Request a newer map and kick the
929     + * request, knowing that it won't be
930     + * resent until we actually get a map
931     + * that can tell us where to send it.
932     + */
933     + needmap++;
934     + }
935    
936     - dout("kicking lingering %p tid %llu osd%d\n", req, req->r_tid,
937     - req->r_osd ? req->r_osd->o_osd : -1);
938     - __register_request(osdc, req);
939     - __unregister_linger_request(osdc, req);
940     + dout("kicking lingering %p tid %llu osd%d\n", req,
941     + req->r_tid, req->r_osd ? req->r_osd->o_osd : -1);
942     + __register_request(osdc, req);
943     + __unregister_linger_request(osdc, req);
944     + }
945     }
946     reset_changed_osds(osdc);
947     mutex_unlock(&osdc->request_mutex);
948     diff --git a/net/socket.c b/net/socket.c
949     index fc90b4f0da3c..53b6e411f7a4 100644
950     --- a/net/socket.c
951     +++ b/net/socket.c
952     @@ -1988,14 +1988,12 @@ static int ___sys_sendmsg(struct socket *sock, struct msghdr __user *msg,
953     int err, ctl_len, total_len;
954    
955     err = -EFAULT;
956     - if (MSG_CMSG_COMPAT & flags) {
957     - if (get_compat_msghdr(msg_sys, msg_compat))
958     - return -EFAULT;
959     - } else {
960     + if (MSG_CMSG_COMPAT & flags)
961     + err = get_compat_msghdr(msg_sys, msg_compat);
962     + else
963     err = copy_msghdr_from_user(msg_sys, msg);
964     - if (err)
965     - return err;
966     - }
967     + if (err)
968     + return err;
969    
970     if (msg_sys->msg_iovlen > UIO_FASTIOV) {
971     err = -EMSGSIZE;
972     @@ -2200,14 +2198,12 @@ static int ___sys_recvmsg(struct socket *sock, struct msghdr __user *msg,
973     struct sockaddr __user *uaddr;
974     int __user *uaddr_len;
975    
976     - if (MSG_CMSG_COMPAT & flags) {
977     - if (get_compat_msghdr(msg_sys, msg_compat))
978     - return -EFAULT;
979     - } else {
980     + if (MSG_CMSG_COMPAT & flags)
981     + err = get_compat_msghdr(msg_sys, msg_compat);
982     + else
983     err = copy_msghdr_from_user(msg_sys, msg);
984     - if (err)
985     - return err;
986     - }
987     + if (err)
988     + return err;
989    
990     if (msg_sys->msg_iovlen > UIO_FASTIOV) {
991     err = -EMSGSIZE;
992     diff --git a/net/sunrpc/auth_gss/gss_rpc_xdr.c b/net/sunrpc/auth_gss/gss_rpc_xdr.c
993     index f0f78c5f1c7d..e0062c544ac8 100644
994     --- a/net/sunrpc/auth_gss/gss_rpc_xdr.c
995     +++ b/net/sunrpc/auth_gss/gss_rpc_xdr.c
996     @@ -794,20 +794,26 @@ int gssx_dec_accept_sec_context(struct rpc_rqst *rqstp,
997     {
998     u32 value_follows;
999     int err;
1000     + struct page *scratch;
1001     +
1002     + scratch = alloc_page(GFP_KERNEL);
1003     + if (!scratch)
1004     + return -ENOMEM;
1005     + xdr_set_scratch_buffer(xdr, page_address(scratch), PAGE_SIZE);
1006    
1007     /* res->status */
1008     err = gssx_dec_status(xdr, &res->status);
1009     if (err)
1010     - return err;
1011     + goto out_free;
1012    
1013     /* res->context_handle */
1014     err = gssx_dec_bool(xdr, &value_follows);
1015     if (err)
1016     - return err;
1017     + goto out_free;
1018     if (value_follows) {
1019     err = gssx_dec_ctx(xdr, res->context_handle);
1020     if (err)
1021     - return err;
1022     + goto out_free;
1023     } else {
1024     res->context_handle = NULL;
1025     }
1026     @@ -815,11 +821,11 @@ int gssx_dec_accept_sec_context(struct rpc_rqst *rqstp,
1027     /* res->output_token */
1028     err = gssx_dec_bool(xdr, &value_follows);
1029     if (err)
1030     - return err;
1031     + goto out_free;
1032     if (value_follows) {
1033     err = gssx_dec_buffer(xdr, res->output_token);
1034     if (err)
1035     - return err;
1036     + goto out_free;
1037     } else {
1038     res->output_token = NULL;
1039     }
1040     @@ -827,14 +833,17 @@ int gssx_dec_accept_sec_context(struct rpc_rqst *rqstp,
1041     /* res->delegated_cred_handle */
1042     err = gssx_dec_bool(xdr, &value_follows);
1043     if (err)
1044     - return err;
1045     + goto out_free;
1046     if (value_follows) {
1047     /* we do not support upcall servers sending this data. */
1048     - return -EINVAL;
1049     + err = -EINVAL;
1050     + goto out_free;
1051     }
1052    
1053     /* res->options */
1054     err = gssx_dec_option_array(xdr, &res->options);
1055    
1056     +out_free:
1057     + __free_page(scratch);
1058     return err;
1059     }
1060     diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c
1061     index fab909908a42..3cda292f74e4 100644
1062     --- a/sound/pci/hda/patch_conexant.c
1063     +++ b/sound/pci/hda/patch_conexant.c
1064     @@ -3490,6 +3490,14 @@ static const struct hda_codec_preset snd_hda_preset_conexant[] = {
1065     .patch = patch_conexant_auto },
1066     { .id = 0x14f150b9, .name = "CX20665",
1067     .patch = patch_conexant_auto },
1068     + { .id = 0x14f150f1, .name = "CX20721",
1069     + .patch = patch_conexant_auto },
1070     + { .id = 0x14f150f2, .name = "CX20722",
1071     + .patch = patch_conexant_auto },
1072     + { .id = 0x14f150f3, .name = "CX20723",
1073     + .patch = patch_conexant_auto },
1074     + { .id = 0x14f150f4, .name = "CX20724",
1075     + .patch = patch_conexant_auto },
1076     { .id = 0x14f1510f, .name = "CX20751/2",
1077     .patch = patch_conexant_auto },
1078     { .id = 0x14f15110, .name = "CX20751/2",
1079     @@ -3524,6 +3532,10 @@ MODULE_ALIAS("snd-hda-codec-id:14f150ab");
1080     MODULE_ALIAS("snd-hda-codec-id:14f150ac");
1081     MODULE_ALIAS("snd-hda-codec-id:14f150b8");
1082     MODULE_ALIAS("snd-hda-codec-id:14f150b9");
1083     +MODULE_ALIAS("snd-hda-codec-id:14f150f1");
1084     +MODULE_ALIAS("snd-hda-codec-id:14f150f2");
1085     +MODULE_ALIAS("snd-hda-codec-id:14f150f3");
1086     +MODULE_ALIAS("snd-hda-codec-id:14f150f4");
1087     MODULE_ALIAS("snd-hda-codec-id:14f1510f");
1088     MODULE_ALIAS("snd-hda-codec-id:14f15110");
1089     MODULE_ALIAS("snd-hda-codec-id:14f15111");
1090     diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
1091     index a8eb7fe2766e..444019696f85 100644
1092     --- a/sound/pci/hda/patch_realtek.c
1093     +++ b/sound/pci/hda/patch_realtek.c
1094     @@ -3736,6 +3736,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
1095     SND_PCI_QUIRK_VENDOR(0x1025, "Acer Aspire", ALC271_FIXUP_DMIC),
1096     SND_PCI_QUIRK(0x10cf, 0x1475, "Lifebook", ALC269_FIXUP_LIFEBOOK),
1097     SND_PCI_QUIRK(0x10cf, 0x15dc, "Lifebook T731", ALC269_FIXUP_LIFEBOOK_HP_PIN),
1098     + SND_PCI_QUIRK(0x10cf, 0x1757, "Lifebook E752", ALC269_FIXUP_LIFEBOOK_HP_PIN),
1099     SND_PCI_QUIRK(0x10cf, 0x1845, "Lifebook U904", ALC269_FIXUP_LIFEBOOK_EXTMIC),
1100     SND_PCI_QUIRK(0x17aa, 0x20f2, "Thinkpad SL410/510", ALC269_FIXUP_SKU_IGNORE),
1101     SND_PCI_QUIRK(0x17aa, 0x215e, "Thinkpad L512", ALC269_FIXUP_SKU_IGNORE),
1102     diff --git a/sound/soc/codecs/mc13783.c b/sound/soc/codecs/mc13783.c
1103     index 8a8d9364e87f..d0fc21559a85 100644
1104     --- a/sound/soc/codecs/mc13783.c
1105     +++ b/sound/soc/codecs/mc13783.c
1106     @@ -604,14 +604,14 @@ static int mc13783_probe(struct snd_soc_codec *codec)
1107     AUDIO_SSI_SEL, 0);
1108     else
1109     mc13xxx_reg_rmw(priv->mc13xxx, MC13783_AUDIO_CODEC,
1110     - 0, AUDIO_SSI_SEL);
1111     + AUDIO_SSI_SEL, AUDIO_SSI_SEL);
1112    
1113     if (priv->dac_ssi_port == MC13783_SSI1_PORT)
1114     mc13xxx_reg_rmw(priv->mc13xxx, MC13783_AUDIO_DAC,
1115     AUDIO_SSI_SEL, 0);
1116     else
1117     mc13xxx_reg_rmw(priv->mc13xxx, MC13783_AUDIO_DAC,
1118     - 0, AUDIO_SSI_SEL);
1119     + AUDIO_SSI_SEL, AUDIO_SSI_SEL);
1120    
1121     mc13xxx_unlock(priv->mc13xxx);
1122    
1123     diff --git a/sound/soc/codecs/wm8960.c b/sound/soc/codecs/wm8960.c
1124     index 4a8decf85a4a..39f65bc9de56 100644
1125     --- a/sound/soc/codecs/wm8960.c
1126     +++ b/sound/soc/codecs/wm8960.c
1127     @@ -392,7 +392,7 @@ static const struct snd_soc_dapm_route audio_paths[] = {
1128     { "Right Input Mixer", "Boost Switch", "Right Boost Mixer", },
1129     { "Right Input Mixer", NULL, "RINPUT1", }, /* Really Boost Switch */
1130     { "Right Input Mixer", NULL, "RINPUT2" },
1131     - { "Right Input Mixer", NULL, "LINPUT3" },
1132     + { "Right Input Mixer", NULL, "RINPUT3" },
1133    
1134     { "Left ADC", NULL, "Left Input Mixer" },
1135     { "Right ADC", NULL, "Right Input Mixer" },
1136     diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c
1137     index 29e95f93d482..6e746c7474bf 100644
1138     --- a/sound/soc/codecs/wm8994.c
1139     +++ b/sound/soc/codecs/wm8994.c
1140     @@ -2679,7 +2679,7 @@ static struct {
1141     };
1142    
1143     static int fs_ratios[] = {
1144     - 64, 128, 192, 256, 348, 512, 768, 1024, 1408, 1536
1145     + 64, 128, 192, 256, 384, 512, 768, 1024, 1408, 1536
1146     };
1147    
1148     static int bclk_divs[] = {