Linux 4.4.97
Greg KH
maintainerI'm announcing the release of the 4.4.97 kernel.
All users of the 4.4 kernel series must upgrade.
The updated 4.4.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.4.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/arm/boot/dts/armada-375.dtsi | 4 arch/arm/boot/dts/armada-38x.dtsi | 4 arch/arm/boot/dts/armada-39x.dtsi | 4 arch/arm/include/asm/Kbuild | 1 arch/arm/include/asm/unaligned.h | 27 + arch/arm/mach-pxa/balloon3.c | 1 arch/arm/mach-pxa/colibri-pxa270-income.c | 1 arch/arm/mach-pxa/corgi.c | 1 arch/arm/mach-pxa/trizeps4.c | 1 arch/arm/mach-pxa/vpac270.c | 1 arch/arm/mach-pxa/zeus.c | 1 arch/arm/mach-pxa/zylonite.c | 1 arch/arm64/kernel/traps.c | 2 drivers/base/power/wakeirq.c | 7 drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 9 drivers/gpu/drm/msm/msm_gem_submit.c | 7 drivers/i2c/busses/i2c-riic.c | 30 + drivers/media/pci/bt8xx/dvb-bt8xx.c | 1 drivers/media/platform/exynos4-is/fimc-is.c | 8 drivers/media/usb/cx231xx/cx231xx-core.c | 7 drivers/mfd/ab8500-sysctrl.c | 14 drivers/mfd/axp20x.c | 8 drivers/misc/mei/client.c | 3 drivers/mmc/host/s3cmci.c | 1 drivers/platform/x86/intel_mid_thermal.c | 1 drivers/s390/block/dasd.c | 7 drivers/scsi/aacraid/aachba.c | 289 ++++++------- drivers/staging/lustre/lustre/include/lustre/lustre_user.h | 18 drivers/staging/lustre/lustre/ldlm/ldlm_lock.c | 7 drivers/staging/lustre/lustre/llite/rw26.c | 4 drivers/staging/lustre/lustre/ptlrpc/service.c | 21 drivers/staging/rtl8712/ieee80211.h | 84 +-- drivers/staging/rtl8712/rtl871x_xmit.c | 7 drivers/xen/manage.c | 12 fs/cifs/dir.c | 5 fs/ext4/mballoc.c | 6 fs/ext4/super.c | 4 fs/ocfs2/alloc.c | 24 - lib/asn1_decoder.c | 3 samples/trace_events/trace-events-sample.c | 14 security/keys/keyring.c | 39 - sound/core/seq/seq_clientmgr.c | 2 sound/core/timer_compat.c | 17 sound/soc/codecs/adau17x1.c | 24 + sound/soc/codecs/adau17x1.h | 2 tools/perf/scripts/perl/Perf-Trace-Util/Build | 4 tools/perf/util/parse-events.c | 3 48 files changed, 464 insertions(+), 279 deletions(-)
Alexander Boyko (1):
staging: lustre: ptlrpc: skip lock if export failed
Alexander Usyskin (1):
mei: return error on notification request to a disconnected client
Arnd Bergmann (2):
ARM: 8715/1: add a private asm/unaligned.h
mmc: s3cmci: include linux/interrupt.h for tasklet_struct
Arvind Yadav (1):
exynos4-is: fimc-is: Unmap region obtained by of_iomap()
Ashish Samant (1):
ocfs2: fstrim: Fix start offset of first cluster group during fstrim
Chris Brandt (1):
i2c: riic: correctly finish transfers
Dan Carpenter (1):
drm/msm: fix an integer overflow test
Eric Biggers (2):
KEYS: return full count in keyring_read() if buffer is too small
KEYS: fix out-of-bounds read during ASN.1 parsing
Greg Kroah-Hartman (1):
Linux 4.4.97
Grygorii Strashko (1):
PM / wakeirq: report a wakeup_event on dedicated wekup irq
Hans de Goede (1):
mfd: axp20x: Fix axp288 PEK_DBR and PEK_DBF irqs being swapped
Jan Beulich (1):
xen/manage: correct return value check on xenbus_scanf()
Jan Kara (2):
ext4: fix stripe-unaligned allocations
ext4: do not use stripe_width if it is not set
Javier Martinez Canillas (1):
platform/x86: intel_mid_thermal: Fix module autoload
Juergen Gross (1):
xen: don't print error message in case of missing Xenstore entry
Kasin Li (1):
drm/msm: Fix potential buffer overflow issue
Larry Finger (2):
staging: rtl8712u: Fix endian settings for structs describing network packets
staging: r8712u: Fix Sparse warning in rtl871x_xmit.c
Linus Torvalds (1):
Fix tracing sample code warning.
Linus Walleij (1):
mfd: ab8500-sysctrl: Handle probe deferral
Mark Rutland (1):
arm64: ensure __dump_instr() checks addr_limit
Namhyung Kim (1):
perf tools: Fix build failure on perl script context
Oleh Kravchenko (1):
cx231xx: Fix I2C on Internal Master 3 Bus
Raghava Aditya Renukunta (1):
scsi: aacraid: Process Error for response I/O
Rex Zhu (1):
drm/amdgpu: when dpm disabled, also need to stop/start vce.
Ricard Wanderlof (1):
ASoC: adau17x1: Workaround for noise bug in ADC
Ronnie Sahlberg (1):
cifs: check MaxPathNameComponentLength != 0 before using it
Stefan Haberland (1):
s390/dasd: check for device error pointer within state change interrupts
Steven Rostedt (VMware) (1):
tracing/samples: Fix creation and deletion of simple_thread_fn creation
Sudip Mukherjee (1):
bt8xx: fix memory leak
Taeung Song (1):
perf tools: Only increase index if perf_evsel__new_idx() succeeds
Takashi Iwai (2):
ALSA: timer: Add missing mutex lock for compat ioctls
ALSA: seq: Fix nested rwsem annotation for lockdep splat
Ulf Hansson (1):
ARM: pxa: Don't rely on public mmc header to include leds.h
Yan Markman (1):
ARM: dts: mvebu: pl310-cache disable double-linefill
Yang Sheng (1):
staging: lustre: llite: don't invoke direct_IO for the EOF case
frank zago (1):
staging: lustre: hsm: stack overrun in hai_dump_data_field
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 4 -SUBLEVEL = 96 +SUBLEVEL = 97 EXTRAVERSION = NAME = Blurry Fish Butt
arch/arm/boot/dts/armada-375.dtsi +2 -2
@@ -176,9 +176,9 @@ reg = <0x8000 0x1000>; cache-unified; cache-level = <2>; - arm,double-linefill-incr = <1>; + arm,double-linefill-incr = <0>; arm,double-linefill-wrap = <0>; - arm,double-linefill = <1>; + arm,double-linefill = <0>; prefetch-data = <1>; };
arch/arm/boot/dts/armada-38x.dtsi +2 -2
@@ -143,9 +143,9 @@ reg = <0x8000 0x1000>; cache-unified; cache-level = <2>; - arm,double-linefill-incr = <1>; + arm,double-linefill-incr = <0>; arm,double-linefill-wrap = <0>; - arm,double-linefill = <1>; + arm,double-linefill = <0>; prefetch-data = <1>; };
arch/arm/boot/dts/armada-39x.dtsi +2 -2
@@ -104,9 +104,9 @@ reg = <0x8000 0x1000>; cache-unified; cache-level = <2>; - arm,double-linefill-incr = <1>; + arm,double-linefill-incr = <0>; arm,double-linefill-wrap = <0>; - arm,double-linefill = <1>; + arm,double-linefill = <0>; prefetch-data = <1>; };
arch/arm/include/asm/Kbuild +0 -1
@@ -36,4 +36,3 @@ generic-y += termbits.h generic-y += termios.h generic-y += timex.h generic-y += trace_clock.h -generic-y += unaligned.h
arch/arm/include/asm/unaligned.h new file +27 -0
@@ -0,0 +1,27 @@ +#ifndef __ASM_ARM_UNALIGNED_H +#define __ASM_ARM_UNALIGNED_H + +/* +* We generally want to set CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS on ARMv6+, +* but we don't want to use linux/unaligned/access_ok.h since that can lead +* to traps on unaligned stm/ldm or strd/ldrd. +*/ +#include <asm/byteorder.h> + +#if defined(__LITTLE_ENDIAN) +# include <linux/unaligned/le_struct.h> +# include <linux/unaligned/be_byteshift.h> +# include <linux/unaligned/generic.h> +# define get_unaligned __get_unaligned_le +# define put_unaligned __put_unaligned_le +#elif defined(__BIG_ENDIAN) +# include <linux/unaligned/be_struct.h> +# include <linux/unaligned/le_byteshift.h> +# include <linux/unaligned/generic.h> +# define get_unaligned __get_unaligned_be +# define put_unaligned __put_unaligned_be +#else +# error need to define endianess +#endif + +#endif /* __ASM_ARM_UNALIGNED_H */
arch/arm/mach-pxa/balloon3.c +1 -0
@@ -17,6 +17,7 @@#include <linux/init.h> #include <linux/platform_device.h> #include <linux/interrupt.h> +#include <linux/leds.h> #include <linux/sched.h> #include <linux/bitops.h> #include <linux/fb.h>
arch/arm/mach-pxa/colibri-pxa270-income.c +1 -0
@@ -17,6 +17,7 @@#include <linux/gpio.h> #include <linux/init.h> #include <linux/interrupt.h> +#include <linux/leds.h> #include <linux/ioport.h> #include <linux/kernel.h> #include <linux/platform_device.h>
arch/arm/mach-pxa/corgi.c +1 -0
@@ -18,6 +18,7 @@#include <linux/major.h> #include <linux/fs.h> #include <linux/interrupt.h> +#include <linux/leds.h> #include <linux/mmc/host.h> #include <linux/mtd/physmap.h> #include <linux/pm.h>
arch/arm/mach-pxa/trizeps4.c +1 -0
@@ -16,6 +16,7 @@#include <linux/kernel.h> #include <linux/platform_device.h> #include <linux/interrupt.h> +#include <linux/leds.h> #include <linux/export.h> #include <linux/sched.h> #include <linux/bitops.h>
arch/arm/mach-pxa/vpac270.c +1 -0
@@ -15,6 +15,7 @@#include <linux/irq.h> #include <linux/gpio_keys.h> #include <linux/input.h> +#include <linux/leds.h> #include <linux/gpio.h> #include <linux/usb/gpio_vbus.h> #include <linux/mtd/mtd.h>
arch/arm/mach-pxa/zeus.c +1 -0
@@ -13,6 +13,7 @@#include <linux/cpufreq.h> #include <linux/interrupt.h> +#include <linux/leds.h> #include <linux/irq.h> #include <linux/pm.h> #include <linux/gpio.h>
arch/arm/mach-pxa/zylonite.c +1 -0
@@ -16,6 +16,7 @@#include <linux/module.h> #include <linux/kernel.h> #include <linux/interrupt.h> +#include <linux/leds.h> #include <linux/init.h> #include <linux/platform_device.h> #include <linux/gpio.h>
arch/arm64/kernel/traps.c +1 -1
@@ -129,7 +129,7 @@ static void dump_instr(const char *lvl, struct pt_regs *regs)for (i =-4 ; i <1 ; i++) {unsigned int val, bad; - bad =__get_user (val, &((u32 *)addr)[i]); + bad =get_user (val, &((u32 *)addr)[i]);if (!bad) p +=sprintf (p, i ==0 ?"(%08x) " :"%08x " , val);
drivers/base/power/wakeirq.c +7 -0
@@ -141,6 +141,13 @@ static irqreturn_t handle_threaded_wake_irq(int irq, void *_wirq)struct wake_irq *wirq = _wirq;int res; +/* Maybe abort suspend? */ +if (irqd_is_wakeup_set (irq_get_irq_data (irq))) { +pm_wakeup_event (wirq->dev,0 ); + +return IRQ_HANDLED ; + } +/* We don't want RPM_ASYNC or RPM_NOWAIT here */ res =pm_runtime_resume (wirq->dev);if (res <0 )
drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c +9 -0
@@ -284,6 +284,10 @@ static void amdgpu_vce_idle_work_handler(struct work_struct *work)amdgpu_dpm_enable_vce (adev, false); }else {amdgpu_asic_set_vce_clocks (adev,0 ,0 ); +amdgpu_set_powergating_state (adev,AMD_IP_BLOCK_TYPE_VCE , +AMD_PG_STATE_GATE ); +amdgpu_set_clockgating_state (adev,AMD_IP_BLOCK_TYPE_VCE , +AMD_CG_STATE_GATE ); } }else { schedule_delayed_work(&adev->vce.idle_work,
@@ -315,6 +319,11 @@ static void amdgpu_vce_note_usage(struct amdgpu_device *adev)amdgpu_dpm_enable_vce (adev, true); }else {amdgpu_asic_set_vce_clocks (adev,53300 ,40000 ); +amdgpu_set_clockgating_state (adev,AMD_IP_BLOCK_TYPE_VCE , +AMD_CG_STATE_UNGATE ); +amdgpu_set_powergating_state (adev,AMD_IP_BLOCK_TYPE_VCE , +AMD_PG_STATE_UNGATE ); + } } }
drivers/gpu/drm/msm/msm_gem_submit.c +5 -2
@@ -34,10 +34,13 @@ static inline void __user *to_user_ptr(u64 address) }static struct msm_gem_submit *submit_create (struct drm_device *dev, -struct msm_gpu *gpu,int nr) +struct msm_gpu *gpu,uint32_t nr) {struct msm_gem_submit *submit; -int sz =sizeof (*submit) + (nr *sizeof (submit->bos[0 ])); +uint64_t sz =sizeof (*submit) + ((u64 )nr *sizeof (submit->bos[0 ])); + +if (sz >SIZE_MAX ) +return NULL ; submit =kmalloc (sz,GFP_TEMPORARY | __GFP_NOWARN | __GFP_NORETRY);if (submit) {
drivers/i2c/busses/i2c-riic.c +23 -7
@@ -80,6 +80,7 @@#define ICIER_TEIE 0x40#define ICIER_RIE 0x20#define ICIER_NAKIE 0x10 +#define ICIER_SPIE 0x08#define ICSR2_NACKF 0x10
@@ -216,11 +217,10 @@ static irqreturn_t riic_tend_isr(int irq, void *data)return IRQ_NONE ; } -if (riic->is_last || riic->err) +if (riic->is_last || riic->err) { +riic_clear_set_bit (riic,0 ,ICIER_SPIE ,RIIC_ICIER );writeb (ICCR2_SP , riic->base +RIIC_ICCR2 ); - -writeb (0 , riic->base +RIIC_ICIER ); -complete (&riic->msg_done); + }return IRQ_HANDLED ; }
@@ -240,13 +240,13 @@ static irqreturn_t riic_rdrf_isr(int irq, void *data)if (riic->bytes_left ==1 ) {/* STOP must come before we set ACKBT! */ -if (riic->is_last) +if (riic->is_last) { +riic_clear_set_bit (riic,0 ,ICIER_SPIE ,RIIC_ICIER );writeb (ICCR2_SP , riic->base +RIIC_ICCR2 ); + }riic_clear_set_bit (riic,0 ,ICMR3_ACKBT ,RIIC_ICMR3 ); -writeb (0 , riic->base +RIIC_ICIER ); -complete (&riic->msg_done); }else {riic_clear_set_bit (riic,ICMR3_ACKBT ,0 ,RIIC_ICMR3 ); }
@@ -259,6 +259,21 @@ static irqreturn_t riic_rdrf_isr(int irq, void *data)return IRQ_HANDLED ; } +static irqreturn_t riic_stop_isr (int irq,void *data) +{ +struct riic_dev *riic = data; + +/* read back registers to confirm writes have fully propagated */ +writeb (0 , riic->base +RIIC_ICSR2 ); +readb (riic->base +RIIC_ICSR2 ); +writeb (0 , riic->base +RIIC_ICIER ); +readb (riic->base +RIIC_ICIER ); + +complete (&riic->msg_done); + +return IRQ_HANDLED ; +} +static u32 riic_func (struct i2c_adapter *adap) {return I2C_FUNC_I2C |I2C_FUNC_SMBUS_EMUL ;
@@ -326,6 +341,7 @@ static struct riic_irq_desc riic_irqs[] = { { .res_num = 0, .isr = riic_tend_isr, .name = "riic-tend" }, { .res_num = 1, .isr = riic_rdrf_isr, .name = "riic-rdrf" }, { .res_num = 2, .isr = riic_tdre_isr, .name = "riic-tdre" }, + { .res_num = 3, .isr = riic_stop_isr, .name = "riic-stop" }, { .res_num = 5, .isr = riic_tend_isr, .name = "riic-nack" }, };
drivers/media/pci/bt8xx/dvb-bt8xx.c +1 -0
@@ -680,6 +680,7 @@ static void frontend_init(struct dvb_bt8xx_card *card, u32 type)/* DST is not a frontend, attaching the ASIC */ if (dvb_attach (dst_attach, state, &card->dvb_adapter) ==NULL ) {pr_err ("%s: Could not find a Twinhan DST\n" , __func__); +kfree (state);break ; }/* Attach other DST peripherals if any */
drivers/media/platform/exynos4-is/fimc-is.c +6 -2
@@ -815,12 +815,13 @@ static int fimc_is_probe(struct platform_device *pdev) is->irq =irq_of_parse_and_map (dev->of_node,0 );if (!is->irq) {dev_err (dev,"no irq found\n" ); -return -EINVAL ; + ret = -EINVAL ; + goto err_iounmap; } ret =fimc_is_get_clocks (is);if (ret <0 ) -return ret; + goto err_iounmap;platform_set_drvdata (pdev, is);
@@ -880,6 +881,8 @@ err_irq:free_irq (is->irq, is); err_clk:fimc_is_put_clocks (is); +err_iounmap: +iounmap (is->pmu_regs);return ret; }
@@ -935,6 +938,7 @@ static int fimc_is_remove(struct platform_device *pdev)fimc_is_unregister_subdevs (is);vb2_dma_contig_cleanup_ctx (is->alloc_ctx);fimc_is_put_clocks (is); +iounmap (is->pmu_regs);fimc_is_debugfs_remove (is);release_firmware (is->fw.f_w);fimc_is_free_cpu_memory (is);
drivers/media/usb/cx231xx/cx231xx-core.c +6 -1
@@ -356,7 +356,12 @@ int cx231xx_send_vendor_cmd(struct cx231xx *dev,*/ if ((ven_req->wLength >4 ) && ((ven_req->bRequest ==0x4 ) || (ven_req->bRequest ==0x5 ) || - (ven_req->bRequest ==0x6 ))) { + (ven_req->bRequest ==0x6 ) || + +/* Internal Master 3 Bus can send +* and receive only 4 bytes per time +*/ + (ven_req->bRequest ==0x2 ))) { unsend_size =0 ; pdata = ven_req->pBuff;
drivers/mfd/ab8500-sysctrl.c +11 -3
@@ -99,7 +99,7 @@ int ab8500_sysctrl_read(u16 reg, u8 *value)u8 bank;if (sysctrl_dev ==NULL ) -return -EINVAL ; +return -EPROBE_DEFER ; bank = (reg >>8 );if (!valid_bank (bank))
@@ -115,11 +115,13 @@ int ab8500_sysctrl_write(u16 reg, u8 mask, u8 value)u8 bank;if (sysctrl_dev ==NULL ) -return -EINVAL ; +return -EPROBE_DEFER ; bank = (reg >>8 ); -if (!valid_bank (bank)) +if (!valid_bank (bank)) { +pr_err ("invalid bank\n" );return -EINVAL ; + }return abx500_mask_and_set_register_interruptible (sysctrl_dev, bank, (u8)(reg &0xFF ), mask, value);
@@ -180,9 +182,15 @@ static int ab8500_sysctrl_remove(struct platform_device *pdev)return 0 ; } +static const struct of_device_id ab8500_sysctrl_match[] = { + { .compatible ="stericsson,ab8500-sysctrl" , }, + {} +}; +static struct platform_driver ab8500_sysctrl_driver = { .driver = { .name ="ab8500-sysctrl" , + .of_match_table = ab8500_sysctrl_match, }, .probe = ab8500_sysctrl_probe, .remove = ab8500_sysctrl_remove,
drivers/mfd/axp20x.c +4 -4
@@ -164,14 +164,14 @@ static struct resource axp22x_pek_resources[] = {static struct resource axp288_power_button_resources[] = { { .name ="PEK_DBR" , - .start =AXP288_IRQ_POKN , - .end =AXP288_IRQ_POKN , + .start =AXP288_IRQ_POKP , + .end =AXP288_IRQ_POKP , .flags =IORESOURCE_IRQ , }, { .name ="PEK_DBF" , - .start =AXP288_IRQ_POKP , - .end =AXP288_IRQ_POKP , + .start =AXP288_IRQ_POKN , + .end =AXP288_IRQ_POKN , .flags =IORESOURCE_IRQ , }, };
drivers/misc/mei/client.c +3 -0
@@ -1300,6 +1300,9 @@ int mei_cl_notify_request(struct mei_cl *cl, struct file *file, u8 request)return -EOPNOTSUPP ; } +if (!mei_cl_is_connected (cl)) +return -ENODEV ; + rets =pm_runtime_get (dev->dev);if (rets <0 && rets != -EINPROGRESS ) {pm_runtime_put_noidle (dev->dev);
drivers/mmc/host/s3cmci.c +1 -0
@@ -21,6 +21,7 @@#include <linux/debugfs.h> #include <linux/seq_file.h> #include <linux/gpio.h> +#include <linux/interrupt.h> #include <linux/irq.h> #include <linux/io.h>
drivers/platform/x86/intel_mid_thermal.c +1 -0
@@ -550,6 +550,7 @@ static const struct platform_device_id therm_id_table[] = { { "msic_thermal", 1 }, { } }; +MODULE_DEVICE_TABLE(platform, therm_id_table); static struct platform_driver mid_thermal_driver = { .driver = {
drivers/s390/block/dasd.c +5 -2
@@ -1635,8 +1635,11 @@ void dasd_int_handler(struct ccw_device *cdev, unsigned long intparm,/* check for for attention message */ if (scsw_dstat (&irb->scsw) &DEV_STAT_ATTENTION ) { device =dasd_device_from_cdev_locked (cdev); - device->discipline->check_attention (device, irb->esw.esw1.lpum); -dasd_put_device (device); +if (!IS_ERR (device)) { + device->discipline->check_attention (device, + irb->esw.esw1.lpum); +dasd_put_device (device); + } }if (!cqr)
drivers/scsi/aacraid/aachba.c +151 -138
325 lines not on this page · raw message
drivers/staging/lustre/lustre/include/lustre/lustre_user.h +8 -10
@@ -1063,23 +1063,21 @@ struct hsm_action_item {* \retval buffer */ static inline char *hai_dump_data_field (struct hsm_action_item *hai, -char *buffer,int len) +char *buffer,size_t len) { -int i, sz, data_len; +int i, data_len;char *ptr; ptr = buffer; - sz = len; data_len = hai->hai_len -sizeof (*hai); -for (i =0 ; (i < data_len) && (sz >0 ) ; i++) { -int cnt; - - cnt =snprintf (ptr, sz,"%.2X" , - (unsigned char )hai->hai_data[i]); - ptr += cnt; - sz -= cnt; +for (i =0 ; (i < data_len) && (len >2 ); i++) { +snprintf (ptr,3 ,"%02X" , (unsigned char )hai->hai_data[i]); + ptr +=2 ; + len -=2 ; } + *ptr ='\0' ; +return buffer; }
drivers/staging/lustre/lustre/ldlm/ldlm_lock.c +7 -0
@@ -550,6 +550,13 @@ struct ldlm_lock *__ldlm_handle2lock(const struct lustre_handle *handle,if (lock ==NULL )return NULL ; +if (lock->l_export && lock->l_export->exp_failed) { +CDEBUG (D_INFO ,"lock export failed: lock %p, exp %p\n" , + lock, lock->l_export); +LDLM_LOCK_PUT (lock); +return NULL ; + } +/* It's unlikely but possible that someone marked the lock as * destroyed after we did handle2object on it */ if (flags ==0 && ((lock->l_flags &LDLM_FL_DESTROYED ) ==0 )) {
drivers/staging/lustre/lustre/llite/rw26.c +4 -0
@@ -376,6 +376,10 @@ static ssize_t ll_direct_IO_26(struct kiocb *iocb, struct iov_iter *iter,if (!lli->lli_has_smd)return -EBADF ; +/* Check EOF by ourselves */ +if (iov_iter_rw (iter) ==READ && file_offset >=i_size_read (inode)) +return 0 ; +/* FIXME: io smaller than PAGE_SIZE is broken on ia64 ??? */ if ((file_offset & ~CFS_PAGE_MASK ) || (count & ~CFS_PAGE_MASK ))return -EINVAL ;
drivers/staging/lustre/lustre/ptlrpc/service.c +8 -13
@@ -1240,20 +1240,15 @@ static int ptlrpc_server_hpreq_init(struct ptlrpc_service_part *svcpt,* it may hit swab race at LU-1044. */ if (req->rq_ops->hpreq_check) { rc = req->rq_ops->hpreq_check (req); -/** -* XXX: Out of all current -* ptlrpc_hpreq_ops::hpreq_check(), only -* ldlm_cancel_hpreq_check() can return an error code; -* other functions assert in similar places, which seems -* odd. What also does not seem right is that handlers -* for those RPCs do not assert on the same checks, but -* rather handle the error cases. e.g. see -* ost_rw_hpreq_check(), and ost_brw_read(), -* ost_brw_write(). +if (rc == -ESTALE ) { + req->rq_status = rc; +ptlrpc_error (req); + } +/** can only return error, +* 0 for normal request, +* or 1 for high priority request */ -if (rc <0 ) -return rc; -LASSERT (rc ==0 || rc ==1 ); +LASSERT (rc <=1 ); }spin_lock_bh (&req->rq_export->exp_rpc_lock);
drivers/staging/rtl8712/ieee80211.h +42 -42
157 lines not on this page · raw message
drivers/staging/rtl8712/rtl871x_xmit.c +4 -3
@@ -339,7 +339,8 @@ sint r8712_update_attrib(struct _adapter *padapter, _pkt *pkt,/* if in MP_STATE, update pkt_attrib from mp_txcmd, and overwrite * some settings above.*/ if (check_fwstate (pmlmepriv,WIFI_MP_STATE )) - pattrib->priority = (txdesc.txdw1 >>QSEL_SHT ) &0x1f ; + pattrib->priority = + (le32_to_cpu (txdesc.txdw1) >>QSEL_SHT ) &0x1f ;return _SUCCESS; }
@@ -479,7 +480,7 @@ static sint make_wlanhdr(struct _adapter *padapter, u8 *hdr,struct ieee80211_hdr *pwlanhdr = (struct ieee80211_hdr *)hdr;struct mlme_priv *pmlmepriv = &padapter->mlmepriv;struct qos_priv *pqospriv = &pmlmepriv->qospriv; -u16 *fctrl = &pwlanhdr->frame_ctl; +__le16 *fctrl = &pwlanhdr->frame_ctl;memset (hdr,0 ,WLANHDR_OFFSET );SetFrameSubType (fctrl, pattrib->subtype);
@@ -568,7 +569,7 @@ static sint r8712_put_snap(u8 *data, u16 h_proto) snap->oui[0 ] = oui[0 ]; snap->oui[1 ] = oui[1 ]; snap->oui[2 ] = oui[2 ]; - *(u16 *)(data +SNAP_SIZE ) =htons (h_proto); + *(__be16 *)(data +SNAP_SIZE ) =htons (h_proto);return SNAP_SIZE +sizeof (u16); }
drivers/xen/manage.c +10 -2
@@ -275,8 +275,16 @@ static void sysrq_handler(struct xenbus_watch *watch, const char **vec, err =xenbus_transaction_start (&xbt);if (err)return ; -if (!xenbus_scanf (xbt,"control" ,"sysrq" ,"%c" , &sysrq_key)) { -pr_err ("Unable to read sysrq code in control/sysrq\n" ); + err =xenbus_scanf (xbt,"control" ,"sysrq" ,"%c" , &sysrq_key); +if (err <0 ) { +/* +* The Xenstore watch fires directly after registering it and +* after a suspend/resume cycle. So ENOENT is no error but +* might happen in those cases. +*/ +if (err != -ENOENT ) +pr_err ("Error %d reading sysrq code in control/sysrq\n" , + err);xenbus_transaction_end (xbt,1 );return ; }
fs/cifs/dir.c +3 -2
@@ -193,7 +193,8 @@ check_name(struct dentry *direntry, struct cifs_tcon *tcon)struct cifs_sb_info *cifs_sb =CIFS_SB (direntry->d_sb);int i; -if (unlikely (direntry->d_name.len > +if (unlikely (tcon->fsAttrInfo.MaxPathNameComponentLength && + direntry->d_name.len >le32_to_cpu (tcon->fsAttrInfo.MaxPathNameComponentLength)))return -ENAMETOOLONG ;
@@ -509,7 +510,7 @@ cifs_atomic_open(struct inode *inode, struct dentry *direntry, rc =check_name (direntry, tcon);if (rc) - goto out_free_xid; + goto out; server = tcon->ses->server;
fs/ext4/mballoc.c +4 -2
@@ -2136,8 +2136,10 @@ ext4_mb_regular_allocator(struct ext4_allocation_context *ac)* We search using buddy data only if the order of the request * is greater than equal to the sbi_s_mb_order2_reqs * You can tune it via /sys/fs/ext4/<partition>/mb_order2_req +* We also support searching for power-of-two requests only for +* requests upto maximum buddy size we have constructed. */ -if (i >= sbi->s_mb_order2_reqs) { +if (i >= sbi->s_mb_order2_reqs && i <= sb->s_blocksize_bits +2 ) {/* * This should tell if fe_len is exactly power of 2 */
@@ -2207,7 +2209,7 @@ repeat: } ac->ac_groups_scanned++; -if (cr ==0 && ac->ac_2order < sb->s_blocksize_bits+2 ) +if (cr ==0 )ext4_mb_simple_scan_group (ac, &e4b);else if (cr ==1 && sbi->s_stripe && !(ac->ac_g_ex.fe_len % sbi->s_stripe))
fs/ext4/super.c +2 -2
@@ -2499,9 +2499,9 @@ static unsigned long ext4_get_stripe_size(struct ext4_sb_info *sbi)if (sbi->s_stripe && sbi->s_stripe <= sbi->s_blocks_per_group) ret = sbi->s_stripe; -else if (stripe_width <= sbi->s_blocks_per_group) +else if (stripe_width && stripe_width <= sbi->s_blocks_per_group) ret = stripe_width; -else if (stride <= sbi->s_blocks_per_group) +else if (stride && stride <= sbi->s_blocks_per_group) ret = stride;else ret =0 ;
fs/ocfs2/alloc.c +18 -6
@@ -7270,13 +7270,24 @@ out:static int ocfs2_trim_extent (struct super_block *sb,struct ocfs2_group_desc *gd, -u32 start,u32 count) +u64 group,u32 start,u32 count) {u64 discard, bcount; +struct ocfs2_super *osb =OCFS2_SB (sb); bcount =ocfs2_clusters_to_blocks (sb, count); - discard =le64_to_cpu (gd->bg_blkno) + -ocfs2_clusters_to_blocks (sb, start); + discard =ocfs2_clusters_to_blocks (sb, start); + +/* +* For the first cluster group, the gd->bg_blkno is not at the start +* of the group, but at an offset from the start. If we add it while +* calculating discard for first group, we will wrongly start fstrim a +* few blocks after the desried start block and the range can cross +* over into the next cluster group. So, add it only if this is not +* the first cluster group. +*/ +if (group != osb->first_cluster_group_blkno) + discard +=le64_to_cpu (gd->bg_blkno);trace_ocfs2_trim_extent (sb, (unsigned long long )discard, bcount);
@@ -7284,7 +7295,7 @@ static int ocfs2_trim_extent(struct super_block *sb, }static int ocfs2_trim_group (struct super_block *sb, -struct ocfs2_group_desc *gd, +struct ocfs2_group_desc *gd,u64 group,u32 start,u32 max,u32 minbits) {int ret =0 , count =0 , next;
@@ -7303,7 +7314,7 @@ static int ocfs2_trim_group(struct super_block *sb, next =ocfs2_find_next_bit (bitmap, max, start);if ((next - start) >= minbits) { - ret =ocfs2_trim_extent (sb, gd, + ret =ocfs2_trim_extent (sb, gd, group, start, next - start);if (ret <0 ) {mlog_errno (ret);
@@ -7401,7 +7412,8 @@ int ocfs2_trim_fs(struct super_block *sb, struct fstrim_range *range) } gd = (struct ocfs2_group_desc *)gd_bh->b_data; - cnt =ocfs2_trim_group (sb, gd, first_bit, last_bit, minlen); + cnt =ocfs2_trim_group (sb, gd, group, + first_bit, last_bit, minlen);brelse (gd_bh); gd_bh =NULL ;if (cnt <0 ) {
lib/asn1_decoder.c +3 -0
@@ -283,6 +283,9 @@ next_op:if (unlikely (len > datalen - dp)) goto data_overrun_error; } + }else { +if (unlikely (len > datalen - dp)) + goto data_overrun_error; }if (flags &FLAG_CONS ) {
samples/trace_events/trace-events-sample.c +11 -3
@@ -78,28 +78,36 @@ static int simple_thread_fn(void *arg) }static DEFINE_MUTEX (thread_mutex); +static int simple_thread_cnt;void foo_bar_reg (void ) { +mutex_lock (&thread_mutex); +if (simple_thread_cnt++) + goto out; +pr_info ("Starting thread for foo_bar_fn\n" );/* * We shouldn't be able to start a trace when the module is * unloading (there's other locks to prevent that). But * for consistency sake, we still take the thread_mutex. */ -mutex_lock (&thread_mutex); simple_tsk_fn =kthread_run (simple_thread_fn,NULL ,"event-sample-fn" ); + out:mutex_unlock (&thread_mutex); }void foo_bar_unreg (void ) { -pr_info ("Killing thread for foo_bar_fn\n" ); -/* protect against module unloading */ mutex_lock (&thread_mutex); +if (--simple_thread_cnt) + goto out; + +pr_info ("Killing thread for foo_bar_fn\n" );if (simple_tsk_fn)kthread_stop (simple_tsk_fn); simple_tsk_fn =NULL ; + out:mutex_unlock (&thread_mutex); }
security/keys/keyring.c +19 -20
@@ -452,34 +452,33 @@ static long keyring_read(const struct key *keyring, char __user *buffer, size_t buflen) {struct keyring_read_iterator_context ctx; -unsigned long nr_keys; -int ret; +long ret;kenter ("{%d},,%zu" ,key_serial (keyring), buflen);if (buflen & (sizeof (key_serial_t) -1 ))return -EINVAL ; - nr_keys = keyring->keys.nr_leaves_on_tree; -if (nr_keys ==0 ) -return 0 ; - -/* Calculate how much data we could return */ -if (!buffer || !buflen) -return nr_keys *sizeof (key_serial_t); - -/* Copy the IDs of the subscribed keys into the buffer */ - ctx.buffer = (key_serial_t __user *)buffer; - ctx.buflen = buflen; - ctx.count =0 ; - ret =assoc_array_iterate (&keyring->keys, keyring_read_iterator, &ctx); -if (ret <0 ) { -kleave (" = %d [iterate]" , ret); -return ret; +/* Copy as many key IDs as fit into the buffer */ +if (buffer && buflen) { + ctx.buffer = (key_serial_t __user *)buffer; + ctx.buflen = buflen; + ctx.count =0 ; + ret =assoc_array_iterate (&keyring->keys, + keyring_read_iterator, &ctx); +if (ret <0 ) { +kleave (" = %ld [iterate]" , ret); +return ret; + } } -kleave (" = %zu [ok]" , ctx.count); -return ctx.count; +/* Return the size of the buffer needed */ + ret = keyring->keys.nr_leaves_on_tree *sizeof (key_serial_t); +if (ret <= buflen) +kleave ("= %ld [ok]" , ret); +else +kleave ("= %ld [buffer too small]" , ret); +return ret; }/*
sound/core/seq/seq_clientmgr.c +1 -1
@@ -676,7 +676,7 @@ static int deliver_to_subscribers(struct snd_seq_client *client,if (atomic)read_lock (&grp->list_lock);else -down_read (&grp->list_mutex); +down_read_nested (&grp->list_mutex, hop);list_for_each_entry (subs, &grp->list_head, src_list) {/* both ports ready? */ if (atomic_read (&subs->ref_count) !=2 )
sound/core/timer_compat.c +15 -2
@@ -106,7 +106,8 @@ enum {#endif /* CONFIG_X86_X32 */ }; -static long snd_timer_user_ioctl_compat (struct file *file,unsigned int cmd,unsigned long arg) +static long __snd_timer_user_ioctl_compat (struct file *file,unsigned int cmd, +unsigned long arg) {void __user *argp =compat_ptr (arg);
@@ -127,7 +128,7 @@ static long snd_timer_user_ioctl_compat(struct file *file, unsigned int cmd, unscase SNDRV_TIMER_IOCTL_PAUSE :case SNDRV_TIMER_IOCTL_PAUSE_OLD :case SNDRV_TIMER_IOCTL_NEXT_DEVICE : -return snd_timer_user_ioctl (file, cmd, (unsigned long )argp); +return __snd_timer_user_ioctl (file, cmd, (unsigned long )argp);case SNDRV_TIMER_IOCTL_INFO32 :return snd_timer_user_info_compat (file, argp);case SNDRV_TIMER_IOCTL_STATUS32 :
@@ -139,3 +140,15 @@ static long snd_timer_user_ioctl_compat(struct file *file, unsigned int cmd, uns }return -ENOIOCTLCMD ; } + +static long snd_timer_user_ioctl_compat (struct file *file,unsigned int cmd, +unsigned long arg) +{ +struct snd_timer_user *tu = file->private_data; +long ret; + +mutex_lock (&tu->ioctl_lock); + ret =__snd_timer_user_ioctl_compat (file, cmd, arg); +mutex_unlock (&tu->ioctl_lock); +return ret; +}
sound/soc/codecs/adau17x1.c +23 -1
@@ -89,6 +89,27 @@ static int adau17x1_pll_event(struct snd_soc_dapm_widget *w,return 0 ; } +static int adau17x1_adc_fixup (struct snd_soc_dapm_widget *w, +struct snd_kcontrol *kcontrol,int event) +{ +struct snd_soc_codec *codec =snd_soc_dapm_to_codec (w->dapm); +struct adau *adau =snd_soc_codec_get_drvdata (codec); + +/* +* If we are capturing, toggle the ADOSR bit in Converter Control 0 to +* avoid losing SNR (workaround from ADI). This must be done after +* the ADC(s) have been enabled. According to the data sheet, it is +* normally illegal to set this bit when the sampling rate is 96 kHz, +* but according to ADI it is acceptable for this workaround. +*/ +regmap_update_bits (adau->regmap,ADAU17X1_CONVERTER0 , +ADAU17X1_CONVERTER0_ADOSR ,ADAU17X1_CONVERTER0_ADOSR ); +regmap_update_bits (adau->regmap,ADAU17X1_CONVERTER0 , +ADAU17X1_CONVERTER0_ADOSR ,0 ); + +return 0 ; +} +static const char *const adau17x1_mono_stereo_text[] = {"Stereo" ,"Mono Left Channel (L+R)" ,
@@ -120,7 +141,8 @@ static const struct snd_soc_dapm_widget adau17x1_dapm_widgets[] = {SND_SOC_DAPM_MUX ("Right DAC Mode Mux" ,SND_SOC_NOPM ,0 ,0 , &adau17x1_dac_mode_mux), -SND_SOC_DAPM_ADC ("Left Decimator" ,NULL ,ADAU17X1_ADC_CONTROL ,0 ,0 ), +SND_SOC_DAPM_ADC_E ("Left Decimator" ,NULL ,ADAU17X1_ADC_CONTROL ,0 ,0 , + adau17x1_adc_fixup,SND_SOC_DAPM_POST_PMU ),SND_SOC_DAPM_ADC ("Right Decimator" ,NULL ,ADAU17X1_ADC_CONTROL ,1 ,0 ),SND_SOC_DAPM_DAC ("Left DAC" ,NULL ,ADAU17X1_DAC_CONTROL0 ,0 ,0 ), SND_SOC_DAPM_DAC("Right DAC", NULL, ADAU17X1_DAC_CONTROL0, 1, 0),
sound/soc/codecs/adau17x1.h +2 -0
@@ -123,5 +123,7 @@ bool adau17x1_has_dsp(struct adau *adau);#define ADAU17X1_CONVERTER0_CONVSR_MASK 0x7 +#define ADAU17X1_CONVERTER0_ADOSR BIT(3) +#endif
tools/perf/scripts/perl/Perf-Trace-Util/Build +3 -1
@@ -1,3 +1,5 @@ libperf-y += Context.o -CFLAGS_Context.o += $(PERL_EMBED_CCOPTS) -Wno-redundant-decls -Wno-strict-prototypes -Wno-unused-parameter -Wno-nested-externs -Wno-undef -Wno-switch-default +CFLAGS_Context.o += $(PERL_EMBED_CCOPTS) -Wno-redundant-decls -Wno-strict-prototypes +CFLAGS_Context.o += -Wno-unused-parameter -Wno-nested-externs -Wno-undef +CFLAGS_Context.o += -Wno-switch-default -Wno-shadow
tools/perf/util/parse-events.c +2 -1
@@ -291,10 +291,11 @@ __add_event(struct list_head *list, int *idx,event_attr_init (attr); - evsel =perf_evsel__new_idx (attr, (*idx)++); + evsel =perf_evsel__new_idx (attr, *idx);if (!evsel)return NULL ; + (*idx)++; evsel->cpus =cpu_map__get (cpus); evsel->own_cpus =cpu_map__get (cpus);