Linux 4.9.131
Greg KH
maintainerI'm announcing the release of the 4.9.131 kernel.
All users of the 4.9 kernel series must upgrade.
The updated 4.9.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.9.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
------------
Documentation/hwmon/ina2xx | 2 Makefile | 2 arch/arm/boot/dts/dra7.dtsi | 4 arch/arm/mach-mvebu/pmsu.c | 6 - arch/arm/mach-omap2/omap_hwmod_reset.c | 12 +- arch/arm64/include/asm/kvm_emulate.h | 5 + arch/arm64/kvm/guest.c | 55 +++++++++++- arch/powerpc/kernel/machine_kexec.c | 7 + arch/powerpc/platforms/powernv/pci-ioda.c | 2 arch/s390/mm/extmem.c | 4 arch/s390/mm/pgalloc.c | 2 arch/x86/entry/entry_64.S | 4 arch/x86/events/intel/lbr.c | 32 +++++-- arch/x86/events/perf_event.h | 1 arch/x86/kernel/tsc_msr.c | 1 arch/x86/mm/numa_emulation.c | 2 crypto/ablkcipher.c | 2 crypto/blkcipher.c | 1 drivers/block/floppy.c | 3 drivers/bluetooth/btusb.c | 1 drivers/edac/edac_mc_sysfs.c | 6 - drivers/edac/i7core_edac.c | 22 +++- drivers/gpio/gpio-menz127.c | 4 drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 11 ++ drivers/gpu/drm/amd/amdgpu/kv_dpm.c | 4 drivers/gpu/drm/amd/amdgpu/si_dpm.c | 3 drivers/gpu/drm/sun4i/sun4i_drv.c | 3 drivers/hid/hid-ntrig.c | 2 drivers/hwmon/adt7475.c | 14 +-- drivers/hwmon/ina2xx.c | 13 ++ drivers/i2c/busses/i2c-i801.c | 9 + drivers/infiniband/core/rw.c | 2 drivers/infiniband/hw/hfi1/pio.c | 9 + drivers/infiniband/hw/hfi1/user_sdma.c | 2 drivers/infiniband/hw/hfi1/verbs.c | 8 + drivers/infiniband/ulp/srp/ib_srp.c | 6 - drivers/input/mouse/elantech.c | 2 drivers/iommu/amd_iommu.c | 2 drivers/md/md-cluster.c | 19 ++-- drivers/media/i2c/soc_camera/ov772x.c | 2 drivers/media/platform/exynos4-is/fimc-isp-video.c | 11 +- drivers/media/platform/fsl-viu.c | 38 +++++--- drivers/media/platform/omap3isp/isp.c | 2 drivers/media/platform/s3c-camif/camif-capture.c | 2 drivers/media/usb/tm6000/tm6000-dvb.c | 5 + drivers/media/usb/uvc/uvc_video.c | 24 +++-- drivers/media/v4l2-core/v4l2-event.c | 38 ++++---- drivers/media/v4l2-core/v4l2-fh.c | 2 drivers/misc/tsl2550.c | 2 drivers/misc/vmw_vmci/vmci_queue_pair.c | 4 drivers/net/ethernet/hisilicon/hns/hnae.h | 6 - drivers/net/ethernet/hisilicon/hns/hns_enet.c | 2 drivers/net/ethernet/intel/e1000/e1000_ethtool.c | 7 - drivers/net/ethernet/qlogic/qed/qed_mcp.c | 96 +++++++++++++++++---- drivers/net/ethernet/qlogic/qed/qed_reg_addr.h | 1 drivers/net/phy/xilinx_gmii2rgmii.c | 10 +- drivers/net/wireless/ath/ath10k/htt_rx.c | 5 - drivers/net/wireless/rndis_wlan.c | 2 drivers/net/wireless/ti/wlcore/cmd.c | 6 + drivers/power/reset/vexpress-poweroff.c | 12 +- drivers/power/supply/power_supply_core.c | 11 +- drivers/regulator/core.c | 2 drivers/scsi/bnx2i/bnx2i_hwi.c | 2 drivers/scsi/ibmvscsi/ibmvscsi.c | 4 drivers/scsi/megaraid/megaraid_sas_base.c | 3 drivers/spi/spi-rspi.c | 34 ++++++- drivers/spi/spi-sh-msiof.c | 28 +++++- drivers/spi/spi-tegra20-slink.c | 31 +++++- drivers/staging/android/ashmem.c | 6 + drivers/staging/rts5208/sd.c | 2 drivers/target/iscsi/iscsi_target_auth.c | 15 --- drivers/target/iscsi/iscsi_target_tpg.c | 3 drivers/thermal/of-thermal.c | 7 + drivers/tty/serial/8250/serial_cs.c | 6 - drivers/tty/serial/cpm_uart/cpm_uart_core.c | 10 +- drivers/tty/serial/fsl_lpuart.c | 3 drivers/tty/serial/imx.c | 8 + drivers/usb/class/cdc-wdm.c | 2 drivers/usb/core/devio.c | 24 ++++- drivers/usb/core/driver.c | 28 +++--- drivers/usb/core/usb.c | 2 drivers/usb/serial/kobil_sct.c | 12 ++ drivers/usb/wusbcore/security.c | 2 drivers/uwb/hwa-rc.c | 1 fs/ext4/xattr.c | 5 + fs/nfsd/nfs4proc.c | 1 include/linux/arm-smccc.h | 38 +++++--- include/linux/platform_data/ina2xx.h | 2 include/linux/power_supply.h | 1 include/linux/slub_def.h | 3 include/media/v4l2-fh.h | 4 kernel/module.c | 6 + kernel/time/alarmtimer.c | 3 lib/klist.c | 10 +- mm/slub.c | 6 - net/6lowpan/iphc.c | 1 sound/aoa/core/gpio-feature.c | 4 sound/pci/hda/hda_intel.c | 3 sound/soc/soc-dapm.c | 7 + 99 files changed, 669 insertions(+), 237 deletions(-)
Aaron Ma (1):
Input: elantech - enable middle button of touchpad on ThinkPad P72
Akinobu Mita (2):
media: s3c-camif: ignore -ENOIOCTLCMD from v4l2_subdev_call for s_power
media: soc_camera: ov772x: correct setting of banding filter
Alan Stern (3):
USB: fix error handling in usb_driver_claim_interface()
USB: handle NULL config in usb_find_alt_setting()
USB: remove LPM management from usb_driver_claim_interface()
Alexey Dobriyan (1):
slub: make ->cpu_partial unsigned int
Alexey Kardashevskiy (1):
powerpc/powernv/ioda2: Reduce upper limit for DMA window size
Alexey Khoroshilov (1):
media: fsl-viu: fix error handling in viu_of_probe()
Alistair Strachan (1):
staging: android: ashmem: Fix mmap size validation
Andy Shevchenko (1):
x86/tsc: Add missing header to tsc_msr.c
Andy Whitcroft (1):
floppy: Do not copy a kernel pointer to user memory in FDGETPRM ioctl
Anson Huang (1):
thermal: of-thermal: disable passive polling when thermal zone is disabled
Anton Vasilyev (1):
uwb: hwa-rc: fix memory leak at probe
Bart Van Assche (3):
scsi: target/iscsi: Make iscsit_ta_authentication() respect the output buffer size
scsi: klist: Make it safe to use klists in atomic context
IB/srp: Avoid that sg_reset -d ${srp_device} triggers an infinite loop
Ben Greear (1):
ath10k: protect ath10k_htt_rx_ring_free with rx_ring.lock
Benjamin Tissoires (1):
power: remove possible deadlock when unregistering power_supply
Bo Chen (2):
e1000: check on netif_running() before calling e1000_up()
e1000: ensure to free old tx/rx rings in set_ringparam()
Brandon Maier (2):
net: phy: xgmiitorgmii: Check read_status results
net: phy: xgmiitorgmii: Check phy_driver ready before accessing
Breno Leitao (1):
scsi: ibmvscsi: Improve strings handling
Christophe Leroy (1):
serial: cpm_uart: return immediately from console poll
Colin Ian King (1):
staging: rts5208: fix missing error check on call to rtsx_write_register
Dan Carpenter (4):
vmci: type promotion bug in qp_host_get_user_memory() IB/core: type promotion bug in rdma_rw_init_one_mr()
rndis_wlan: potential buffer overflow in rndis_wlan_auth_indication()
hwmon: (adt7475) Make adt7475_read_word() return errors
Dan Williams (1):
x86/numa_emulation: Fix emulated-to-physical node mapping
Dave Gerlach (1):
ARM: hwmod: RTC: Don't assume lock/unlock will be called with irq enabled
Dave Martin (1):
arm64: KVM: Tighten guest core register access from userspace
Ethan Tuttle (1):
ARM: mvebu: declare asm symbols as character arrays in pmsu.c
Gaku Inami (1):
spi: sh-msiof: Fix invalid SPI use during system suspend
Geert Uytterhoeven (2):
spi: rspi: Fix invalid SPI use during system suspend
spi: rspi: Fix interrupted DMA transfers
Greg Kroah-Hartman (1):
Linux 4.9.131
Guoqing Jiang (1):
md-cluster: clear another node's suspend_area after the copy is finished
Hari Bathini (1):
powerpc/kdump: Handle crashkernel memory reservation failure
Hiromitsu Yamasaki (1):
spi: sh-msiof: Fix handling of write value for SISTR register
Huazhong Tan (2):
net: hns: fix length and page_offset overflow when CONFIG_ARM64_64K_PAGES
net: hns: fix skb->truesize underestimation
Ira Weiny (1):
IB/hfi1: Fix SL array bounds check
J. Bruce Fields (1):
nfsd: fix corrupted reply to badly ordered compound
Jan Beulich (1):
x86/entry/64: Add two more instruction suffixes
Javier Martinez Canillas (1):
media: omap3isp: zero-initialize the isp cam_xclk{a,b} initial data
Jernej Skrabec (1):
drm/sun4i: Fix releasing node when enumerating enpoints
Jessica Yu (1):
module: exclude SHN_UNDEF symbols from kallsyms api
Jian-Hong Pan (1):
Bluetooth: Add a new Realtek 8723DE ID 0bda:b009
Johan Hovold (3):
USB: serial: kobil_sct: fix modem-status error handling EDAC, i7core: Fix memleaks and use-after-free on probe and remove
EDAC: Fix memleak in module init error path
Julia Lawall (1):
usb: wusbcore: security: cast sizeof to int for comparison
Kai-Heng Feng (1):
ALSA: hda: Add AZX_DCAPS_PM_RUNTIME for AMD Raven Ridge
Kan Liang (1):
perf/x86/intel/lbr: Fix incomplete LBR call stack
Kevin Hilman (1):
ARM: dts: dra7: fix DCAN node addresses
Liam Girdwood (1):
ASoC: dapm: Fix potential DAI widget pointer deref when linking DAIs
Lothar Felten (1):
hwmon: (ina2xx) fix sysfs shunt resistor read access
Marc Zyngier (3):
arm/arm64: smccc-1.1: Make return values unsigned long arm/arm64: smccc-1.1: Handle function result as parameters
arm64: KVM: Sanitize PSTATE.M when being set from userspace
Marcel Ziswiler (1):
spi: tegra20-slink: explicitly enable/disable clock
Matt Ranostay (1):
tsl2550: fix lux1_input error in low light
Michael J. Ruhl (2):
IB/hfi1: Invalid user input can result in crash IB/hfi1: Fix context recovery when PBC has an UnsupportedVL
Michael Scott (1):
6lowpan: iphc: reset mac_header after decompress to fix panic
Mika Westerberg (1):
i2c: i801: Allow ACPI AML access I/O ports not reserved for SMBus
Nadav Amit (1):
gpio: Fix wrong rounding in gpio-menz127
Nicholas Mc Guire (1):
ALSA: snd-aoa: add of_node_put() in error path
Oliver Neukum (2):
USB: usbdevfs: sanitize flags more
USB: usbdevfs: restore warning for nonsensical flags
Rex Zhu (2):
drm/amdgpu: Enable/disable gfx PG feature in rlc safe mode drm/amdgpu: Update power state at the end of smu hw_init.
Sakari Ailus (1):
media: v4l: event: Prevent freeing event subscriptions while accessed
Sebastian Andrzej Siewior (1):
Revert "usb: cdc-wdm: Fix a sleep-in-atomic-context bug in service_outstanding_interrupt()"
Shivasharan S (1):
scsi: megaraid_sas: Update controller info during resume
Stafford Horne (1):
crypto: skcipher - Fix -Wstringop-truncation warnings
Stefan Agner (1):
tty: serial: lpuart: avoid leaking struct tty_struct
Sudeep Holla (1):
power: vexpress: fix corruption in notifier registration
Sylwester Nawrocki (1):
media: exynos4-is: Prevent NULL pointer dereference in __isp_video_try_fmt()
Theodore Ts'o (1):
ext4: never move the system.data xattr out of the inode body
Thomas Gleixner (1):
alarmtimer: Prevent overflow for relative nanosleep
Tomer Tayar (2):
qed: Wait for ready indication before rereading the shmem
qed: Wait for MCP halt and resume commands to take place
Tony Lindgren (1):
wlcore: Add missing PM call for wlcore_cmd_wait_for_event_or_timeout()
Uwe Kleine-König (1):
serial: imx: restore handshaking irq for imx1
Vasily Gorbik (2):
s390/mm: correct allocate_pgste proc_handler callback s390/extmem: fix gcc 8 stringop-overflow warning
Vincent Pelletier (1):
scsi: target: iscsi: Use bin2hex instead of a re-implementation
Yu Zhao (1):
regulator: fix crash caused by null driver data
Zhen Lei (1):
iommu/amd: make sure TLB to be flushed before IOVA freed
Zhouyang Jia (4):
drivers/tty: add error handling for pcmcia_loop_config
media: tm6000: add error handling for dvb_register_adapter
HID: hid-ntrig: add error handling for sysfs_create_group
scsi: bnx2i: add error handling for ioremap_nocache
ming_qian (1):
media: uvcvideo: Support realtek's UVC 1.5 device
Greg KH
maintainerDocumentation/hwmon/ina2xx +1 -1
@@ -32,7 +32,7 @@ Supported chips: Datasheet: Publicly available at the Texas Instruments website http://www.ti.com/ -Author: Lothar Felten <[email protected]> +Author: Lothar Felten <[email protected]> Description -----------
Makefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 9 -SUBLEVEL = 130 +SUBLEVEL = 131 EXTRAVERSION = NAME = Roaring Lionus
arch/arm/boot/dts/dra7.dtsi +2 -2
@@ -1770,7 +1770,7 @@ }; }; - dcan1: can@481cc000 { + dcan1: can@4ae3c000 { compatible = "ti,dra7-d_can"; ti,hwmods = "dcan1"; reg = <0x4ae3c000 0x2000>;
@@ -1780,7 +1780,7 @@ status = "disabled"; }; - dcan2: can@481d0000 { + dcan2: can@48480000 { compatible = "ti,dra7-d_can"; ti,hwmods = "dcan2"; reg = <0x48480000 0x2000>;
arch/arm/mach-mvebu/pmsu.c +3 -3
@@ -116,8 +116,8 @@ void mvebu_pmsu_set_cpu_boot_addr(int hw_cpu, void *boot_addr) PMSU_BOOT_ADDR_REDIRECT_OFFSET(hw_cpu)); } -extern unsigned char mvebu_boot_wa_start; -extern unsigned char mvebu_boot_wa_end; +extern unsigned char mvebu_boot_wa_start[]; +extern unsigned char mvebu_boot_wa_end[];/* * This function sets up the boot address workaround needed for SMP
@@ -130,7 +130,7 @@ int mvebu_setup_boot_addr_wa(unsigned int crypto_eng_target, phys_addr_t resume_addr_reg) {void __iomem *sram_virt_base; -u32 code_len = &mvebu_boot_wa_end - &mvebu_boot_wa_start; +u32 code_len = mvebu_boot_wa_end - mvebu_boot_wa_start;mvebu_mbus_del_window (BOOTROM_BASE ,BOOTROM_SIZE ); mvebu_mbus_add_window_by_id(crypto_eng_target, crypto_eng_attribute,
arch/arm/mach-omap2/omap_hwmod_reset.c +8 -4
@@ -92,11 +92,13 @@ static void omap_rtc_wait_not_busy(struct omap_hwmod *oh)*/ void omap_hwmod_rtc_unlock (struct omap_hwmod *oh) { -local_irq_disable (); +unsigned long flags; + +local_irq_save (flags);omap_rtc_wait_not_busy (oh);omap_hwmod_write (OMAP_RTC_KICK0_VALUE , oh,OMAP_RTC_KICK0_REG );omap_hwmod_write (OMAP_RTC_KICK1_VALUE , oh,OMAP_RTC_KICK1_REG ); -local_irq_enable (); +local_irq_restore (flags); }/**
@@ -110,9 +112,11 @@ void omap_hwmod_rtc_unlock(struct omap_hwmod *oh)*/ void omap_hwmod_rtc_lock (struct omap_hwmod *oh) { -local_irq_disable (); +unsigned long flags; + +local_irq_save (flags);omap_rtc_wait_not_busy (oh);omap_hwmod_write (0x0 , oh,OMAP_RTC_KICK0_REG );omap_hwmod_write (0x0 , oh,OMAP_RTC_KICK1_REG ); -local_irq_enable (); +local_irq_restore (flags); }
arch/arm64/include/asm/kvm_emulate.h +5 -0
@@ -42,6 +42,11 @@ void kvm_inject_vabt(struct kvm_vcpu *vcpu);void kvm_inject_dabt (struct kvm_vcpu *vcpu,unsigned long addr);void kvm_inject_pabt (struct kvm_vcpu *vcpu,unsigned long addr); +static inline bool vcpu_el1_is_32bit (struct kvm_vcpu *vcpu) +{ +return !(vcpu->arch.hcr_el2 &HCR_RW ); +} +static inline void vcpu_reset_hcr (struct kvm_vcpu *vcpu) { vcpu->arch.hcr_el2 =HCR_GUEST_FLAGS ;
arch/arm64/kvm/guest.c +54 -1
89 lines not on this page · raw message
arch/powerpc/kernel/machine_kexec.c +6 -1
@@ -186,7 +186,12 @@ void __init reserve_crashkernel(void) (unsigned long )(crashk_res.start >>20 ), (unsigned long)(memblock_phys_mem_size() >> 20)); -memblock_reserve (crashk_res.start, crash_size); +if (!memblock_is_region_memory (crashk_res.start, crash_size) || +memblock_reserve (crashk_res.start, crash_size)) { +pr_err ("Failed to reserve memory for crashkernel!\n" ); + crashk_res.start = crashk_res.end =0 ; +return ; + } }int overlaps_crashkernel (unsigned long start,unsigned long size)
arch/powerpc/platforms/powernv/pci-ioda.c +1 -1
@@ -2623,7 +2623,7 @@ static long pnv_pci_ioda2_table_alloc_pages(int nid, __u64 bus_offset, level_shift = entries_shift +3 ; level_shift =max_t (unsigned, level_shift,PAGE_SHIFT ); -if ((level_shift -3 ) * levels + page_shift >=60 ) +if ((level_shift -3 ) * levels + page_shift >=55 )return -EINVAL ;/* Allocate TCE table */
arch/s390/mm/extmem.c +2 -2
@@ -79,7 +79,7 @@ struct qin64 {struct dcss_segment {struct list_head list;char dcss_name[8 ]; -char res_name[15 ]; +char res_name[16 ];unsigned long start_addr;unsigned long end;atomic_t ref_count;
@@ -432,7 +432,7 @@ __segment_load (char *name, int do_nonshared, unsigned long *addr, unsigned longmemcpy (&seg->res_name, seg->dcss_name,8 );EBCASC (seg->res_name,8 ); seg->res_name[8 ] ='\0' ; -strncat (seg->res_name," (DCSS)" ,7 ); +strlcat (seg->res_name," (DCSS)" ,sizeof (seg->res_name)); seg->res->name = seg->res_name; rc = seg->vm_segtype; if (rc == SEG_TYPE_SC ||
arch/s390/mm/pgalloc.c +1 -1
@@ -26,7 +26,7 @@ static struct ctl_table page_table_sysctl[] = { .data = &page_table_allocate_pgste, .maxlen = sizeof(int), .mode = S_IRUGO | S_IWUSR, - .proc_handler = proc_dointvec, + .proc_handler = proc_dointvec_minmax, .extra1 = &page_table_allocate_pgste_min, .extra2 = &page_table_allocate_pgste_max, },
arch/x86/entry/entry_64.S +2 -2
@@ -91,7 +91,7 @@ ENDPROC(native_usergs_sysret64) .endm .macro TRACE_IRQS_IRETQ_DEBUG - bt $9, EFLAGS(%rsp) /* interrupts off? */ + btl $9, EFLAGS(%rsp) /* interrupts off? */ jnc 1f TRACE_IRQS_ON_DEBUG 1:
@@ -485,7 +485,7 @@ retint_kernel: #ifdef CONFIG_PREEMPT /* Interrupts are off */ /* Check if we need preemption */ - bt $9, EFLAGS(%rsp) /* were interrupts off? */ + btl $9, EFLAGS(%rsp) /* were interrupts off? */ jnc 1f 0: cmpl $0, PER_CPU_VAR(__preempt_count) jnz 1f
arch/x86/events/intel/lbr.c +26 -6
@@ -342,7 +342,7 @@ static void __intel_pmu_lbr_restore(struct x86_perf_task_context *task_ctx) mask = x86_pmu.lbr_nr -1 ; tos = task_ctx->tos; -for (i =0 ; i < tos; i++) { +for (i =0 ; i < task_ctx->valid_lbrs; i++) { lbr_idx = (tos - i) & mask;wrlbr_from (lbr_idx, task_ctx->lbr_from[i]);wrlbr_to (lbr_idx, task_ctx->lbr_to[i]);
@@ -350,6 +350,15 @@ static void __intel_pmu_lbr_restore(struct x86_perf_task_context *task_ctx)if (x86_pmu.intel_cap.lbr_format ==LBR_FORMAT_INFO )wrmsrl (MSR_LBR_INFO_0 + lbr_idx, task_ctx->lbr_info[i]); } + +for (; i < x86_pmu.lbr_nr; i++) { + lbr_idx = (tos - i) & mask; +wrlbr_from (lbr_idx,0 ); +wrlbr_to (lbr_idx,0 ); +if (x86_pmu.intel_cap.lbr_format ==LBR_FORMAT_INFO ) +wrmsrl (MSR_LBR_INFO_0 + lbr_idx,0 ); + } +wrmsrl (x86_pmu.lbr_tos, tos); task_ctx->lbr_stack_state =LBR_NONE ; }
@@ -357,7 +366,7 @@ static void __intel_pmu_lbr_restore(struct x86_perf_task_context *task_ctx)static void __intel_pmu_lbr_save (struct x86_perf_task_context *task_ctx) {unsigned lbr_idx, mask; -u64 tos; +u64 tos, from;int i;if (task_ctx->lbr_callstack_users ==0 ) {
@@ -367,13 +376,17 @@ static void __intel_pmu_lbr_save(struct x86_perf_task_context *task_ctx) mask = x86_pmu.lbr_nr -1 ; tos =intel_pmu_lbr_tos (); -for (i =0 ; i < tos; i++) { +for (i =0 ; i < x86_pmu.lbr_nr; i++) { lbr_idx = (tos - i) & mask; - task_ctx->lbr_from[i] =rdlbr_from (lbr_idx); + from =rdlbr_from (lbr_idx); +if (!from) +break ; + task_ctx->lbr_from[i] = from; task_ctx->lbr_to[i] =rdlbr_to (lbr_idx);if (x86_pmu.intel_cap.lbr_format ==LBR_FORMAT_INFO )rdmsrl (MSR_LBR_INFO_0 + lbr_idx, task_ctx->lbr_info[i]); } + task_ctx->valid_lbrs = i; task_ctx->tos = tos; task_ctx->lbr_stack_state =LBR_VALID ; }
@@ -522,7 +535,7 @@ static void intel_pmu_lbr_read_32(struct cpu_hw_events *cpuc)*/ static void intel_pmu_lbr_read_64 (struct cpu_hw_events *cpuc) { -bool need_info = false; +bool need_info = false, call_stack = false;unsigned long mask = x86_pmu.lbr_nr -1 ;int lbr_format = x86_pmu.intel_cap.lbr_format;u64 tos =intel_pmu_lbr_tos ();
@@ -533,7 +546,7 @@ static void intel_pmu_lbr_read_64(struct cpu_hw_events *cpuc)if (cpuc->lbr_sel) { need_info = !(cpuc->lbr_sel->config &LBR_NO_INFO );if (cpuc->lbr_sel->config &LBR_CALL_STACK ) - num = tos; + call_stack = true; }for (i =0 ; i < num; i++) {
@@ -546,6 +559,13 @@ static void intel_pmu_lbr_read_64(struct cpu_hw_events *cpuc) from =rdlbr_from (lbr_idx); to =rdlbr_to (lbr_idx); +/* +* Read LBR call stack entries +* until invalid entry (0s) is detected. +*/ +if (call_stack && !from) +break ; +if (lbr_format ==LBR_FORMAT_INFO && need_info) {u64 info;
arch/x86/events/perf_event.h +1 -0
@@ -633,6 +633,7 @@ struct x86_perf_task_context {u64 lbr_to[MAX_LBR_ENTRIES ];u64 lbr_info[MAX_LBR_ENTRIES ];int tos; +int valid_lbrs;int lbr_callstack_users;int lbr_stack_state; };
arch/x86/kernel/tsc_msr.c +1 -0
@@ -12,6 +12,7 @@#include <asm/setup.h> #include <asm/apic.h> #include <asm/param.h> +#include <asm/tsc.h> #define MAX_NUM_FREQS 9
arch/x86/mm/numa_emulation.c +1 -1
@@ -60,7 +60,7 @@ static int __init emu_setup_memblk(struct numa_meminfo *ei, eb->nid = nid;if (emu_nid_to_phys[nid] ==NUMA_NO_NODE ) - emu_nid_to_phys[nid] = nid; + emu_nid_to_phys[nid] = pb->nid; pb->start += size;if (pb->start >= pb->end) {
crypto/ablkcipher.c +2 -0
@@ -367,6 +367,7 @@ static int crypto_ablkcipher_report(struct sk_buff *skb, struct crypto_alg *alg)strncpy (rblkcipher.type,"ablkcipher" ,sizeof (rblkcipher.type));strncpy (rblkcipher.geniv, alg->cra_ablkcipher.geniv ?:"<default>" ,sizeof (rblkcipher.geniv)); + rblkcipher.geniv[sizeof (rblkcipher.geniv) -1 ] ='\0' ; rblkcipher.blocksize = alg->cra_blocksize; rblkcipher.min_keysize = alg->cra_ablkcipher.min_keysize;
@@ -441,6 +442,7 @@ static int crypto_givcipher_report(struct sk_buff *skb, struct crypto_alg *alg)strncpy (rblkcipher.type,"givcipher" ,sizeof (rblkcipher.type));strncpy (rblkcipher.geniv, alg->cra_ablkcipher.geniv ?:"<built-in>" ,sizeof (rblkcipher.geniv)); + rblkcipher.geniv[sizeof (rblkcipher.geniv) -1 ] ='\0' ; rblkcipher.blocksize = alg->cra_blocksize; rblkcipher.min_keysize = alg->cra_ablkcipher.min_keysize;
crypto/blkcipher.c +1 -0
@@ -510,6 +510,7 @@ static int crypto_blkcipher_report(struct sk_buff *skb, struct crypto_alg *alg)strncpy (rblkcipher.type,"blkcipher" ,sizeof (rblkcipher.type));strncpy (rblkcipher.geniv, alg->cra_blkcipher.geniv ?:"<default>" ,sizeof (rblkcipher.geniv)); + rblkcipher.geniv[sizeof (rblkcipher.geniv) -1 ] ='\0' ; rblkcipher.blocksize = alg->cra_blocksize; rblkcipher.min_keysize = alg->cra_blkcipher.min_keysize;
drivers/block/floppy.c +3 -0
@@ -3459,6 +3459,9 @@ static int fd_locked_ioctl(struct block_device *bdev, fmode_t mode, unsigned int (struct floppy_struct **)&outparam);if (ret)return ret; +memcpy (&inparam.g, outparam, + offsetof(struct floppy_struct , name)); + outparam = &inparam.g;break ;case FDMSGON :UDP ->flags |=FTD_MSG ;
drivers/bluetooth/btusb.c +1 -0
@@ -349,6 +349,7 @@ static const struct usb_device_id blacklist_table[] = { { USB_DEVICE(0x7392, 0xa611), .driver_info = BTUSB_REALTEK }, /* Additional Realtek 8723DE Bluetooth devices */ + { USB_DEVICE(0x0bda, 0xb009), .driver_info = BTUSB_REALTEK }, { USB_DEVICE(0x2ff8, 0xb011), .driver_info = BTUSB_REALTEK },/* Additional Realtek 8821AE Bluetooth devices */
drivers/edac/edac_mc_sysfs.c +3 -3
@@ -1059,14 +1059,14 @@ int __init edac_mc_sysfs_init(void) err =device_add (mci_pdev);if (err <0 ) - goto out_dev_free; + goto out_put_device;edac_dbg (0 ,"device %s created\n" ,dev_name (mci_pdev));return 0 ; - out_dev_free: -kfree (mci_pdev); + out_put_device: +put_device (mci_pdev); out:return err; }
drivers/edac/i7core_edac.c +15 -7
@@ -1177,15 +1177,14 @@ static int i7core_create_sysfs_devices(struct mem_ctl_info *mci) rc =device_add (pvt->addrmatch_dev);if (rc <0 ) -return rc; + goto err_put_addrmatch;if (!pvt->is_registered) { pvt->chancounts_dev =kzalloc (sizeof (*pvt->chancounts_dev),GFP_KERNEL );if (!pvt->chancounts_dev) { -put_device (pvt->addrmatch_dev); -device_del (pvt->addrmatch_dev); -return -ENOMEM ; + rc = -ENOMEM ; + goto err_del_addrmatch; } pvt->chancounts_dev->type = &all_channel_counts_type;
@@ -1199,9 +1198,18 @@ static int i7core_create_sysfs_devices(struct mem_ctl_info *mci) rc =device_add (pvt->chancounts_dev);if (rc <0 ) -return rc; + goto err_put_chancounts; }return 0 ; + +err_put_chancounts: +put_device (pvt->chancounts_dev); +err_del_addrmatch: +device_del (pvt->addrmatch_dev); +err_put_addrmatch: +put_device (pvt->addrmatch_dev); + +return rc; }static void i7core_delete_sysfs_devices (struct mem_ctl_info *mci)
@@ -1211,11 +1219,11 @@ static void i7core_delete_sysfs_devices(struct mem_ctl_info *mci)edac_dbg (1 ,"\n" );if (!pvt->is_registered) { -put_device (pvt->chancounts_dev);device_del (pvt->chancounts_dev); +put_device (pvt->chancounts_dev); } -put_device (pvt->addrmatch_dev);device_del (pvt->addrmatch_dev); +put_device (pvt->addrmatch_dev); }/****************************************************************************
drivers/gpio/gpio-menz127.c +2 -2
@@ -56,9 +56,9 @@ static int men_z127_debounce(struct gpio_chip *gc, unsigned gpio, rnd =fls (debounce) -1 ;if (rnd && (debounce &BIT (rnd -1 ))) - debounce =round_up (debounce,MEN_Z127_DB_MIN_US ); + debounce =roundup (debounce,MEN_Z127_DB_MIN_US );else - debounce =round_down (debounce,MEN_Z127_DB_MIN_US ); + debounce =rounddown (debounce,MEN_Z127_DB_MIN_US );if (debounce >MEN_Z127_DB_MAX_US ) debounce =MEN_Z127_DB_MAX_US ;
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +10 -1
@@ -5551,6 +5551,11 @@ static int gfx_v8_0_set_powergating_state(void *handle,if (!(adev->pg_flags &AMD_PG_SUPPORT_GFX_PG ))return 0 ; +if (adev->pg_flags & (AMD_PG_SUPPORT_GFX_SMG | +AMD_PG_SUPPORT_RLC_SMU_HS | +AMD_PG_SUPPORT_CP | +AMD_PG_SUPPORT_GFX_DMG )) + adev->gfx.rlc.funcs->enter_safe_mode (adev);switch (adev->asic_type) {case CHIP_CARRIZO :case CHIP_STONEY :
@@ -5586,7 +5591,11 @@ static int gfx_v8_0_set_powergating_state(void *handle,default :break ; } - +if (adev->pg_flags & (AMD_PG_SUPPORT_GFX_SMG | +AMD_PG_SUPPORT_RLC_SMU_HS | +AMD_PG_SUPPORT_CP | +AMD_PG_SUPPORT_GFX_DMG )) + adev->gfx.rlc.funcs->exit_safe_mode (adev);return 0 ; }
drivers/gpu/drm/amd/amdgpu/kv_dpm.c +1 -3
@@ -1350,8 +1350,6 @@ static int kv_dpm_enable(struct amdgpu_device *adev)return ret; } -kv_update_current_ps (adev, adev->pm.dpm.boot_ps); -if (adev->irq.installed &&amdgpu_is_internal_thermal_sensor (adev->pm.int_thermal_type)) { ret =kv_set_thermal_temperature_range (adev,KV_TEMP_RANGE_MIN ,KV_TEMP_RANGE_MAX );
@@ -3086,7 +3084,7 @@ static int kv_dpm_hw_init(void *handle)else adev->pm.dpm_enabled = true;mutex_unlock (&adev->pm.mutex); - +amdgpu_pm_compute_clocks (adev);return ret; }
drivers/gpu/drm/amd/amdgpu/si_dpm.c +1 -2
@@ -6959,7 +6959,6 @@ static int si_dpm_enable(struct amdgpu_device *adev)si_enable_auto_throttle_source (adev,AMDGPU_DPM_AUTO_THROTTLE_SRC_THERMAL , true);si_thermal_start_thermal_controller (adev); -ni_update_current_ps (adev, boot_ps);return 0 ; }
@@ -7836,7 +7835,7 @@ static int si_dpm_hw_init(void *handle)else adev->pm.dpm_enabled = true;mutex_unlock (&adev->pm.mutex); - +amdgpu_pm_compute_clocks (adev);return ret; }
drivers/gpu/drm/sun4i/sun4i_drv.c +2 -1
@@ -283,7 +283,6 @@ static int sun4i_drv_add_endpoints(struct device *dev, remote =of_graph_get_remote_port_parent (ep);if (!remote) {DRM_DEBUG_DRIVER ("Error retrieving the output node\n" ); -of_node_put (remote);continue ; }
@@ -297,11 +296,13 @@ static int sun4i_drv_add_endpoints(struct device *dev,if (of_graph_parse_endpoint (ep, &endpoint)) {DRM_DEBUG_DRIVER ("Couldn't parse endpoint\n" ); +of_node_put (remote);continue ; }if (!endpoint.id) {DRM_DEBUG_DRIVER ("Endpoint is our panel... skipping\n" ); +of_node_put (remote);continue ; } }
drivers/hid/hid-ntrig.c +2 -0
@@ -955,6 +955,8 @@ static int ntrig_probe(struct hid_device *hdev, const struct hid_device_id *id) ret =sysfs_create_group (&hdev->dev.kobj, &ntrig_attribute_group); +if (ret) +hid_err (hdev,"cannot create sysfs group\n" );return 0 ; err_free:
drivers/hwmon/adt7475.c +9 -5
@@ -274,14 +274,18 @@ static inline u16 volt2reg(int channel, long volt, u8 bypass_attn)return clamp_val (reg,0 ,1023 ) & (0xff <<2 ); } -static u16 adt7475_read_word (struct i2c_client *client,int reg) +static int adt7475_read_word (struct i2c_client *client,int reg) { -u16 val; +int val1, val2; - val =i2c_smbus_read_byte_data (client, reg); - val |= (i2c_smbus_read_byte_data (client, reg +1 ) <<8 ); + val1 =i2c_smbus_read_byte_data (client, reg); +if (val1 <0 ) +return val1; + val2 =i2c_smbus_read_byte_data (client, reg +1 ); +if (val2 <0 ) +return val2; -return val; +return val1 | (val2 <<8 ); }static void adt7475_write_word (struct i2c_client *client,int reg,u16 val)
drivers/hwmon/ina2xx.c +11 -2
@@ -17,7 +17,7 @@* Bi-directional Current/Power Monitor with I2C Interface * Datasheet: http://www.ti.com/product/ina230 * -* Copyright (C) 2012 Lothar Felten <[email protected]> +* Copyright (C) 2012 Lothar Felten <[email protected]> * Thanks to Jan Volkering * * This program is free software; you can redistribute it and/or modify
@@ -328,6 +328,15 @@ static int ina2xx_set_shunt(struct ina2xx_data *data, long val)return 0 ; } +static ssize_t ina2xx_show_shunt (struct device *dev, +struct device_attribute *da, +char *buf) +{ +struct ina2xx_data *data =dev_get_drvdata (dev); + +return snprintf (buf,PAGE_SIZE ,"%li\n" , data->rshunt); +} +static ssize_t ina2xx_store_shunt (struct device *dev,struct device_attribute *da,const char *buf,size_t count)
@@ -402,7 +411,7 @@ static SENSOR_DEVICE_ATTR(power1_input, S_IRUGO, ina2xx_show_value, NULL,/* shunt resistance */ static SENSOR_DEVICE_ATTR(shunt_resistor, S_IRUGO | S_IWUSR, - ina2xx_show_value, ina2xx_store_shunt, + ina2xx_show_shunt, ina2xx_store_shunt, INA2XX_CALIBRATION);/* update interval (ina226 only) */
drivers/i2c/busses/i2c-i801.c +8 -1
@@ -1408,6 +1408,13 @@ static void i801_add_tco(struct i801_priv *priv) }#ifdef CONFIG_ACPI +static bool i801_acpi_is_smbus_ioport (const struct i801_priv *priv, +acpi_physical_address address) +{ +return address >= priv->smba && + address <=pci_resource_end (priv->pci_dev,SMBBAR ); +} +static acpi_status i801_acpi_io_handler (u32 function,acpi_physical_address address,u32 bits,u64 *value,void *handler_context,void *region_context)
@@ -1423,7 +1430,7 @@ i801_acpi_io_handler(u32 function, acpi_physical_address address, u32 bits,*/ mutex_lock (&priv->acpi_lock); -if (!priv->acpi_reserved) { +if (!priv->acpi_reserved &&i801_acpi_is_smbus_ioport (priv, address)) { priv->acpi_reserved = true;dev_warn (&pdev->dev,"BIOS is accessing SMBus registers\n" );
drivers/infiniband/core/rw.c +1 -1
@@ -87,7 +87,7 @@ static int rdma_rw_init_one_mr(struct ib_qp *qp, u8 port_num, } ret =ib_map_mr_sg (reg->mr, sg, nents, &offset,PAGE_SIZE ); -if (ret < nents) { +if (ret <0 || ret < nents) {ib_mr_pool_put (qp, &qp->rdma_mrs, reg->mr);return -EINVAL ; }
drivers/infiniband/hw/hfi1/pio.c +7 -2
@@ -88,6 +88,7 @@ void pio_send_control(struct hfi1_devdata *dd, int op)unsigned long flags;int write =1 ;/* write sendctrl back */ int flush =0 ;/* re-read sendctrl to make sure it is flushed */ +int i;spin_lock_irqsave (&dd->sendctrl_lock, flags);
@@ -97,9 +98,13 @@ void pio_send_control(struct hfi1_devdata *dd, int op) reg |=SEND_CTRL_SEND_ENABLE_SMASK ;/* Fall through */ case PSC_DATA_VL_ENABLE : + mask =0 ; +for (i =0 ; i <ARRAY_SIZE (dd->vld); i++) +if (!dd->vld[i].mtu) + mask |=BIT_ULL (i);/* Disallow sending on VLs not enabled */ - mask = (((~0ull ) << num_vls) &SEND_CTRL_UNSUPPORTED_VL_MASK ) << -SEND_CTRL_UNSUPPORTED_VL_SHIFT ; + mask = (mask &SEND_CTRL_UNSUPPORTED_VL_MASK ) << +SEND_CTRL_UNSUPPORTED_VL_SHIFT ; reg = (reg & ~SEND_CTRL_UNSUPPORTED_VL_SMASK ) | mask;break ;case PSC_GLOBAL_DISABLE :
drivers/infiniband/hw/hfi1/user_sdma.c +1 -1
@@ -956,7 +956,7 @@ static int user_sdma_send_pkts(struct user_sdma_request *req, unsigned maxpkts)if (ACCESS_ONCE (iovec->offset) == iovec->iov.iov_len) {if (++req->iov_idx == req->data_iovs) { ret = -EFAULT ; - goto free_txreq; + goto free_tx; } iovec = &req->iovs[req->iov_idx];WARN_ON (iovec->offset);
drivers/infiniband/hw/hfi1/verbs.c +7 -1
@@ -1511,12 +1511,18 @@ static int hfi1_check_ah(struct ib_device *ibdev, struct ib_ah_attr *ah_attr)struct hfi1_pportdata *ppd;struct hfi1_devdata *dd;u8 sc5; +u8 sl;/* test the mapping for validity */ ibp =to_iport (ibdev, ah_attr->port_num); ppd =ppd_from_ibp (ibp); - sc5 = ibp->sl_to_sc[ah_attr->sl]; dd =dd_from_ppd (ppd); + + sl = ah_attr->sl; +if (sl >=ARRAY_SIZE (ibp->sl_to_sc)) +return -EINVAL ; + + sc5 = ibp->sl_to_sc[sl];if (sc_to_vlt (dd, sc5) > num_vls &&sc_to_vlt (dd, sc5) !=0xf )return -EINVAL ;return 0 ;
drivers/infiniband/ulp/srp/ib_srp.c +3 -3
@@ -2639,7 +2639,7 @@ static int srp_reset_device(struct scsi_cmnd *scmnd) {struct srp_target_port *target =host_to_target (scmnd->device->host);struct srp_rdma_ch *ch; -int i; +int i, j;u8 status;shost_printk (KERN_ERR , target->scsi_host,"SRP reset_device called\n" );
@@ -2653,8 +2653,8 @@ static int srp_reset_device(struct scsi_cmnd *scmnd)for (i =0 ; i < target->ch_count; i++) { ch = &target->ch[i]; -for (i =0 ; i < target->req_ring_size; ++i) { -struct srp_request *req = &ch->req_ring[i]; +for (j =0 ; j < target->req_ring_size; ++j) { +struct srp_request *req = &ch->req_ring[j];srp_finish_req (ch, req, scmnd->device,DID_RESET <<16 ); }
drivers/input/mouse/elantech.c +2 -0
@@ -1176,6 +1176,8 @@ static const struct dmi_system_id elantech_dmi_has_middle_button[] = {static const char *const middle_button_pnp_ids[] = {"LEN2131" ,/* ThinkPad P52 w/ NFC */ "LEN2132" ,/* ThinkPad P52 */ +"LEN2133" ,/* ThinkPad P72 w/ NFC */ +"LEN2134" ,/* ThinkPad P72 */ NULL };
drivers/iommu/amd_iommu.c +1 -1
@@ -2452,9 +2452,9 @@ static void __unmap_single(struct dma_ops_domain *dma_dom, }if (amd_iommu_unmap_flush) { -dma_ops_free_iova (dma_dom, dma_addr, pages);domain_flush_tlb (&dma_dom->domain);domain_flush_complete (&dma_dom->domain); +dma_ops_free_iova (dma_dom, dma_addr, pages); }else {queue_add (dma_dom, dma_addr, pages); }
drivers/md/md-cluster.c +10 -9
@@ -302,15 +302,6 @@ static void recover_bitmaps(struct md_thread *thread)while (cinfo->recovery_map) { slot =fls64 ((u64 )cinfo->recovery_map) -1 ; -/* Clear suspend_area associated with the bitmap */ -spin_lock_irq (&cinfo->suspend_lock); -list_for_each_entry_safe (s, tmp, &cinfo->suspend_list, list) -if (slot == s->slot) { -list_del (&s->list); -kfree (s); - } -spin_unlock_irq (&cinfo->suspend_lock); -snprintf (str,64 ,"bitmap%04d" , slot); bm_lockres =lockres_init (mddev, str,NULL ,1 );if (!bm_lockres) {
@@ -329,6 +320,16 @@ static void recover_bitmaps(struct md_thread *thread)pr_err ("md-cluster: Could not copy data from bitmap %d\n" , slot); goto clear_bit; } + +/* Clear suspend_area associated with the bitmap */ +spin_lock_irq (&cinfo->suspend_lock); +list_for_each_entry_safe (s, tmp, &cinfo->suspend_list, list) +if (slot == s->slot) { +list_del (&s->list); +kfree (s); + } +spin_unlock_irq (&cinfo->suspend_lock); +if (hi >0 ) {if (lo < mddev->recovery_cp) mddev->recovery_cp = lo;
drivers/media/i2c/soc_camera/ov772x.c +1 -1
@@ -834,7 +834,7 @@ static int ov772x_set_params(struct ov772x_priv *priv,* set COM8 */ if (priv->band_filter) { - ret =ov772x_mask_set (client,COM8 ,BNDF_ON_OFF ,1 ); + ret =ov772x_mask_set (client,COM8 ,BNDF_ON_OFF ,BNDF_ON_OFF );if (!ret) ret =ov772x_mask_set (client,BDBASE ,0xff ,256 - priv->band_filter);
drivers/media/platform/exynos4-is/fimc-isp-video.c +8 -3
@@ -384,12 +384,17 @@ static void __isp_video_try_fmt(struct fimc_isp *isp,struct v4l2_pix_format_mplane *pixm, const struct fimc_fmt **fmt) { - *fmt =fimc_isp_find_format (&pixm->pixelformat,NULL ,2 ); + const struct fimc_fmt *__fmt; + + __fmt =fimc_isp_find_format (&pixm->pixelformat,NULL ,2 ); + +if (fmt) + *fmt = __fmt; pixm->colorspace =V4L2_COLORSPACE_SRGB ; pixm->field =V4L2_FIELD_NONE ; - pixm->num_planes = (*fmt)->memplanes; - pixm->pixelformat = (*fmt)->fourcc; + pixm->num_planes = __fmt->memplanes; + pixm->pixelformat = __fmt->fourcc;/* * TODO: double check with the docmentation these width/height * constraints are correct.
drivers/media/platform/fsl-viu.c +23 -15
@@ -1417,7 +1417,7 @@ static int viu_of_probe(struct platform_device *op) sizeof(struct viu_reg), DRV_NAME)) {dev_err (&op->dev,"Error while requesting mem region\n" ); ret = -EBUSY ; - goto err; + goto err_irq; }/* remap registers */
@@ -1425,7 +1425,7 @@ static int viu_of_probe(struct platform_device *op)if (!viu_regs) {dev_err (&op->dev,"Can't map register set\n" ); ret = -ENOMEM ; - goto err; + goto err_irq; }/* Prepare our private structure */
@@ -1433,7 +1433,7 @@ static int viu_of_probe(struct platform_device *op)if (!viu_dev) {dev_err (&op->dev,"Can't allocate private structure\n" ); ret = -ENOMEM ; - goto err; + goto err_irq; } viu_dev->vr = viu_regs;
@@ -1449,16 +1449,21 @@ static int viu_of_probe(struct platform_device *op) ret =v4l2_device_register (viu_dev->dev, &viu_dev->v4l2_dev);if (ret <0 ) {dev_err (&op->dev,"v4l2_device_register() failed: %d\n" , ret); - goto err; + goto err_irq; } ad =i2c_get_adapter (0 ); +if (!ad) { + ret = -EFAULT ; +dev_err (&op->dev,"couldn't get i2c adapter\n" ); + goto err_v4l2; + }v4l2_ctrl_handler_init (&viu_dev->hdl,5 );if (viu_dev->hdl.error) { ret = viu_dev->hdl.error;dev_err (&op->dev,"couldn't register control\n" ); - goto err_vdev; + goto err_i2c; }/* This control handler will inherit the control(s) from the sub-device(s). */
@@ -1476,7 +1481,7 @@ static int viu_of_probe(struct platform_device *op) vdev =video_device_alloc ();if (vdev ==NULL ) { ret = -ENOMEM ; - goto err_vdev; + goto err_hdl; } *vdev = viu_template;
@@ -1497,7 +1502,7 @@ static int viu_of_probe(struct platform_device *op) ret =video_register_device (viu_dev->vdev,VFL_TYPE_GRABBER ,-1 );if (ret <0 ) {video_device_release (viu_dev->vdev); - goto err_vdev; + goto err_unlock; }/* enable VIU clock */
@@ -1505,12 +1510,12 @@ static int viu_of_probe(struct platform_device *op)if (IS_ERR (clk)) {dev_err (&op->dev,"failed to lookup the clock!\n" ); ret =PTR_ERR (clk); - goto err_clk; + goto err_vdev; } ret =clk_prepare_enable (clk);if (ret) {dev_err (&op->dev,"failed to enable the clock!\n" ); - goto err_clk; + goto err_vdev; } viu_dev->clk = clk;
@@ -1521,7 +1526,7 @@ static int viu_of_probe(struct platform_device *op)if (request_irq (viu_dev->irq, viu_intr,0 ,"viu" , (void *)viu_dev)) {dev_err (&op->dev,"Request VIU IRQ failed.\n" ); ret = -ENODEV ; - goto err_irq; + goto err_clk; }mutex_unlock (&viu_dev->lock);
@@ -1529,16 +1534,19 @@ static int viu_of_probe(struct platform_device *op)dev_info (&op->dev,"Freescale VIU Video Capture Board\n" );return ret; -err_irq: -clk_disable_unprepare (viu_dev->clk); err_clk: -video_unregister_device (viu_dev->vdev); +clk_disable_unprepare (viu_dev->clk); err_vdev: -v4l2_ctrl_handler_free (&viu_dev->hdl); +video_unregister_device (viu_dev->vdev); +err_unlock:mutex_unlock (&viu_dev->lock); +err_hdl: +v4l2_ctrl_handler_free (&viu_dev->hdl); +err_i2c:i2c_put_adapter (ad); +err_v4l2:v4l2_device_unregister (&viu_dev->v4l2_dev); -err: +err_irq:irq_dispose_mapping (viu_irq);return ret; }
drivers/media/platform/omap3isp/isp.c +1 -1
@@ -304,7 +304,7 @@ static struct clk *isp_xclk_src_get(struct of_phandle_args *clkspec, void *data)static int isp_xclk_init (struct isp_device *isp) {struct device_node *np = isp->dev->of_node; -struct clk_init_data init; +struct clk_init_data init = {0 };unsigned int i;for (i =0 ; i <ARRAY_SIZE (isp->xclks); ++i)
drivers/media/platform/s3c-camif/camif-capture.c +2 -0
@@ -117,6 +117,8 @@ static int sensor_set_power(struct camif_dev *camif, int on)if (camif->sensor.power_count == !on) err =v4l2_subdev_call (sensor->sd, core, s_power, on); +if (err == -ENOIOCTLCMD ) + err =0 ;if (!err) sensor->power_count += on ?1 :-1 ;
drivers/media/usb/tm6000/tm6000-dvb.c +5 -0
@@ -273,6 +273,11 @@ static int register_dvb(struct tm6000_core *dev) ret =dvb_register_adapter (&dvb->adapter,"Trident TVMaster 6000 DVB-T" ,THIS_MODULE , &dev->udev->dev, adapter_nr); +if (ret <0 ) { +pr_err ("tm6000: couldn't register the adapter!\n" ); + goto err; + } + dvb->adapter.priv = dev;if (dvb->frontend) {
drivers/media/usb/uvc/uvc_video.c +18 -6
@@ -163,14 +163,27 @@ static void uvc_fixup_video_ctrl(struct uvc_streaming *stream, } } +static size_t uvc_video_ctrl_size (struct uvc_streaming *stream) +{ +/* +* Return the size of the video probe and commit controls, which depends +* on the protocol version. +*/ +if (stream->dev->uvc_version <0x0110 ) +return 26 ; +else if (stream->dev->uvc_version <0x0150 ) +return 34 ; +else +return 48 ; +} +static int uvc_get_video_ctrl (struct uvc_streaming *stream,struct uvc_streaming_control *ctrl,int probe,__u8 query) { +__u16 size =uvc_video_ctrl_size (stream);__u8 *data; -__u16 size;int ret; - size = stream->dev->uvc_version >=0x0110 ?34 :26 ;if ((stream->dev->quirks &UVC_QUIRK_PROBE_DEF ) && query ==UVC_GET_DEF )return -EIO ;
@@ -225,7 +238,7 @@ static int uvc_get_video_ctrl(struct uvc_streaming *stream, ctrl->dwMaxVideoFrameSize =get_unaligned_le32 (&data[18 ]); ctrl->dwMaxPayloadTransferSize =get_unaligned_le32 (&data[22 ]); -if (size ==34 ) { +if (size >=34 ) { ctrl->dwClockFrequency =get_unaligned_le32 (&data[26 ]); ctrl->bmFramingInfo = data[30 ]; ctrl->bPreferedVersion = data[31 ];
@@ -254,11 +267,10 @@ static int uvc_get_video_ctrl(struct uvc_streaming *stream,static int uvc_set_video_ctrl (struct uvc_streaming *stream,struct uvc_streaming_control *ctrl,int probe) { +__u16 size =uvc_video_ctrl_size (stream);__u8 *data; -__u16 size;int ret; - size = stream->dev->uvc_version >=0x0110 ?34 :26 ; data =kzalloc (size,GFP_KERNEL );if (data ==NULL )return -ENOMEM ;
@@ -275,7 +287,7 @@ static int uvc_set_video_ctrl(struct uvc_streaming *stream,put_unaligned_le32 (ctrl->dwMaxVideoFrameSize, &data[18 ]);put_unaligned_le32 (ctrl->dwMaxPayloadTransferSize, &data[22 ]); -if (size ==34 ) { +if (size >=34 ) {put_unaligned_le32 (ctrl->dwClockFrequency, &data[26 ]); data[30 ] = ctrl->bmFramingInfo; data[31 ] = ctrl->bPreferedVersion;
drivers/media/v4l2-core/v4l2-event.c +20 -18
@@ -119,14 +119,6 @@ static void __v4l2_event_queue_fh(struct v4l2_fh *fh, const struct v4l2_event *eif (sev ==NULL )return ; -/* -* If the event has been added to the fh->subscribed list, but its -* add op has not completed yet elems will be 0, treat this as -* not being subscribed. -*/ -if (!sev->elems) -return ; -/* Increase event sequence number on fh. */ fh->sequence++;
@@ -212,6 +204,7 @@ int v4l2_event_subscribe(struct v4l2_fh *fh,struct v4l2_subscribed_event *sev, *found_ev;unsigned long flags;unsigned i; +int ret =0 ;if (sub->type ==V4L2_EVENT_ALL )return -EINVAL ;
@@ -229,31 +222,36 @@ int v4l2_event_subscribe(struct v4l2_fh *fh, sev->flags = sub->flags; sev->fh = fh; sev->ops = ops; + sev->elems = elems; + +mutex_lock (&fh->subscribe_lock);spin_lock_irqsave (&fh->vdev->fh_lock, flags); found_ev =v4l2_event_subscribed (fh, sub->type, sub->id); -if (!found_ev) -list_add (&sev->list, &fh->subscribed);spin_unlock_irqrestore (&fh->vdev->fh_lock, flags);if (found_ev) { +/* Already listening */ kfree (sev); -return 0 ;/* Already listening */ + goto out_unlock; }if (sev->ops && sev->ops->add) { -int ret = sev->ops->add (sev, elems); + ret = sev->ops->add (sev, elems);if (ret) { - sev->ops =NULL ; -v4l2_event_unsubscribe (fh, sub); -return ret; +kfree (sev); + goto out_unlock; } } -/* Mark as ready for use */ - sev->elems = elems; +spin_lock_irqsave (&fh->vdev->fh_lock, flags); +list_add (&sev->list, &fh->subscribed); +spin_unlock_irqrestore (&fh->vdev->fh_lock, flags); -return 0 ; +out_unlock: +mutex_unlock (&fh->subscribe_lock); + +return ret; }EXPORT_SYMBOL_GPL (v4l2_event_subscribe);
@@ -292,6 +290,8 @@ int v4l2_event_unsubscribe(struct v4l2_fh *fh,return 0 ; } +mutex_lock (&fh->subscribe_lock); +spin_lock_irqsave (&fh->vdev->fh_lock, flags); sev =v4l2_event_subscribed (fh, sub->type, sub->id);
@@ -309,6 +309,8 @@ int v4l2_event_unsubscribe(struct v4l2_fh *fh,if (sev && sev->ops && sev->ops->del) sev->ops->del (sev); +mutex_unlock (&fh->subscribe_lock); +kfree (sev);return 0 ;
drivers/media/v4l2-core/v4l2-fh.c +2 -0
@@ -50,6 +50,7 @@ void v4l2_fh_init(struct v4l2_fh *fh, struct video_device *vdev)INIT_LIST_HEAD (&fh->available);INIT_LIST_HEAD (&fh->subscribed); fh->sequence =-1 ; +mutex_init (&fh->subscribe_lock); }EXPORT_SYMBOL_GPL (v4l2_fh_init);
@@ -95,6 +96,7 @@ void v4l2_fh_exit(struct v4l2_fh *fh)return ;v4l_disable_media_source (fh->vdev);v4l2_event_unsubscribe_all (fh); +mutex_destroy (&fh->subscribe_lock); fh->vdev =NULL ; }EXPORT_SYMBOL_GPL (v4l2_fh_exit);
drivers/misc/tsl2550.c +1 -1
@@ -177,7 +177,7 @@ static int tsl2550_calculate_lux(u8 ch0, u8 ch1) }else lux =0 ; else - return -EAGAIN; + return 0;/* LUX range check */ return lux >TSL2550_MAX_LUX ?TSL2550_MAX_LUX : lux;
drivers/misc/vmw_vmci/vmci_queue_pair.c +2 -2
@@ -755,7 +755,7 @@ static int qp_host_get_user_memory(u64 produce_uva, retval =get_user_pages_fast ((uintptr_t ) produce_uva, produce_q->kernel_if->num_pages,1 , produce_q->kernel_if->u.h.header_page); -if (retval < produce_q->kernel_if->num_pages) { +if (retval < (int )produce_q->kernel_if->num_pages) {pr_debug ("get_user_pages_fast(produce) failed (retval=%d)" , retval); qp_release_pages(produce_q->kernel_if->u.h.header_page,
@@ -767,7 +767,7 @@ static int qp_host_get_user_memory(u64 produce_uva, retval =get_user_pages_fast ((uintptr_t ) consume_uva, consume_q->kernel_if->num_pages,1 , consume_q->kernel_if->u.h.header_page); -if (retval < consume_q->kernel_if->num_pages) { +if (retval < (int )consume_q->kernel_if->num_pages) {pr_debug ("get_user_pages_fast(consume) failed (retval=%d)" , retval); qp_release_pages(consume_q->kernel_if->u.h.header_page,
drivers/net/ethernet/hisilicon/hns/hnae.h +3 -3
@@ -213,10 +213,10 @@ struct hnae_desc_cb {/* priv data for the desc, e.g. skb when use with ip stack*/ void *priv; -u16 page_offset; -u16 reuse_flag; +u32 page_offset; +u32 length;/* length of the buffer */ -u16 length;/* length of the buffer */ +u16 reuse_flag;/* desc type, used by the ring user to mark the type of the priv data */ u16 type;
drivers/net/ethernet/hisilicon/hns/hns_enet.c +1 -1
@@ -529,7 +529,7 @@ static void hns_nic_reuse_page(struct sk_buff *skb, int i, }skb_add_rx_frag (skb, i, desc_cb->priv, desc_cb->page_offset + pull_len, - size - pull_len, truesize - pull_len); + size - pull_len, truesize);/* avoid re-using remote pages,flag default unreuse */ if (unlikely (page_to_nid (desc_cb->priv) !=numa_node_id ()))
drivers/net/ethernet/intel/e1000/e1000_ethtool.c +4 -3
@@ -645,14 +645,14 @@ static int e1000_set_ringparam(struct net_device *netdev, adapter->tx_ring = tx_old;e1000_free_all_rx_resources (adapter);e1000_free_all_tx_resources (adapter); -kfree (tx_old); -kfree (rx_old); adapter->rx_ring = rxdr; adapter->tx_ring = txdr; err =e1000_up (adapter);if (err) goto err_setup; } +kfree (tx_old); +kfree (rx_old);clear_bit (__E1000_RESETTING, &adapter->flags);return 0 ;
@@ -665,7 +665,8 @@ static int e1000_set_ringparam(struct net_device *netdev, err_alloc_rx:kfree (txdr); err_alloc_tx: -e1000_up (adapter); +if (netif_running (adapter->netdev)) +e1000_up (adapter); err_setup:clear_bit (__E1000_RESETTING, &adapter->flags);return err;
drivers/net/ethernet/qlogic/qed/qed_mcp.c +79 -17
141 lines not on this page · raw message
drivers/net/ethernet/qlogic/qed/qed_reg_addr.h +1 -0
@@ -510,6 +510,7 @@ 0#define MCP_REG_CPU_STATE \ 0xe05004UL +#define MCP_REG_CPU_STATE_SOFT_HALTED (0x1UL << 10)#define MCP_REG_CPU_EVENT_MASK \ 0xe05008UL#define PGLUE_B_REG_PF_BAR0_SIZE \
drivers/net/phy/xilinx_gmii2rgmii.c +9 -1
@@ -40,8 +40,11 @@ static int xgmiitorgmii_read_status(struct phy_device *phydev) {struct gmii2rgmii *priv = phydev->priv;u16 val =0 ; +int err; - priv->phy_drv->read_status (phydev); + err = priv->phy_drv->read_status (phydev); +if (err <0 ) +return err; val =mdiobus_read (phydev->mdio.bus, priv->addr,XILINX_GMII2RGMII_REG ); val &= ~XILINX_GMII2RGMII_SPEED_MASK ;
@@ -81,6 +84,11 @@ static int xgmiitorgmii_probe(struct mdio_device *mdiodev)return -EPROBE_DEFER ; } +if (!priv->phy_dev->drv) { +dev_info (dev,"Attached phy not ready\n" ); +return -EPROBE_DEFER ; + } + priv->addr = mdiodev->addr; priv->phy_drv = priv->phy_dev->drv; memcpy(&priv->conv_phy_drv, priv->phy_dev->drv,
drivers/net/wireless/ath/ath10k/htt_rx.c +4 -1
@@ -214,11 +214,12 @@ int ath10k_htt_rx_ring_refill(struct ath10k *ar)spin_lock_bh (&htt->rx_ring.lock); ret =ath10k_htt_rx_ring_fill_n (htt, (htt->rx_ring.fill_level - htt->rx_ring.fill_cnt)); -spin_unlock_bh (&htt->rx_ring.lock);if (ret)ath10k_htt_rx_ring_free (htt); +spin_unlock_bh (&htt->rx_ring.lock); +return ret; }
@@ -230,7 +231,9 @@ void ath10k_htt_rx_free(struct ath10k_htt *htt)skb_queue_purge (&htt->rx_in_ord_compl_q);skb_queue_purge (&htt->tx_fetch_ind_q); +spin_lock_bh (&htt->rx_ring.lock);ath10k_htt_rx_ring_free (htt); +spin_unlock_bh (&htt->rx_ring.lock); dma_free_coherent(htt->ar->dev, (htt->rx_ring.size *
drivers/net/wireless/rndis_wlan.c +2 -0
@@ -2921,6 +2921,8 @@ static void rndis_wlan_auth_indication(struct usbnet *usbdev,while (buflen >=sizeof (*auth_req)) { auth_req = (void *)buf; +if (buflen <le32_to_cpu (auth_req->length)) +return ; type ="unknown" ; flags =le32_to_cpu (auth_req->flags); pairwise_error = false;
drivers/net/wireless/ti/wlcore/cmd.c +6 -0
@@ -35,6 +35,7 @@#include "wl12xx_80211.h" #include "cmd.h" #include "event.h" +#include "ps.h" #include "tx.h" #include "hw_ops.h"
@@ -191,6 +192,10 @@ int wlcore_cmd_wait_for_event_or_timeout(struct wl1271 *wl, timeout_time = jiffies +msecs_to_jiffies (WL1271_EVENT_TIMEOUT ); + ret =wl1271_ps_elp_wakeup (wl); +if (ret <0 ) +return ret; + do { if (time_after(jiffies, timeout_time)) { wl1271_debug(DEBUG_CMD, "timeout waiting for event %d",
@@ -222,6 +227,7 @@ int wlcore_cmd_wait_for_event_or_timeout(struct wl1271 *wl, }while (!event); out: +wl1271_ps_elp_sleep (wl);kfree (events_vector);return ret; }
drivers/power/reset/vexpress-poweroff.c +8 -4
@@ -35,6 +35,7 @@ static void vexpress_reset_do(struct device *dev, const char *what) }static struct device *vexpress_power_off_device; +static atomic_t vexpress_restart_nb_refcnt =ATOMIC_INIT (0 );static void vexpress_power_off (void ) {
@@ -99,10 +100,13 @@ static int _vexpress_register_restart_handler(struct device *dev)int err; vexpress_restart_device = dev; - err =register_restart_handler (&vexpress_restart_nb); -if (err) { -dev_err (dev,"cannot register restart handler (err=%d)\n" , err); -return err; +if (atomic_inc_return (&vexpress_restart_nb_refcnt) ==1 ) { + err =register_restart_handler (&vexpress_restart_nb); +if (err) { +dev_err (dev,"cannot register restart handler (err=%d)\n" , err); +atomic_dec (&vexpress_restart_nb_refcnt); +return err; + } }device_create_file (dev, &dev_attr_active);
drivers/power/supply/power_supply_core.c +9 -2
@@ -14,6 +14,7 @@#include <linux/types.h> #include <linux/init.h> #include <linux/slab.h> +#include <linux/delay.h> #include <linux/device.h> #include <linux/notifier.h> #include <linux/err.h>
@@ -138,8 +139,13 @@ static void power_supply_deferred_register_work(struct work_struct *work) struct power_supply *psy = container_of(work, struct power_supply, deferred_register_work.work); -if (psy->dev.parent) -mutex_lock (&psy->dev.parent->mutex); +if (psy->dev.parent) { +while (!mutex_trylock (&psy->dev.parent->mutex)) { +if (psy->removing) +return ; +msleep (10 ); + } + }power_supply_changed (psy);
@@ -944,6 +950,7 @@ EXPORT_SYMBOL_GPL(devm_power_supply_register_no_ws);void power_supply_unregister (struct power_supply *psy) {WARN_ON (atomic_dec_return (&psy->use_cnt)); + psy->removing = true;cancel_work_sync (&psy->changed_work);cancel_delayed_work_sync (&psy->deferred_register_work);sysfs_remove_link (&psy->dev.kobj,"powers" );
drivers/regulator/core.c +1 -1
@@ -4054,13 +4054,13 @@ regulator_register(const struct regulator_desc *regulator_desc, !rdev->desc->fixed_uV) rdev->is_switch = true; +dev_set_drvdata (&rdev->dev, rdev); ret =device_register (&rdev->dev);if (ret !=0 ) {put_device (&rdev->dev); goto unset_supplies; } -dev_set_drvdata (&rdev->dev, rdev);rdev_init_debugfs (rdev);/* try to resolve regulators supply since a new one was registered */
drivers/scsi/bnx2i/bnx2i_hwi.c +2 -0
@@ -2742,6 +2742,8 @@ int bnx2i_map_ep_dbell_regs(struct bnx2i_endpoint *ep) BNX2X_DOORBELL_PCI_BAR); reg_off = (1 <<BNX2X_DB_SHIFT ) * (cid_num &0x1FFFF ); ep->qp.ctx_base =ioremap_nocache (reg_base + reg_off,4 ); +if (!ep->qp.ctx_base) +return -ENOMEM ; goto arm_cq; }
drivers/scsi/ibmvscsi/ibmvscsi.c +2 -2
@@ -93,7 +93,7 @@ static int max_requests = IBMVSCSI_MAX_REQUESTS_DEFAULT;static int max_events =IBMVSCSI_MAX_REQUESTS_DEFAULT +2 ;static int fast_fail =1 ;static int client_reserve =1 ; -static char partition_name[97 ] ="UNKNOWN" ; +static char partition_name[96 ] ="UNKNOWN" ;static unsigned int partition_number =-1 ;static struct scsi_transport_template *ibmvscsi_transport_template;
@@ -259,7 +259,7 @@ static void gather_partition_info(void) ppartition_name =of_get_property (of_root,"ibm,partition-name" ,NULL );if (ppartition_name) -strncpy (partition_name, ppartition_name, +strlcpy (partition_name, ppartition_name,sizeof (partition_name)); p_number_ptr =of_get_property (of_root,"ibm,partition-no" ,NULL );if (p_number_ptr)
drivers/scsi/megaraid/megaraid_sas_base.c +3 -0
@@ -6193,6 +6193,9 @@ megasas_resume(struct pci_dev *pdev) goto fail_init_mfi; } +if (megasas_get_ctrl_info (instance) !=DCMD_SUCCESS ) + goto fail_init_mfi; +tasklet_init (&instance->isr_tasklet, instance->instancet->tasklet, (unsigned long )instance);
drivers/spi/spi-rspi.c +30 -4
@@ -597,11 +597,13 @@ static int rspi_dma_transfer(struct rspi_data *rspi, struct sg_table *tx, ret =wait_event_interruptible_timeout (rspi->wait, rspi->dma_callbacked,HZ ); -if (ret >0 && rspi->dma_callbacked) +if (ret >0 && rspi->dma_callbacked) { ret =0 ; -else if (!ret) { -dev_err (&rspi->master->dev,"DMA timeout\n" ); - ret = -ETIMEDOUT ; + }else { +if (!ret) { +dev_err (&rspi->master->dev,"DMA timeout\n" ); + ret = -ETIMEDOUT ; + }if (tx)dmaengine_terminate_all (rspi->master->dma_tx);if (rx)
@@ -1313,12 +1315,36 @@ static const struct platform_device_id spi_driver_ids[] = {MODULE_DEVICE_TABLE (platform, spi_driver_ids); +#ifdef CONFIG_PM_SLEEP +static int rspi_suspend (struct device *dev) +{ +struct platform_device *pdev =to_platform_device (dev); +struct rspi_data *rspi =platform_get_drvdata (pdev); + +return spi_master_suspend (rspi->master); +} + +static int rspi_resume (struct device *dev) +{ +struct platform_device *pdev =to_platform_device (dev); +struct rspi_data *rspi =platform_get_drvdata (pdev); + +return spi_master_resume (rspi->master); +} + +static SIMPLE_DEV_PM_OPS(rspi_pm_ops, rspi_suspend, rspi_resume); +#define DEV_PM_OPS &rspi_pm_ops +#else +#define DEV_PM_OPS NULL +#endif /* CONFIG_PM_SLEEP */ +static struct platform_driver rspi_driver = { .probe = rspi_probe, .remove = rspi_remove, .id_table = spi_driver_ids, .driver = { .name ="renesas_spi" , + .pm =DEV_PM_OPS , .of_match_table =of_match_ptr (rspi_of_match), }, };
drivers/spi/spi-sh-msiof.c +27 -1
@@ -373,7 +373,8 @@ static void sh_msiof_spi_set_mode_regs(struct sh_msiof_spi_priv *p,static void sh_msiof_reset_str (struct sh_msiof_spi_priv *p) { -sh_msiof_write (p,STR ,sh_msiof_read (p,STR )); +sh_msiof_write (p,STR , +sh_msiof_read (p,STR ) & ~(STR_TDREQ |STR_RDREQ )); } static void sh_msiof_spi_write_fifo_8(struct sh_msiof_spi_priv *p,
@@ -1275,12 +1276,37 @@ static const struct platform_device_id spi_driver_ids[] = { };MODULE_DEVICE_TABLE (platform, spi_driver_ids); +#ifdef CONFIG_PM_SLEEP +static int sh_msiof_spi_suspend (struct device *dev) +{ +struct platform_device *pdev =to_platform_device (dev); +struct sh_msiof_spi_priv *p =platform_get_drvdata (pdev); + +return spi_master_suspend (p->master); +} + +static int sh_msiof_spi_resume (struct device *dev) +{ +struct platform_device *pdev =to_platform_device (dev); +struct sh_msiof_spi_priv *p =platform_get_drvdata (pdev); + +return spi_master_resume (p->master); +} + +static SIMPLE_DEV_PM_OPS(sh_msiof_spi_pm_ops, sh_msiof_spi_suspend, + sh_msiof_spi_resume); +#define DEV_PM_OPS &sh_msiof_spi_pm_ops +#else +#define DEV_PM_OPS NULL +#endif /* CONFIG_PM_SLEEP */ +static struct platform_driver sh_msiof_spi_drv = { .probe = sh_msiof_spi_probe, .remove = sh_msiof_spi_remove, .id_table = spi_driver_ids, .driver = { .name ="spi_sh_msiof" , + .pm =DEV_PM_OPS , .of_match_table =of_match_ptr (sh_msiof_match), }, };
drivers/spi/spi-tegra20-slink.c +23 -8
@@ -1063,6 +1063,24 @@ static int tegra_slink_probe(struct platform_device *pdev) goto exit_free_master; } +/* disabled clock may cause interrupt storm upon request */ + tspi->clk =devm_clk_get (&pdev->dev,NULL ); +if (IS_ERR (tspi->clk)) { + ret =PTR_ERR (tspi->clk); +dev_err (&pdev->dev,"Can not get clock %d\n" , ret); + goto exit_free_master; + } + ret =clk_prepare (tspi->clk); +if (ret <0 ) { +dev_err (&pdev->dev,"Clock prepare failed %d\n" , ret); + goto exit_free_master; + } + ret =clk_enable (tspi->clk); +if (ret <0 ) { +dev_err (&pdev->dev,"Clock enable failed %d\n" , ret); + goto exit_free_master; + } + spi_irq =platform_get_irq (pdev,0 ); tspi->irq = spi_irq; ret = request_threaded_irq(tspi->irq, tegra_slink_isr,
@@ -1071,14 +1089,7 @@ static int tegra_slink_probe(struct platform_device *pdev)if (ret <0 ) {dev_err (&pdev->dev,"Failed to register ISR for IRQ %d\n" , tspi->irq); - goto exit_free_master; - } - - tspi->clk =devm_clk_get (&pdev->dev,NULL ); -if (IS_ERR (tspi->clk)) { -dev_err (&pdev->dev,"can not get clock\n" ); - ret =PTR_ERR (tspi->clk); - goto exit_free_irq; + goto exit_clk_disable; } tspi->rst =devm_reset_control_get (&pdev->dev,"spi" );
@@ -1138,6 +1149,8 @@ static int tegra_slink_probe(struct platform_device *pdev)tegra_slink_deinit_dma_param (tspi, true); exit_free_irq:free_irq (spi_irq, tspi); +exit_clk_disable: +clk_disable (tspi->clk); exit_free_master:spi_master_put (master);return ret;
@@ -1150,6 +1163,8 @@ static int tegra_slink_remove(struct platform_device *pdev)free_irq (tspi->irq, tspi); +clk_disable (tspi->clk); +if (tspi->tx_dma_chan)tegra_slink_deinit_dma_param (tspi, false);
drivers/staging/android/ashmem.c +6 -0
@@ -383,6 +383,12 @@ static int ashmem_mmap(struct file *file, struct vm_area_struct *vma) goto out; } +/* requested mapping size larger than object size */ +if (vma->vm_end - vma->vm_start >PAGE_ALIGN (asma->size)) { + ret = -EINVAL ; + goto out; + } +/* requested protection bits must match our allowed protection mask */ if (unlikely ((vma->vm_flags & ~calc_vm_prot_bits (asma->prot_mask,0 )) &calc_vm_prot_bits (PROT_MASK ,0 ))) {
drivers/staging/rts5208/sd.c +1 -1
@@ -4976,7 +4976,7 @@ int sd_execute_write_data(struct scsi_cmnd *srb, struct rtsx_chip *chip) goto SD_Execute_Write_Cmd_Failed; } -rtsx_write_register (chip,SD_BYTE_CNT_L ,0xFF ,0x00 ); + retval =rtsx_write_register (chip,SD_BYTE_CNT_L ,0xFF ,0x00 );if (retval !=STATUS_SUCCESS ) {rtsx_trace (chip); goto SD_Execute_Write_Cmd_Failed;
drivers/target/iscsi/iscsi_target_auth.c +3 -12
@@ -26,15 +26,6 @@#include "iscsi_target_nego.h" #include "iscsi_target_auth.h" -static void chap_binaryhex_to_asciihex (char *dst,char *src,int src_len) -{ -int i; - -for (i =0 ; i < src_len; i++) { -sprintf (&dst[i*2 ],"%02x" , (int ) src[i] &0xff ); - } -} - static void chap_gen_challenge( struct iscsi_conn *conn, int caller,
@@ -47,7 +38,7 @@ static void chap_gen_challenge(memset (challenge_asciihex,0 ,CHAP_CHALLENGE_LENGTH *2 +1 );get_random_bytes (chap->challenge,CHAP_CHALLENGE_LENGTH ); -chap_binaryhex_to_asciihex (challenge_asciihex, chap->challenge, +bin2hex (challenge_asciihex, chap->challenge,CHAP_CHALLENGE_LENGTH );/* * Set CHAP_C, and copy the generated challenge into c_str.
@@ -281,7 +272,7 @@ static int chap_server_compute_md5( goto out; } -chap_binaryhex_to_asciihex (response, server_digest,MD5_SIGNATURE_SIZE ); +bin2hex (response, server_digest,MD5_SIGNATURE_SIZE );pr_debug ("[server] MD5 Server Digest: %s\n" , response);if (memcmp (server_digest, client_digest,MD5_SIGNATURE_SIZE ) !=0 ) {
@@ -403,7 +394,7 @@ static int chap_server_compute_md5(/* * Convert response from binary hex to ascii hext. */ -chap_binaryhex_to_asciihex (response, digest,MD5_SIGNATURE_SIZE ); +bin2hex (response, digest,MD5_SIGNATURE_SIZE ); *nr_out_len +=sprintf (nr_out_ptr + *nr_out_len,"CHAP_R=0x%s" , response); *nr_out_len +=1 ;
drivers/target/iscsi/iscsi_target_tpg.c +1 -2
@@ -637,8 +637,7 @@ int iscsit_ta_authentication(struct iscsi_portal_group *tpg, u32 authentication) none =strstr (buf1,NONE );if (none) goto out; -strncat (buf1,"," ,strlen ("," )); -strncat (buf1,NONE ,strlen (NONE )); +strlcat (buf1,"," NONE ,sizeof (buf1));if (iscsi_update_param_value (param, buf1) <0 )return -EINVAL ; }
drivers/thermal/of-thermal.c +5 -2
@@ -278,10 +278,13 @@ static int of_thermal_set_mode(struct thermal_zone_device *tz,mutex_lock (&tz->lock); -if (mode ==THERMAL_DEVICE_ENABLED ) +if (mode ==THERMAL_DEVICE_ENABLED ) { tz->polling_delay = data->polling_delay; -else + tz->passive_delay = data->passive_delay; + }else { tz->polling_delay =0 ; + tz->passive_delay =0 ; + }mutex_unlock (&tz->lock);
drivers/tty/serial/8250/serial_cs.c +4 -2
@@ -637,8 +637,10 @@ static int serial_config(struct pcmcia_device *link) (link->has_func_id) && (link->socket->pcmcia_pfc ==0 ) && ((link->func_id ==CISTPL_FUNCID_MULTI ) || - (link->func_id == CISTPL_FUNCID_SERIAL))) -pcmcia_loop_config (link, serial_check_for_multi, info); + (link->func_id == CISTPL_FUNCID_SERIAL))) { + if (pcmcia_loop_config(link, serial_check_for_multi, info)) + goto failed; + }/* * Apply any multi-port quirk.
drivers/tty/serial/cpm_uart/cpm_uart_core.c +7 -3
@@ -1068,8 +1068,8 @@ static int poll_wait_key(char *obuf, struct uart_cpm_port *pinfo)/* Get the address of the host memory buffer. */ bdp = pinfo->rx_cur; -while (bdp->cbd_sc &BD_SC_EMPTY ) - ; +if (bdp->cbd_sc &BD_SC_EMPTY ) +return NO_POLL_CHAR ;/* If the buffer address is in the CPM DPRAM, don't * convert it.
@@ -1104,7 +1104,11 @@ static int cpm_get_poll_char(struct uart_port *port) poll_chars =0 ; }if (poll_chars <=0 ) { - poll_chars =poll_wait_key (poll_buf, pinfo); +int ret =poll_wait_key (poll_buf, pinfo); + +if (ret ==NO_POLL_CHAR ) +return ret; + poll_chars = ret; pollp = poll_buf; } poll_chars--;
drivers/tty/serial/fsl_lpuart.c +2 -1
@@ -833,7 +833,8 @@ static inline int lpuart_start_rx_dma(struct lpuart_port *sport)struct circ_buf *ring = &sport->rx_ring;int ret, nent;int bits, baud; -struct tty_struct *tty =tty_port_tty_get (&sport->port.state->port); +struct tty_port *port = &sport->port.state->port; +struct tty_struct *tty = port->tty;struct ktermios *termios = &tty->termios; baud =tty_get_baud_rate (tty);
drivers/tty/serial/imx.c +8 -0
@@ -2197,6 +2197,14 @@ static int serial_imx_probe(struct platform_device *pdev) ret);return ret; } + + ret =devm_request_irq (&pdev->dev, rtsirq, imx_rtsint,0 , +dev_name (&pdev->dev), sport); +if (ret) { +dev_err (&pdev->dev,"failed to request rts irq: %d\n" , + ret); +return ret; + } }else { ret =devm_request_irq (&pdev->dev, rxirq, imx_int,0 ,dev_name (&pdev->dev), sport);
drivers/usb/class/cdc-wdm.c +1 -1
@@ -470,7 +470,7 @@ static int service_outstanding_interrupt(struct wdm_device *desc)set_bit (WDM_RESPONDING , &desc->flags);spin_unlock_irq (&desc->iuspin); - rv =usb_submit_urb (desc->response,GFP_ATOMIC ); + rv =usb_submit_urb (desc->response,GFP_KERNEL );spin_lock_irq (&desc->iuspin);if (rv) { dev_err(&desc->intf->dev,
drivers/usb/core/devio.c +21 -3
@@ -1450,10 +1450,13 @@ static int proc_do_submiturb(struct usb_dev_state *ps, struct usbdevfs_urb *uurbstruct async *as =NULL ;struct usb_ctrlrequest *dr =NULL ;unsigned int u, totlen, isofrmlen; -int i, ret, is_in, num_sgs =0 , ifnum =-1 ; +int i, ret, num_sgs =0 , ifnum =-1 ;int number_of_packets =0 ;unsigned int stream_id =0 ;void *buf; +bool is_in; +bool allow_short = false; +bool allow_zero = false;unsigned long mask =USBDEVFS_URB_SHORT_NOT_OK |USBDEVFS_URB_BULK_CONTINUATION | USBDEVFS_URB_NO_FSBR |
@@ -1487,6 +1490,8 @@ static int proc_do_submiturb(struct usb_dev_state *ps, struct usbdevfs_urb *uurb u =0 ;switch (uurb->type) {case USBDEVFS_URB_TYPE_CONTROL : +if (is_in) + allow_short = true;if (!usb_endpoint_xfer_control (&ep->desc))return -EINVAL ;/* min 8 byte setup packet */
@@ -1527,6 +1532,10 @@ static int proc_do_submiturb(struct usb_dev_state *ps, struct usbdevfs_urb *uurbbreak ;case USBDEVFS_URB_TYPE_BULK : +if (!is_in) + allow_zero = true; +else + allow_short = true;switch (usb_endpoint_type (&ep->desc)) {case USB_ENDPOINT_XFER_CONTROL :case USB_ENDPOINT_XFER_ISOC :
@@ -1547,6 +1556,10 @@ static int proc_do_submiturb(struct usb_dev_state *ps, struct usbdevfs_urb *uurbif (!usb_endpoint_xfer_int (&ep->desc))return -EINVAL ; interrupt_urb: +if (!is_in) + allow_zero = true; +else + allow_short = true;break ;case USBDEVFS_URB_TYPE_ISO :
@@ -1691,16 +1704,21 @@ static int proc_do_submiturb(struct usb_dev_state *ps, struct usbdevfs_urb *uurb u = (is_in ?URB_DIR_IN :URB_DIR_OUT );if (uurb->flags &USBDEVFS_URB_ISO_ASAP ) u |=URB_ISO_ASAP ; -if (uurb->flags &USBDEVFS_URB_SHORT_NOT_OK && is_in) +if (allow_short && uurb->flags &USBDEVFS_URB_SHORT_NOT_OK ) u |=URB_SHORT_NOT_OK ;if (uurb->flags &USBDEVFS_URB_NO_FSBR ) u |=URB_NO_FSBR ; -if (uurb->flags &USBDEVFS_URB_ZERO_PACKET ) +if (allow_zero && uurb->flags &USBDEVFS_URB_ZERO_PACKET ) u |=URB_ZERO_PACKET ;if (uurb->flags &USBDEVFS_URB_NO_INTERRUPT ) u |=URB_NO_INTERRUPT ; as->urb->transfer_flags = u; +if (!allow_short && uurb->flags &USBDEVFS_URB_SHORT_NOT_OK ) +dev_warn (&ps->dev->dev,"Requested nonsensical USBDEVFS_URB_SHORT_NOT_OK.\n" ); +if (!allow_zero && uurb->flags &USBDEVFS_URB_ZERO_PACKET ) +dev_warn (&ps->dev->dev,"Requested nonsensical USBDEVFS_URB_ZERO_PACKET.\n" ); + as->urb->transfer_buffer_length = uurb->buffer_length; as->urb->setup_packet = (unsigned char *)dr; dr =NULL ;
drivers/usb/core/driver.c +14 -14
@@ -509,7 +509,6 @@ int usb_driver_claim_interface(struct usb_driver *driver,struct device *dev;struct usb_device *udev;int retval =0 ; -int lpm_disable_error = -ENODEV ;if (!iface)return -ENODEV ;
@@ -530,16 +529,6 @@ int usb_driver_claim_interface(struct usb_driver *driver, iface->condition =USB_INTERFACE_BOUND ; -/* See the comment about disabling LPM in usb_probe_interface(). */ -if (driver->disable_hub_initiated_lpm) { - lpm_disable_error =usb_unlocked_disable_lpm (udev); -if (lpm_disable_error) { -dev_err (&iface->dev,"%s Failed to disable LPM for driver %s\n." , - __func__, driver->name); -return -ENOMEM ; - } - } -/* Claimed interfaces are initially inactive (suspended) and * runtime-PM-enabled, but only if the driver has autosuspend * support. Otherwise they are marked active, to prevent the
@@ -558,9 +547,20 @@ int usb_driver_claim_interface(struct usb_driver *driver,if (device_is_registered (dev)) retval =device_bind_driver (dev); -/* Attempt to re-enable USB3 LPM, if the disable was successful. */ -if (!lpm_disable_error) -usb_unlocked_enable_lpm (udev); +if (retval) { + dev->driver =NULL ; +usb_set_intfdata (iface,NULL ); + iface->needs_remote_wakeup =0 ; + iface->condition =USB_INTERFACE_UNBOUND ; + +/* +* Unbound interfaces are always runtime-PM-disabled +* and runtime-PM-suspended +*/ +if (driver->supports_autosuspend) +pm_runtime_disable (dev); +pm_runtime_set_suspended (dev); + }return retval; }
drivers/usb/core/usb.c +2 -0
@@ -91,6 +91,8 @@ struct usb_host_interface *usb_find_alt_setting(struct usb_interface_cache *intf_cache =NULL ;int i; +if (!config) +return NULL ;for (i =0 ; i < config->desc.bNumInterfaces; i++) {if (config->intf_cache[i]->altsetting[0 ].desc.bInterfaceNumber == iface_num) {
drivers/usb/serial/kobil_sct.c +10 -2
@@ -408,12 +408,20 @@ static int kobil_tiocmget(struct tty_struct *tty) transfer_buffer_length, KOBIL_TIMEOUT); -dev_dbg (&port->dev,"%s - Send get_status_line_state URB returns: %i. Statusline: %02x\n" , - __func__, result, transfer_buffer[0 ]); +dev_dbg (&port->dev,"Send get_status_line_state URB returns: %i\n" , + result); +if (result <1 ) { +if (result >=0 ) + result = -EIO ; + goto out_free; + } + +dev_dbg (&port->dev,"Statusline: %02x\n" , transfer_buffer[0 ]); result =0 ;if ((transfer_buffer[0 ] &SUSBCR_GSL_DSR ) !=0 ) result =TIOCM_DSR ; +out_free:kfree (transfer_buffer);return result; }
drivers/usb/wusbcore/security.c +1 -1
@@ -230,7 +230,7 @@ int wusb_dev_sec_add(struct wusbhc *wusbhc, result =usb_get_descriptor (usb_dev,USB_DT_SECURITY ,0 , secd,sizeof (*secd)); -if (result <sizeof (*secd)) { +if (result < (int )sizeof (*secd)) {dev_err (dev,"Can't read security descriptor or " "not enough data: %d\n" , result); goto out;
drivers/uwb/hwa-rc.c +1 -0
@@ -873,6 +873,7 @@ static int hwarc_probe(struct usb_interface *iface, error_rc_add:usb_put_intf (iface);usb_put_dev (hwarc->usb_dev); +kfree (hwarc); error_alloc:uwb_rc_put (uwb_rc); error_rc_alloc:
fs/ext4/xattr.c +5 -0
@@ -1426,6 +1426,11 @@ static int ext4_xattr_make_inode_space(handle_t *handle, struct inode *inode, last =IFIRST (header);/* Find the entry best suited to be pushed into EA block */ for (; !IS_LAST_ENTRY (last); last =EXT4_XATTR_NEXT (last)) { +/* never move system.data out of the inode */ +if ((last->e_name_len ==4 ) && + (last->e_name_index ==EXT4_XATTR_INDEX_SYSTEM ) && + !memcmp (last->e_name,"data" ,4 )) +continue ; total_size =EXT4_XATTR_SIZE (le32_to_cpu (last->e_value_size)) +EXT4_XATTR_LEN (last->e_name_len);
fs/nfsd/nfs4proc.c +1 -0
@@ -1725,6 +1725,7 @@ nfsd4_proc_compound(struct svc_rqst *rqstp,if (status) { op = &args->ops[0 ]; op->status = status; + resp->opcnt =1 ; goto encode_op; }
include/linux/arm-smccc.h +24 -14
@@ -199,47 +199,57 @@ asmlinkage void __arm_smccc_hvc(unsigned long a0, unsigned long a1,#define __declare_arg_0 (a0, res) \ struct arm_smccc_res *___res = res; \ - register u32 r0 asm("r0") = a0; \ + register unsigned long r0 asm("r0") = (u32)a0; \ register unsigned long r1 asm("r1"); \ register unsigned long r2 asm("r2"); \ register unsigned long r3 asm("r3")#define __declare_arg_1 (a0, a1, res) \ + typeof(a1) __a1 = a1; \ struct arm_smccc_res *___res = res; \ - register u32 r0 asm("r0") = a0; \ - register typeof(a1) r1 asm("r1") = a1; \ + register unsigned long r0 asm("r0") = (u32)a0; \ + register unsigned long r1 asm("r1") = __a1; \ register unsigned long r2 asm("r2"); \ register unsigned long r3 asm("r3")#define __declare_arg_2 (a0, a1, a2, res) \ + typeof(a1) __a1 = a1; \ + typeof(a2) __a2 = a2; \ struct arm_smccc_res *___res = res; \ - register u32 r0 asm("r0") = a0; \ - register typeof(a1) r1 asm("r1") = a1; \ - register typeof(a2) r2 asm("r2") = a2; \ + register unsigned long r0 asm("r0") = (u32)a0; \ + register unsigned long r1 asm("r1") = __a1; \ + register unsigned long r2 asm("r2") = __a2; \ register unsigned long r3 asm("r3")#define __declare_arg_3 (a0, a1, a2, a3, res) \ + typeof(a1) __a1 = a1; \ + typeof(a2) __a2 = a2; \ + typeof(a3) __a3 = a3; \ struct arm_smccc_res *___res = res; \ - register u32 r0 asm("r0") = a0; \ - register typeof(a1) r1 asm("r1") = a1; \ - register typeof(a2) r2 asm("r2") = a2; \ - register typeof(a3) r3 asm("r3") = a3 + register unsigned long r0 asm("r0") = (u32)a0; \ + register unsigned long r1 asm("r1") = __a1; \ + register unsigned long r2 asm("r2") = __a2; \ + register unsigned long r3 asm("r3") = __a3#define __declare_arg_4 (a0, a1, a2, a3, a4, res) \ + typeof(a4) __a4 = a4; \ __declare_arg_3(a0, a1, a2, a3, res); \ - register typeof(a4) r4 asm("r4") = a4 + register unsigned long r4 asm("r4") = __a4#define __declare_arg_5 (a0, a1, a2, a3, a4, a5, res) \ + typeof(a5) __a5 = a5; \ __declare_arg_4(a0, a1, a2, a3, a4, res); \ - register typeof(a5) r5 asm("r5") = a5 + register unsigned long r5 asm("r5") = __a5#define __declare_arg_6 (a0, a1, a2, a3, a4, a5, a6, res) \ + typeof(a6) __a6 = a6; \ __declare_arg_5(a0, a1, a2, a3, a4, a5, res); \ - register typeof(a6) r6 asm("r6") = a6 + register unsigned long r6 asm("r6") = __a6#define __declare_arg_7 (a0, a1, a2, a3, a4, a5, a6, a7, res) \ + typeof(a7) __a7 = a7; \ __declare_arg_6(a0, a1, a2, a3, a4, a5, a6, res); \ - register typeof(a7) r7 asm("r7") = a7 + register unsigned long r7 asm("r7") = __a7#define ___declare_args (count, ...) __declare_arg_ ## count(__VA_ARGS__)#define __declare_args (count, ...) ___declare_args(count, __VA_ARGS__)
include/linux/platform_data/ina2xx.h +1 -1
@@ -1,7 +1,7 @@/* * Driver for Texas Instruments INA219, INA226 power monitor chips * -* Copyright (C) 2012 Lothar Felten <[email protected]> +* Copyright (C) 2012 Lothar Felten <[email protected]> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as
include/linux/power_supply.h +1 -0
@@ -249,6 +249,7 @@ struct power_supply {spinlock_t changed_lock;bool changed;bool initialized; +bool removing;atomic_t use_cnt;#ifdef CONFIG_THERMAL struct thermal_zone_device *tzd;
include/linux/slub_def.h +2 -1
@@ -67,7 +67,8 @@ struct kmem_cache {int size;/* The size of an object including meta data */ int object_size;/* The size of an object without meta data */ int offset;/* Free pointer offset. */ -int cpu_partial;/* Number of per cpu partial objects to keep around */ +/* Number of per cpu partial objects to keep around */ +unsigned int cpu_partial;struct kmem_cache_order_objects oo;/* Allocation and freeing of slabs */
include/media/v4l2-fh.h +4 -0
@@ -42,10 +42,13 @@ struct v4l2_ctrl_handler;* @prio: priority of the file handler, as defined by &enum v4l2_priority * * @wait: event' s wait queue +* @subscribe_lock: serialise changes to the subscribed list; guarantee that +* the add and del event callbacks are orderly called * @subscribed: list of subscribed events * @available: list of events waiting to be dequeued * @navailable: number of available events at @available list * @sequence: event sequence number +* * @m2m_ctx: pointer to &struct v4l2_m2m_ctx */ struct v4l2_fh {
@@ -56,6 +59,7 @@ struct v4l2_fh {/* Events */ wait_queue_head_t wait; +struct mutex subscribe_lock;struct list_head subscribed;struct list_head available;unsigned int navailable;
kernel/module.c +5 -1
@@ -4011,7 +4011,7 @@ static unsigned long mod_find_symname(struct module *mod, const char *name)for (i =0 ; i < kallsyms->num_symtab; i++)if (strcmp (name,symname (kallsyms, i)) ==0 && - kallsyms->symtab[i].st_info !='U' ) + kallsyms->symtab[i].st_shndx !=SHN_UNDEF )return kallsyms->symtab[i].st_value;return 0 ; }
@@ -4057,6 +4057,10 @@ int module_kallsyms_on_each_symbol(int (*fn)(void *, const char *,if (mod->state ==MODULE_STATE_UNFORMED )continue ;for (i =0 ; i < kallsyms->num_symtab; i++) { + +if (kallsyms->symtab[i].st_shndx ==SHN_UNDEF ) +continue ; + ret =fn (data,symname (kallsyms, i), mod, kallsyms->symtab[i].st_value);if (ret !=0 )
kernel/time/alarmtimer.c +2 -1
@@ -786,7 +786,8 @@ static int alarm_timer_nsleep(const clockid_t which_clock, int flags,/* Convert (if necessary) to absolute time */ if (flags !=TIMER_ABSTIME ) {ktime_t now = alarm_bases[type].gettime (); - exp =ktime_add (now, exp); + + exp =ktime_add_safe (now, exp); }if (alarmtimer_do_nsleep (&alarm, exp))
lib/klist.c +6 -4
@@ -336,8 +336,9 @@ struct klist_node *klist_prev(struct klist_iter *i)void (*put)(struct klist_node *) = i->i_klist->put;struct klist_node *last = i->i_cur;struct klist_node *prev; +unsigned long flags; -spin_lock (&i->i_klist->k_lock); +spin_lock_irqsave (&i->i_klist->k_lock, flags);if (last) { prev =to_klist_node (last->n_node.prev);
@@ -356,7 +357,7 @@ struct klist_node *klist_prev(struct klist_iter *i) prev =to_klist_node (prev->n_node.prev); } -spin_unlock (&i->i_klist->k_lock); +spin_unlock_irqrestore (&i->i_klist->k_lock, flags);if (put && last)put (last);
@@ -377,8 +378,9 @@ struct klist_node *klist_next(struct klist_iter *i)void (*put)(struct klist_node *) = i->i_klist->put;struct klist_node *last = i->i_cur;struct klist_node *next; +unsigned long flags; -spin_lock (&i->i_klist->k_lock); +spin_lock_irqsave (&i->i_klist->k_lock, flags);if (last) { next =to_klist_node (last->n_node.next);
@@ -397,7 +399,7 @@ struct klist_node *klist_next(struct klist_iter *i) next =to_klist_node (next->n_node.next); } -spin_unlock (&i->i_klist->k_lock); +spin_unlock_irqrestore (&i->i_klist->k_lock, flags);if (put && last)put (last);
mm/slub.c +3 -3
@@ -1793,7 +1793,7 @@ static void *get_partial_node(struct kmem_cache *s, struct kmem_cache_node *n, {struct page *page, *page2;void *object =NULL ; -int available =0 ; +unsigned int available =0 ;int objects;/*
@@ -4870,10 +4870,10 @@ static ssize_t cpu_partial_show(struct kmem_cache *s, char *buf)static ssize_t cpu_partial_store (struct kmem_cache *s,const char *buf,size_t length) { -unsigned long objects; +unsigned int objects;int err; - err =kstrtoul (buf,10 , &objects); + err =kstrtouint (buf,10 , &objects);if (err)return err;if (objects && !kmem_cache_has_cpu_partial (s))
net/6lowpan/iphc.c +1 -0
@@ -745,6 +745,7 @@ int lowpan_header_decompress(struct sk_buff *skb, const struct net_device *dev, hdr.hop_limit, &hdr.daddr);skb_push (skb,sizeof (hdr)); +skb_reset_mac_header (skb);skb_reset_network_header (skb);skb_copy_to_linear_data (skb, &hdr,sizeof (hdr));
sound/aoa/core/gpio-feature.c +3 -1
@@ -88,8 +88,10 @@ static struct device_node *get_gpio(char *name, } reg =of_get_property (np,"reg" ,NULL ); -if (!reg) +if (!reg) { +of_node_put (np);return NULL ; + } *gpioptr = *reg;
sound/pci/hda/hda_intel.c +2 -1
@@ -2349,7 +2349,8 @@ static const struct pci_device_id azx_ids[] = { .driver_data = AZX_DRIVER_GENERIC | AZX_DCAPS_PRESET_ATI_SB },/* AMD Raven */ { PCI_DEVICE(0x1022, 0x15e3), - .driver_data = AZX_DRIVER_GENERIC | AZX_DCAPS_PRESET_ATI_SB }, + .driver_data =AZX_DRIVER_GENERIC |AZX_DCAPS_PRESET_ATI_SB | + AZX_DCAPS_PM_RUNTIME }, /* ATI HDMI */ { PCI_DEVICE(0x1002, 0x0002), .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS },
sound/soc/soc-dapm.c +7 -0
@@ -3913,6 +3913,13 @@ int snd_soc_dapm_link_dai_widgets(struct snd_soc_card *card)continue ; } +/* let users know there is no DAI to link */ +if (!dai_w->priv) { +dev_dbg (card->dev,"dai widget %s has no DAI\n" , + dai_w->name); +continue ; + } + dai = dai_w->priv;/* ...find all widgets with the same stream and link them */