Linux 4.7.5
Greg KH
maintainerI'm announcing the release of the 4.7.5 kernel.
All users of the 4.7 kernel series must upgrade.
The updated 4.7.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.7.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/devicetree/bindings/iio/adc/rockchip-saradc.txt | 7 Documentation/mic/mpssd/mpssd.c | 4 Makefile | 2 arch/alpha/include/asm/uaccess.h | 19 - arch/arc/include/asm/uaccess.h | 11 arch/arm/boot/dts/armada-388-clearfog.dts | 8 arch/arm/boot/dts/imx6qdl.dtsi | 2 arch/arm/boot/dts/kirkwood-ib62x0.dts | 2 arch/arm/boot/dts/kirkwood-openrd.dtsi | 4 arch/arm/boot/dts/omap3-overo-base.dtsi | 4 arch/arm/boot/dts/omap3-overo-chestnut43-common.dtsi | 2 arch/arm/boot/dts/omap3-overo-tobi-common.dtsi | 2 arch/arm/boot/dts/omap3-overo-tobiduo-common.dtsi | 3 arch/arm/boot/dts/rk3066a.dtsi | 2 arch/arm/boot/dts/rk3288.dtsi | 2 arch/arm/boot/dts/rk3xxx.dtsi | 2 arch/arm/boot/dts/stih407-family.dtsi | 10 arch/arm/boot/dts/stih410.dtsi | 12 arch/arm/kvm/arm.c | 2 arch/arm/kvm/mmu.c | 1 arch/arm/mach-imx/pm-imx6.c | 4 arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c | 1 arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 12 arch/arm/mach-omap2/prcm43xx.h | 1 arch/arm/mach-pxa/idp.c | 3 arch/arm/mach-pxa/xcep.c | 3 arch/arm/mach-realview/core.c | 3 arch/arm/mach-sa1100/pleb.c | 2 arch/arm64/include/asm/spinlock.h | 10 arch/avr32/include/asm/uaccess.h | 11 arch/avr32/kernel/avr32_ksyms.c | 2 arch/avr32/lib/copy_user.S | 8 arch/blackfin/include/asm/uaccess.h | 9 arch/blackfin/mach-bf561/boards/cm_bf561.c | 3 arch/blackfin/mach-bf561/boards/ezkit.c | 3 arch/cris/include/asm/uaccess.h | 71 +--- arch/frv/include/asm/uaccess.h | 12 arch/hexagon/include/asm/uaccess.h | 3 arch/ia64/include/asm/uaccess.h | 20 - arch/m32r/include/asm/uaccess.h | 2 arch/metag/include/asm/uaccess.h | 3 arch/microblaze/include/asm/uaccess.h | 11 arch/mips/include/asm/uaccess.h | 3 arch/mips/kvm/tlb.c | 2 arch/mn10300/include/asm/uaccess.h | 1 arch/mn10300/lib/usercopy.c | 4 arch/nios2/include/asm/uaccess.h | 13 arch/openrisc/include/asm/uaccess.h | 35 -- arch/parisc/include/asm/uaccess.h | 6 arch/powerpc/include/asm/uaccess.h | 21 - arch/powerpc/kernel/entry_64.S | 12 arch/powerpc/lib/checksum_32.S | 8 arch/powerpc/mm/slb_low.S | 7 arch/powerpc/platforms/powernv/opal-dump.c | 7 arch/powerpc/platforms/powernv/opal-elog.c | 7 arch/powerpc/platforms/powernv/pci-ioda.c | 3 arch/powerpc/sysdev/cpm1.c | 6 arch/powerpc/sysdev/cpm_common.c | 3 arch/s390/include/asm/uaccess.h | 8 arch/s390/kvm/kvm-s390.c | 10 arch/score/include/asm/uaccess.h | 46 +- arch/sh/include/asm/cmpxchg-xchg.h | 2 arch/sh/include/asm/uaccess.h | 5 arch/sh/include/asm/uaccess_64.h | 1 arch/sparc/include/asm/uaccess_32.h | 4 arch/x86/boot/compressed/eboot.c | 134 ++++--- arch/x86/configs/tiny.config | 2 arch/x86/events/amd/core.c | 4 arch/x86/events/intel/cqm.c | 9 arch/x86/events/intel/ds.c | 19 - arch/x86/events/intel/pt.c | 18 - arch/x86/include/asm/uaccess.h | 6 arch/x86/kernel/cpu/amd.c | 12 arch/x86/kernel/paravirt.c | 4 arch/x86/kvm/ioapic.c | 8 arch/x86/kvm/pmu_amd.c | 4 arch/x86/mm/pat.c | 17 - crypto/cryptd.c | 9 drivers/ata/libahci.c | 2 drivers/bus/arm-ccn.c | 27 + drivers/clocksource/sun4i_timer.c | 9 drivers/firmware/efi/libstub/efi-stub-helper.c | 169 ++++++++-- drivers/firmware/efi/libstub/fdt.c | 54 ++- drivers/firmware/efi/libstub/random.c | 12 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 10 drivers/gpu/drm/drm_ioc32.c | 4 drivers/gpu/drm/i915/i915_debugfs.c | 3 drivers/gpu/drm/i915/intel_opregion.c | 27 + drivers/gpu/drm/msm/msm_drv.h | 6 drivers/gpu/drm/msm/msm_gem.c | 9 drivers/gpu/drm/msm/msm_gem_submit.c | 2 drivers/iio/accel/bmc150-accel-core.c | 11 drivers/iio/accel/kxsd9.c | 2 drivers/iio/adc/Kconfig | 1 drivers/iio/adc/ad799x.c | 1 drivers/iio/adc/at91_adc.c | 4 drivers/iio/adc/rockchip_saradc.c | 30 + drivers/iio/adc/ti-ads1015.c | 3 drivers/iio/adc/ti_am335x_adc.c | 16 drivers/iio/common/hid-sensors/hid-sensor-attributes.c | 4 drivers/iio/humidity/am2315.c | 2 drivers/iio/humidity/hdc100x.c | 27 - drivers/iio/industrialio-buffer.c | 4 drivers/iio/industrialio-core.c | 5 drivers/iio/proximity/as3935.c | 2 drivers/infiniband/core/uverbs.h | 1 drivers/infiniband/core/uverbs_main.c | 37 +- drivers/infiniband/hw/hfi1/debugfs.c | 14 drivers/infiniband/hw/hfi1/platform.c | 6 drivers/infiniband/hw/hfi1/qp.c | 4 drivers/infiniband/hw/qib/qib_debugfs.c | 12 drivers/infiniband/hw/qib/qib_qp.c | 4 drivers/iommu/dmar.c | 3 drivers/iommu/intel-iommu.c | 3 drivers/irqchip/irq-atmel-aic.c | 5 drivers/irqchip/irq-atmel-aic5.c | 5 drivers/md/dm-crypt.c | 9 drivers/md/dm-flakey.c | 27 - drivers/md/dm-log-writes.c | 6 drivers/md/md.c | 12 drivers/memory/omap-gpmc.c | 21 - drivers/mmc/host/sdhci-st.c | 15 drivers/net/bonding/bond_main.c | 7 drivers/net/dsa/bcm_sf2.h | 2 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 4 drivers/net/ethernet/cadence/macb.h | 2 drivers/net/ethernet/cavium/thunder/nic_reg.h | 1 drivers/net/ethernet/cavium/thunder/nicvf_ethtool.c | 5 drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 85 +++-- drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 22 - drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 2 drivers/net/ethernet/mellanox/mlx5/core/main.c | 59 +-- drivers/net/ethernet/smsc/smc91x.c | 7 drivers/net/ethernet/smsc/smc91x.h | 65 ++- drivers/net/phy/phy.c | 6 drivers/net/tun.c | 6 drivers/net/wireless/ath/ath9k/main.c | 17 - drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 2 drivers/net/wireless/intel/iwlegacy/3945.c | 3 drivers/pinctrl/pinctrl-pistachio.c | 12 drivers/pinctrl/sunxi/pinctrl-sun8i-a23.c | 4 drivers/pinctrl/sunxi/pinctrl-sun8i-a33.c | 4 drivers/rapidio/devices/tsi721.c | 2 drivers/tty/serial/8250/8250_mid.c | 3 drivers/tty/serial/8250/8250_pci.c | 139 ++++++++ drivers/usb/chipidea/udc.c | 9 drivers/usb/core/config.c | 28 + drivers/usb/gadget/udc/renesas_usb3.c | 2 drivers/usb/host/xhci-ring.c | 6 drivers/usb/renesas_usbhs/mod.c | 11 drivers/usb/serial/usb-serial-simple.c | 3 fs/btrfs/tree-log.c | 1 fs/devpts/inode.c | 3 fs/ext4/ioctl.c | 6 fs/fuse/file.c | 7 fs/kernfs/file.c | 28 + fs/nfs/callback.c | 1 fs/nfs/callback_proc.c | 5 fs/nfs/flexfilelayout/flexfilelayout.c | 37 +- fs/nfs/flexfilelayout/flexfilelayoutdev.c | 19 - fs/nfs/nfs4proc.c | 12 fs/nfs/nfs4session.c | 33 + fs/nfs/nfs4session.h | 1 fs/nfs/pnfs.c | 4 fs/nfsd/nfs4state.c | 40 +- fs/proc/base.c | 7 include/asm-generic/uaccess.h | 20 - include/linux/efi.h | 28 + include/linux/iio/sw_trigger.h | 2 include/linux/irq.h | 10 include/linux/mempolicy.h | 4 include/linux/mfd/ti_am335x_tscadc.h | 8 include/linux/mm.h | 1 include/linux/netdevice.h | 1 include/linux/smc91x.h | 10 include/linux/uio.h | 2 include/net/af_unix.h | 2 include/net/tcp.h | 2 kernel/audit_watch.c | 8 kernel/bpf/verifier.c | 3 kernel/configs/tiny.config | 8 kernel/cpuset.c | 15 kernel/exit.c | 7 kernel/fork.c | 23 + kernel/irq/msi.c | 1 kernel/kexec_file.c | 3 kernel/memremap.c | 9 kernel/sched/core.c | 22 + lib/iov_iter.c | 24 - mm/mempolicy.c | 17 + mm/page_alloc.c | 50 -- net/bridge/br_multicast.c | 2 net/core/dev.c | 16 net/core/filter.c | 70 +--- net/ipv4/fib_trie.c | 8 net/ipv4/ip_vti.c | 31 + net/ipv4/tcp_fastopen.c | 1 net/ipv4/tcp_ipv4.c | 8 net/ipv4/tcp_yeah.c | 2 net/ipv4/udp.c | 12 net/ipv6/addrconf.c | 6 net/ipv6/ip6_tunnel.c | 2 net/ipv6/ping.c | 9 net/ipv6/tcp_ipv6.c | 8 net/irda/iriap.c | 8 net/kcm/kcmsock.c | 3 net/sched/act_ife.c | 18 - net/sctp/proc.c | 1 net/sctp/sctp_diag.c | 6 net/sunrpc/auth_gss/svcauth_gss.c | 5 net/tipc/socket.c | 3 net/unix/af_unix.c | 111 ++---- net/wireless/wext-core.c | 25 - 213 files changed, 1774 insertions(+), 971 deletions(-)
Al Viro (29):
fix iov_iter_fault_in_readable()
microblaze: fix __get_user()
avr32: fix copy_from_user()
microblaze: fix copy_from_user()
fix minor infoleak in get_user_ex()
mn10300: failing __get_user() and get_user() should zero
m32r: fix __get_user()
sh64: failing __get_user() should zero
nios2: fix __get_user()
score: fix __get_user/get_user
s390: get_user() should zero on failure
asm-generic: make get_user() clear the destination on errors
frv: fix clear_user()
cris: buggered copy_from_user/copy_to_user/clear_user
blackfin: fix copy_from_user()
score: fix copy_from_user() and friends
sh: fix copy_from_user()
hexagon: fix strncpy_from_user() error return
mips: copy_from_user() must zero the destination on access_ok() failure
asm-generic: make copy_from_user() zero the destination properly
alpha: fix copy_from_user()
metag: copy_from_user() should zero the destination on access_ok() failure
parisc: fix copy_from_user()
openrisc: fix copy_from_user()
nios2: copy_from_user() should zero the tail of destination
mn10300: copy_from_user() should zero on access_ok() failure...
sparc32: fix copy_from_user()
ppc32: fix copy_from_user()
ia64: copy_from_user() should zero the destination on access_ok() failure
Alan Stern (1):
USB: change bInterval default to 10 ms
Alexander Shishkin (3):
perf/x86/intel/pt: Fix an off-by-one in address filter configuration perf/x86/intel/pt: Fix kernel address filter's offset validation perf/x86/intel/pt: Do validate the size of a kernel address filter
Alexandre Bounine (1):
rapidio/tsi721: fix incorrect detection of address translation condition
Alison Schofield (3):
iio: proximity: as3935: set up buffer timestamps for non-zero values
iio: humidity: am2315: set up buffer timestamps for non-zero values
iio: humidity: hdc100x: fix sensor data reads of temp and humidity
Anders Darander (1):
iio: adc: at91: unbreak channel adc channel 3
Andy Shevchenko (1):
serial: 8250_mid: fix divide error bug if baud rate is 0
Anson Huang (1):
ARM: imx6: add missing BM_CLPCR_BYPASS_PMIC_READY setting for imx6sx
Ard Biesheuvel (1):
crypto: cryptd - initialize child shash_desc on import
Arend Van Spriel (1):
brcmfmac: avoid potential stack overflow in brcmf_cfg80211_start_ap()
Arnd Bergmann (2):
kconfig: tinyconfig: provide whole choice blocks to avoid warnings
iwlegacy: avoid warning about missing braces
Artem Germanov (1):
tcp: cwnd does not increase in TCP YeAH
Balbir Singh (1):
sched/core: Fix a race between try_to_wake_up() and a woken up task
Boris Brezillon (2):
genirq: Provide irq_gc_{lock_irqsave,unlock_irqrestore}() helpers irqchip/atmel-aic: Fix potential deadlock in ->xlate()
Caesar Wang (2):
iio: adc: rockchip_saradc: reset saradc controller before programming it
arm: dts: rockchip: add reset node for the exist saradc SoCs
Chen-Yu Tsai (1):
clocksource/drivers/sun4i: Clear interrupts after stopping timer in probe function
Chris Mason (1):
Btrfs: remove root_log_ctx from ctx list before btrfs_sync_log returns
Christoph Hellwig (1):
ahci: disable correct irq for dummy ports
Christophe Leroy (3):
powerpc: sysdev: cpm: fix gpio save_regs functions powerpc/32: Fix csum_partial_copy_generic() powerpc/32: Fix again csum_partial_copy_generic()
Chuck Lever (2):
nfsd: Close race between nfsd4_release_lockowner and nfsd4_lock
svcauth_gss: Revert 64c59a3726f2 ("Remove unnecessary allocation")
Clemens Gruber (1):
usb: chipidea: udc: fix NULL ptr dereference in isr_setup_status_phase
Colin Ian King (1):
iio: ensure ret is initialized to zero before entering do loop
Dan Williams (1):
mm: fix cache mode of dax pmd mappings
Daniel Borkmann (1):
bpf: fix write helpers with regards to non-linear parts
Daniele Palmas (1):
USB: serial: simple: add support for another Infineon flashloader
Dave Jones (1):
ipv6: release dst in ping_v6_sendmsg
David Daney (1):
net: thunderx: Fix OOPs with ethtool --register-dump
David Forster (1):
ipv4: panic in leaf_walk_rcu due to stale node pointer
David Hildenbrand (1):
KVM: s390: don't use current->thread.fpu.* when accessing registers
David Rientjes (1):
mm, mempolicy: task->mempolicy must be NULL before dropping final reference
Davide Caratti (1):
bridge: re-introduce 'fix parsing of MLDv2 reports'
Easwar Hariharan (1):
IB/hfi1: Reset QSFP on every run through channel tuning
Eli Cooper (1):
ipv6: Don't unset flowi6_proto in ipxip6_tnl_xmit()
Emanuel Czirai (1):
x86/AMD: Apply erratum 665 on machines without a BIOS fix
Eric Biggers (2):
fscrypto: require write access to mount to set encryption policy dm crypt: fix free of bad values after tfm allocation failure
Eric Dumazet (4):
tcp: fix use after free in tcp_xmit_retransmit_queue()
udp: fix poll() issue with zero sized packets
tcp: properly scale window in tcp_v[46]_reqsk_send_ack()
tcp: fastopen: avoid negative sk_forward_alloc
Fabio Estevam (1):
ARM: dts: imx6qdl: Fix SPDIF regression
Felix Fietkau (1):
ath9k: fix using sta->drv_priv before initializing it
Florian Fainelli (1):
net: dsa: bcm_sf2: Fix race condition while unmasking interrupts
Gal Pressman (1):
net/mlx5e: Fix parsing of vlan packets when updating lro header
Gavin Shan (1):
powerpc/powernv: Fix corrupted PE allocation bitmap on releasing PE
Giedrius Statkevičius (1):
ath9k: bring back direction setting in ath9k_{start_stop}Giorgio Dal Molin (1):
iio:ti-ads1015: fix a wrong pointer definition.
Greg Kroah-Hartman (1):
Linux 4.7.5
Gregor Boirie (1):
iio:core: fix IIO_VAL_FRACTIONAL sign handling
Gregory CLEMENT (1):
ARM: dts: kirkwood: Fix PCIe label on OpenRD
Guenter Roeck (2):
avr32: fix 'undefined reference to `___copy_from_user'
openrisc: fix the fix of copy_from_user()
Guoqing Jiang (1):
md-cluster: make md-cluster also can work when compiled into kernel
Hadar Hen Zion (1):
net/mlx5e: Use correct flow dissector key on flower offloading
Harini Katakam (1):
net: macb: Correct CAPS mask
Icenowy Zheng (1):
pinctrl: sunxi: fix uart1 CTS/RTS pins at PG on A23/A33
Jakub Kicinski (1):
bpf: fix method of PTR_TO_PACKET reg id generation
Jamal Hadi Salim (1):
net sched: fix encoding to use real length
James Hartley (1):
pinctrl: pistachio: fix mfio pll_lock pinmux
James Hogan (1):
MIPS: KVM: Check for pfn noslot case
Jan Beulich (1):
efi: Make for_each_efi_memory_desc_in_map() cope with running on Xen
Jan Leupold (1):
drm: atmel-hlcdc: Fix vertical scaling
Jason Gunthorpe (1):
IB/uverbs: Fix race between uverbs_close and remove_one
Jeffrey Hugo (4):
efi/libstub: Allocate headspace in efi_get_memory_map() efi/libstub: Introduce ExitBootServices helper efi/libstub: Use efi_exit_boot_services() in FDT x86/efi: Use efi_exit_boot_services()
Jimi Damon (1):
serial: 8250: added acces i/o products quad and octal serial cards
Jiri Olsa (1):
perf/x86/intel/cqm: Check cqm/mbm enabled state in event init
Johan Hovold (3):
ARM: dts: overo: fix gpmc nand cs0 range
ARM: dts: overo: fix gpmc nand on boards with ethernet
memory: omap-gpmc: allow probe of child nodes to fail
Johannes Berg (1):
Revert "wext: Fix 32 bit iwpriv compatibility issue with 64 bit Kernel"
Keerthy (1):
ARM: AM43XX: hwmod: Fix RSTST register offset for pruss
Kristian H. Kristensen (1):
drm: Only use compat ioctl for addfb2 on X86/IA64
Kweh, Hock Leong (1):
iio: fix pressure data output unit in hid-sensor-attributes
Lance Richardson (2):
vti: flush x-netns xfrm cache when vti interface is removed
sctp: fix overrun in sctp_diag_dump_one()
Lars-Peter Clausen (2):
iio: sw-trigger: Fix config group initialization
iio: ad799x: Fix buffered capture for ad7991/ad7995/ad7999
Lee Jones (3):
ARM: dts: STiH410: Handle interconnect clock required by EHCI/OHCI (USB)
ARM: dts: STiH407-family: Provide interconnect clock for consumption in ST SDHCI
mmc: sdhci-st: Handle interconnect clock
Linus Torvalds (4):
Revert "af_unix: Fix splice-bind deadlock"
af_unix: split 'u->readlock' into two: 'iolock' and 'bindlock'
devpts: return NULL pts 'priv' entry for non-devpts nodes Add braces to avoid "ambiguous ‘else’" compiler warnings
Linus Walleij (2):
iio: accel: kxsd9: Fix raw read return
iio: accel: kxsd9: Fix scaling bug
Mahesh Bandewar (1):
bonding: Fix bonding crash
Mateusz Guzik (2):
mm: introduce get_task_exe_file
audit: fix exe_file access in audit_exe_compare
Mathias Nyman (1):
xhci: fix null pointer dereference in stop command timeout function
Matt Fleming (1):
perf/x86/amd: Make HW_CACHE_REFERENCES and HW_CACHE_MISSES measure L2
Michael Chan (1):
bnxt_en: Fix TX push operation on ARM64.
Michal Hocko (1):
mm, oom: prevent premature OOM killer invocation for high order request
Mike Danese (1):
mpssd: fix buffer overflow warning
Mike Manning (1):
net: ipv6: Do not keep IPv6 addresses when IPv6 is disabled
Mike Marciniszyn (1):
IB/hfi1,IB/qib: Fix qp_stats sleep with rcu read lock held
Mike Snitzer (1):
dm flakey: fix reads to be issued if drop_writes configured
Miklos Szeredi (1):
fuse: direct-io: don't dirty ITER_BVEC pages
Mikulas Patocka (2):
dm log writes: move IO accounting earlier to fix error path dm crypt: fix error with too large bios
Mohamad Haj Yahia (1):
net/mlx5: Fix pci error recovery flow
Mukesh Ojha (1):
powerpc/powernv : Drop reference added by kset_find_obj()
Nicholas Piggin (1):
powerpc/tm: do not use r13 for tabort_syscall
Olof Johansson (1):
iio: accel: bmc150: reset chip at init time
Pan Xinhui (1):
sh: cmpxchg: fix a bit shift bug in big_endian os
Paolo Bonzini (1):
kvm: x86: correctly reset dest_map->vector when restoring LAPIC state
Paul Blakey (1):
net/mlx5: Added missing check of msg length in verifying its signature
Paul Mackerras (1):
powerpc/mm: Don't alias user region to other regions below PAGE_OFFSET
Pawel Moll (3):
bus: arm-ccn: Fix PMU handling of MN
bus: arm-ccn: Do not attempt to configure XPs for cycle counter
bus: arm-ccn: Fix XP watchpoint settings bitmask
Peter Chen (1):
ARM: imx6: add missing BM_CLPCR_BYP_MMDC_CH0_LPM_HS setting for imx6ul
Peter Zijlstra (1):
perf/x86/intel: Fix PEBSv3 record drain
Rob Clark (1):
drm/msm: protect against faults from copy_from_user() in submit ioctl
Russell King (2):
net: smc91x: fix SMC accesses
ARM: dts: armada-388-clearfog: number LAN ports properly
Sebastian Reichel (1):
ARM: OMAP3: hwmod data: Add sysc information for DSI
Simon Baatz (1):
ARM: kirkwood: ib62x0: fix size of u-boot environment partition
Soheil Hassas Yeganeh (1):
tun: fix transmit timestamp support
Steven Rostedt (1):
x86/paravirt: Do not trace _paravirt_ident_*() functions
Suzuki K Poulose (1):
kvm-arm: Unmap shadow pagetables properly
Tejun Heo (1):
kernfs: don't depend on d_find_any_alias() when generating notifications
Thiago Jung Bauermann (1):
kexec: fix double-free when failing to relocate the purgatory
Thomas Gleixner (1):
genirq/msi: Fix broken debug output
Trond Myklebust (6):
pNFS/flexfiles: Fix an Oopsable condition when connection to the DS fails
pNFS: The client must not do I/O to the DS if it's lease has expired NFSv4.1: Fix Oopsable condition in server callback races NFSv4.x: Fix a refcount leak in nfs_callback_up_net
pNFS: Ensure LAYOUTGET and LAYOUTRETURN are properly serialised NFSv4.1: Fix the CREATE_SESSION slot number accounting
Vegard Nossum (3):
net/irda: handle iriap_register_lsap() allocation failure net/sctp: always initialise sctp_ht_iter::start_fail
tipc: fix NULL pointer dereference in shutdown()
Vignesh R (2):
iio: adc: ti_am335x_adc: Protect FIFO1 from concurrent access
iio: adc: ti_am335x_adc: Increase timeout value waiting for ADC sample
Ville Syrjälä (1):
drm/i915: Ignore OpRegion panel type except on select machines
Vineet Gupta (1):
ARC: uaccess: get_user to zero out dest in cause of fault
Vladimir Zapolskiy (1):
dm log writes: fix check of kthread_run() return value
WANG Cong (1):
kcm: fix a socket double free
Wei Yongjun (1):
ipv6: addrconf: fix dev refcont leak when DAD failed
Will Deacon (1):
arm64: spinlocks: implement smp_mb__before_spinlock() as smp_mb()
Xander Huff (1):
Revert "phy: IRQ cannot be shared"
Yoshihiro Shimoda (2):
usb: gadget: udc: renesas-usb3: clear VBOUT bit in DRD_CON
usb: renesas_usbhs: fix clearing the {BRDY,BEMP}STS condition
Zefan Li (1):
cpuset: make sure new tasks conform to the current config of the cpuset
Greg KH
maintainerDocumentation/devicetree/bindings/iio/adc/rockchip-saradc.txt +7 -0
@@ -16,6 +16,11 @@ Required properties: - vref-supply: The regulator supply ADC reference voltage. - #io-channel-cells: Should be 1, see ../iio-bindings.txt +Optional properties: +- resets: Must contain an entry for each entry in reset-names if need support + this option. See ../reset/reset.txt for details. +- reset-names: Must include the name "saradc-apb". + Example: saradc: saradc@2006c000 { compatible = "rockchip,saradc";
@@ -23,6 +28,8 @@ Example: interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>; clocks = <&cru SCLK_SARADC>, <&cru PCLK_SARADC>; clock-names = "saradc", "apb_pclk"; + resets = <&cru SRST_SARADC>; + reset-names = "saradc-apb"; #io-channel-cells = <1>; vref-supply = <&vcc18>; };
Documentation/mic/mpssd/mpssd.c +2 -2
@@ -1538,9 +1538,9 @@ set_cmdline(struct mic_info *mic) len =snprintf (buffer,PATH_MAX ,"clocksource=tsc highres=off nohz=off " ); - len +=snprintf (buffer + len,PATH_MAX , + len +=snprintf (buffer + len,PATH_MAX - len,"cpufreq_on;corec6_off;pc3_off;pc6_off " ); - len +=snprintf (buffer + len,PATH_MAX , + len +=snprintf (buffer + len,PATH_MAX - len,"ifcfg=static;address,172.31.%d.1;netmask,255.255.255.0" , mic->id +1 );
Makefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 7 -SUBLEVEL = 4 +SUBLEVEL = 5 EXTRAVERSION = NAME = Psychotic Stoned Sheep
arch/alpha/include/asm/uaccess.h +8 -11
@@ -371,14 +371,6 @@ __copy_tofrom_user_nocheck(void *to, const void *from, long len)return __cu_len; } -extern inline long -__copy_tofrom_user (void *to,const void *from,long len,const void __user *validate) -{ -if (__access_ok ((unsigned long )validate, len,get_fs ())) - len =__copy_tofrom_user_nocheck (to, from, len); -return len; -} -#define __copy_to_user (to, from, n) \ ({ \ __chk_user_ptr(to); \
@@ -393,17 +385,22 @@ __copy_tofrom_user(void *to, const void *from, long len, const void __user *vali#define __copy_to_user_inatomic __copy_to_user#define __copy_from_user_inatomic __copy_from_user -extern inline long copy_to_user (void __user *to,const void *from,long n) { -return __copy_tofrom_user ((__force void *)to, from, n, to); +if (likely (__access_ok ((unsigned long )to, n,get_fs ()))) + n =__copy_tofrom_user_nocheck ((__force void *)to, from, n); +return n; }extern inline long copy_from_user (void *to,const void __user *from,long n) { -return __copy_tofrom_user (to, (__force void *)from, n, from); +if (likely (__access_ok ((unsigned long )from, n,get_fs ()))) + n =__copy_tofrom_user_nocheck (to, (__force void *)from, n); +else +memset (to,0 , n); +return n; }extern void __do_clear_user (void );
arch/arc/include/asm/uaccess.h +9 -2
@@ -83,7 +83,10 @@"2: ;nop\n" \" .section .fixup, \"ax\"\n" \" .align 4\n" \ -"3: mov %0, %3\n" \ +"3: # return -EFAULT\n" \ +" mov %0, %3\n" \ +" # zero out dst ptr\n" \ +" mov %1, 0\n" \" j 2b\n" \" .previous\n" \" .section __ex_table, \"a\"\n" \
@@ -101,7 +104,11 @@"2: ;nop\n" \" .section .fixup, \"ax\"\n" \" .align 4\n" \ -"3: mov %0, %3\n" \ +"3: # return -EFAULT\n" \ +" mov %0, %3\n" \ +" # zero out dst ptr\n" \ +" mov %1, 0\n" \ +" mov %R1, 0\n" \" j 2b\n" \" .previous\n" \" .section __ex_table, \"a\"\n" \
arch/arm/boot/dts/armada-388-clearfog.dts +4 -4
@@ -406,12 +406,12 @@ port@0 { reg = <0>; - label = "lan1"; + label = "lan5"; }; port@1 { reg = <1>; - label = "lan2"; + label = "lan4"; }; port@2 {
@@ -421,12 +421,12 @@ port@3 { reg = <3>; - label = "lan4"; + label = "lan2"; }; port@4 { reg = <4>; - label = "lan5"; + label = "lan1"; }; port@5 {
arch/arm/boot/dts/imx6qdl.dtsi +1 -1
@@ -242,7 +242,7 @@ clocks = <&clks IMX6QDL_CLK_SPDIF_GCLK>, <&clks IMX6QDL_CLK_OSC>, <&clks IMX6QDL_CLK_SPDIF>, <&clks IMX6QDL_CLK_ASRC>, <&clks IMX6QDL_CLK_DUMMY>, <&clks IMX6QDL_CLK_ESAI_EXTAL>, - <&clks IMX6QDL_CLK_IPG>, <&clks IMX6QDL_CLK_MLB>, + <&clks IMX6QDL_CLK_IPG>, <&clks IMX6QDL_CLK_DUMMY>, <&clks IMX6QDL_CLK_DUMMY>, <&clks IMX6QDL_CLK_SPBA>; clock-names = "core", "rxtx0", "rxtx1", "rxtx2",
arch/arm/boot/dts/kirkwood-ib62x0.dts +1 -1
@@ -113,7 +113,7 @@ partition@e0000 { label = "u-boot environment"; - reg = <0xe0000 0x100000>; + reg = <0xe0000 0x20000>; }; partition@100000 {
arch/arm/boot/dts/kirkwood-openrd.dtsi +4 -0
@@ -116,6 +116,10 @@ }; }; +&pciec { + status = "okay"; +}; + &pcie0 { status = "okay"; };
arch/arm/boot/dts/omap3-overo-base.dtsi +3 -1
@@ -223,7 +223,9 @@ }; &gpmc { - ranges = <0 0 0x00000000 0x20000000>; + ranges = <0 0 0x30000000 0x1000000>, /* CS0 */ + <4 0 0x2b000000 0x1000000>, /* CS4 */ + <5 0 0x2c000000 0x1000000>; /* CS5 */ nand@0,0 { compatible = "ti,omap2-nand";
arch/arm/boot/dts/omap3-overo-chestnut43-common.dtsi +0 -2
@@ -55,8 +55,6 @@ #include "omap-gpmc-smsc9221.dtsi" &gpmc { - ranges = <5 0 0x2c000000 0x1000000>; /* CS5 */ - ethernet@gpmc { reg = <5 0 0xff>; interrupt-parent = <&gpio6>;
arch/arm/boot/dts/omap3-overo-tobi-common.dtsi +0 -2
@@ -27,8 +27,6 @@ #include "omap-gpmc-smsc9221.dtsi" &gpmc { - ranges = <5 0 0x2c000000 0x1000000>; /* CS5 */ - ethernet@gpmc { reg = <5 0 0xff>; interrupt-parent = <&gpio6>;
arch/arm/boot/dts/omap3-overo-tobiduo-common.dtsi +0 -3
@@ -15,9 +15,6 @@ #include "omap-gpmc-smsc9221.dtsi" &gpmc { - ranges = <4 0 0x2b000000 0x1000000>, /* CS4 */ - <5 0 0x2c000000 0x1000000>; /* CS5 */ - smsc1: ethernet@gpmc { reg = <5 0 0xff>; interrupt-parent = <&gpio6>;
arch/arm/boot/dts/rk3066a.dtsi +2 -0
@@ -197,6 +197,8 @@ clock-names = "saradc", "apb_pclk"; interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>; #io-channel-cells = <1>; + resets = <&cru SRST_SARADC>; + reset-names = "saradc-apb"; status = "disabled"; };
arch/arm/boot/dts/rk3288.dtsi +2 -0
@@ -279,6 +279,8 @@ #io-channel-cells = <1>; clocks = <&cru SCLK_SARADC>, <&cru PCLK_SARADC>; clock-names = "saradc", "apb_pclk"; + resets = <&cru SRST_SARADC>; + reset-names = "saradc-apb"; status = "disabled"; };
arch/arm/boot/dts/rk3xxx.dtsi +2 -0
@@ -399,6 +399,8 @@ #io-channel-cells = <1>; clocks = <&cru SCLK_SARADC>, <&cru PCLK_SARADC>; clock-names = "saradc", "apb_pclk"; + resets = <&cru SRST_SARADC>; + reset-names = "saradc-apb"; status = "disabled"; };
arch/arm/boot/dts/stih407-family.dtsi +6 -4
@@ -550,8 +550,9 @@ interrupt-names = "mmcirq"; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_mmc0>; - clock-names = "mmc"; - clocks = <&clk_s_c0_flexgen CLK_MMC_0>; + clock-names = "mmc", "icn"; + clocks = <&clk_s_c0_flexgen CLK_MMC_0>, + <&clk_s_c0_flexgen CLK_RX_ICN_HVA>; bus-width = <8>; non-removable; };
@@ -565,8 +566,9 @@ interrupt-names = "mmcirq"; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_sd1>; - clock-names = "mmc"; - clocks = <&clk_s_c0_flexgen CLK_MMC_1>; + clock-names = "mmc", "icn"; + clocks = <&clk_s_c0_flexgen CLK_MMC_1>, + <&clk_s_c0_flexgen CLK_RX_ICN_HVA>; resets = <&softreset STIH407_MMC1_SOFTRESET>; bus-width = <4>; };
arch/arm/boot/dts/stih410.dtsi +8 -4
@@ -41,7 +41,8 @@ compatible = "st,st-ohci-300x"; reg = <0x9a03c00 0x100>; interrupts = <GIC_SPI 180 IRQ_TYPE_NONE>; - clocks = <&clk_s_c0_flexgen CLK_TX_ICN_DISP_0>; + clocks = <&clk_s_c0_flexgen CLK_TX_ICN_DISP_0>, + <&clk_s_c0_flexgen CLK_RX_ICN_DISP_0>; resets = <&powerdown STIH407_USB2_PORT0_POWERDOWN>, <&softreset STIH407_USB2_PORT0_SOFTRESET>; reset-names = "power", "softreset";
@@ -57,7 +58,8 @@ interrupts = <GIC_SPI 151 IRQ_TYPE_NONE>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_usb0>; - clocks = <&clk_s_c0_flexgen CLK_TX_ICN_DISP_0>; + clocks = <&clk_s_c0_flexgen CLK_TX_ICN_DISP_0>, + <&clk_s_c0_flexgen CLK_RX_ICN_DISP_0>; resets = <&powerdown STIH407_USB2_PORT0_POWERDOWN>, <&softreset STIH407_USB2_PORT0_SOFTRESET>; reset-names = "power", "softreset";
@@ -71,7 +73,8 @@ compatible = "st,st-ohci-300x"; reg = <0x9a83c00 0x100>; interrupts = <GIC_SPI 181 IRQ_TYPE_NONE>; - clocks = <&clk_s_c0_flexgen CLK_TX_ICN_DISP_0>; + clocks = <&clk_s_c0_flexgen CLK_TX_ICN_DISP_0>, + <&clk_s_c0_flexgen CLK_RX_ICN_DISP_0>; resets = <&powerdown STIH407_USB2_PORT1_POWERDOWN>, <&softreset STIH407_USB2_PORT1_SOFTRESET>; reset-names = "power", "softreset";
@@ -87,7 +90,8 @@ interrupts = <GIC_SPI 153 IRQ_TYPE_NONE>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_usb1>; - clocks = <&clk_s_c0_flexgen CLK_TX_ICN_DISP_0>; + clocks = <&clk_s_c0_flexgen CLK_TX_ICN_DISP_0>, + <&clk_s_c0_flexgen CLK_RX_ICN_DISP_0>; resets = <&powerdown STIH407_USB2_PORT1_POWERDOWN>, <&softreset STIH407_USB2_PORT1_SOFTRESET>; reset-names = "power", "softreset";
arch/arm/kvm/arm.c +0 -2
@@ -157,8 +157,6 @@ void kvm_arch_destroy_vm(struct kvm *kvm) {int i; -kvm_free_stage2_pgd (kvm); -for (i =0 ; i <KVM_MAX_VCPUS ; ++i) {if (kvm->vcpus[i]) {kvm_arch_vcpu_free (kvm->vcpus[i]);
arch/arm/kvm/mmu.c +1 -0
@@ -1909,6 +1909,7 @@ void kvm_arch_memslots_updated(struct kvm *kvm, struct kvm_memslots *slots)void kvm_arch_flush_shadow_all (struct kvm *kvm) { +kvm_free_stage2_pgd (kvm); } void kvm_arch_flush_shadow_memslot(struct kvm *kvm,
arch/arm/mach-imx/pm-imx6.c +2 -2
@@ -295,7 +295,7 @@ int imx6_set_lpm(enum mxc_cpu_pwr_mode mode) val &= ~BM_CLPCR_SBYOS ;if (cpu_is_imx6sl ()) val |=BM_CLPCR_BYPASS_PMIC_READY ; -if (cpu_is_imx6sl () ||cpu_is_imx6sx ()) +if (cpu_is_imx6sl () ||cpu_is_imx6sx () ||cpu_is_imx6ul ()) val |=BM_CLPCR_BYP_MMDC_CH0_LPM_HS ;else val |=BM_CLPCR_BYP_MMDC_CH1_LPM_HS ;
@@ -310,7 +310,7 @@ int imx6_set_lpm(enum mxc_cpu_pwr_mode mode) val |=0x3 <<BP_CLPCR_STBY_COUNT ; val |=BM_CLPCR_VSTBY ; val |=BM_CLPCR_SBYOS ; -if (cpu_is_imx6sl ()) +if (cpu_is_imx6sl () ||cpu_is_imx6sx ()) val |=BM_CLPCR_BYPASS_PMIC_READY ;if (cpu_is_imx6sl () ||cpu_is_imx6sx () ||cpu_is_imx6ul ()) val |=BM_CLPCR_BYP_MMDC_CH0_LPM_HS ;
arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c +1 -0
@@ -1476,6 +1476,7 @@ static void omap_hwmod_am43xx_rst(void) {RSTCTRL (am33xx_pruss_hwmod,AM43XX_RM_PER_RSTCTRL_OFFSET );RSTCTRL (am33xx_gfx_hwmod,AM43XX_RM_GFX_RSTCTRL_OFFSET ); +RSTST (am33xx_pruss_hwmod,AM43XX_RM_PER_RSTST_OFFSET );RSTST (am33xx_gfx_hwmod,AM43XX_RM_GFX_RSTST_OFFSET ); }
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +12 -0
@@ -722,8 +722,20 @@ static struct omap_hwmod omap3xxx_dss_dispc_hwmod = {* display serial interface controller */ +static struct omap_hwmod_class_sysconfig omap3xxx_dsi_sysc = { + .rev_offs =0x0000 , + .sysc_offs =0x0010 , + .syss_offs =0x0014 , + .sysc_flags = (SYSC_HAS_AUTOIDLE |SYSC_HAS_CLOCKACTIVITY | +SYSC_HAS_ENAWAKEUP |SYSC_HAS_SIDLEMODE | +SYSC_HAS_SOFTRESET |SYSS_HAS_RESET_STATUS ), + .idlemodes = (SIDLE_FORCE |SIDLE_NO |SIDLE_SMART ), + .sysc_fields = &omap_hwmod_sysc_type1, +}; +static struct omap_hwmod_class omap3xxx_dsi_hwmod_class = { .name ="dsi" , + .sysc = &omap3xxx_dsi_sysc, };static struct omap_hwmod_irq_info omap3xxx_dsi1_irqs[] = {
arch/arm/mach-omap2/prcm43xx.h +1 -0
@@ -39,6 +39,7 @@/* RM RSTST offsets */ #define AM43XX_RM_GFX_RSTST_OFFSET 0x0014 +#define AM43XX_RM_PER_RSTST_OFFSET 0x0014#define AM43XX_RM_WKUP_RSTST_OFFSET 0x0014/* CM instances */
arch/arm/mach-pxa/idp.c +2 -1
@@ -83,7 +83,8 @@ static struct resource smc91x_resources[] = { };static struct smc91x_platdata smc91x_platdata = { - .flags =SMC91X_USE_32BIT |SMC91X_USE_DMA |SMC91X_NOWAIT , + .flags =SMC91X_USE_8BIT |SMC91X_USE_16BIT |SMC91X_USE_32BIT | +SMC91X_USE_DMA |SMC91X_NOWAIT , };static struct platform_device smc91x_device = {
arch/arm/mach-pxa/xcep.c +2 -1
@@ -120,7 +120,8 @@ static struct resource smc91x_resources[] = { };static struct smc91x_platdata xcep_smc91x_info = { - .flags =SMC91X_USE_32BIT |SMC91X_NOWAIT |SMC91X_USE_DMA , + .flags =SMC91X_USE_8BIT |SMC91X_USE_16BIT |SMC91X_USE_32BIT | +SMC91X_NOWAIT |SMC91X_USE_DMA , };static struct platform_device smc91x_device = {
arch/arm/mach-realview/core.c +2 -1
@@ -93,7 +93,8 @@ static struct smsc911x_platform_config smsc911x_config = { };static struct smc91x_platdata smc91x_platdata = { - .flags =SMC91X_USE_32BIT |SMC91X_NOWAIT , + .flags =SMC91X_USE_8BIT |SMC91X_USE_16BIT |SMC91X_USE_32BIT | +SMC91X_NOWAIT , };static struct platform_device realview_eth_device = {
arch/arm/mach-sa1100/pleb.c +1 -1
@@ -45,7 +45,7 @@ static struct resource smc91x_resources[] = { };static struct smc91x_platdata smc91x_platdata = { - .flags =SMC91X_USE_16BIT |SMC91X_NOWAIT , + .flags =SMC91X_USE_16BIT |SMC91X_USE_8BIT |SMC91X_NOWAIT , };static struct platform_device smc91x_device = {
arch/arm64/include/asm/spinlock.h +10 -0
@@ -363,4 +363,14 @@ static inline int arch_read_trylock(arch_rwlock_t *rw)#define arch_read_relax (lock) cpu_relax()#define arch_write_relax (lock) cpu_relax() +/* +* Accesses appearing in program order before a spin_lock() operation +* can be reordered with accesses inside the critical section, by virtue +* of arch_spin_lock being constructed using acquire semantics. +* +* In cases where this is problematic (e.g. try_to_wake_up), an +* smp_mb__before_spinlock() can restore the required ordering. +*/ +#define smp_mb__before_spinlock () smp_mb() +#endif /* __ASM_SPINLOCK_H */
arch/avr32/include/asm/uaccess.h +10 -1
@@ -74,7 +74,7 @@ extern __kernel_size_t __copy_user(void *to, const void *from,extern __kernel_size_t copy_to_user (void __user *to,const void *from,__kernel_size_t n); -extern __kernel_size_t copy_from_user (void *to,const void __user *from, +extern __kernel_size_t ___copy_from_user (void *to,const void __user *from,__kernel_size_t n); static inline __kernel_size_t __copy_to_user(void __user *to, const void *from,
@@ -88,6 +88,15 @@ static inline __kernel_size_t __copy_from_user(void *to, {return __copy_user (to, (const void __force *)from, n); } +static inline __kernel_size_t copy_from_user (void *to, +const void __user *from, +__kernel_size_t n) +{ +size_t res =___copy_from_user (to, from, n); +if (unlikely (res)) +memset (to + (n - res),0 , res); +return res; +}#define __copy_to_user_inatomic __copy_to_user#define __copy_from_user_inatomic __copy_from_user
arch/avr32/kernel/avr32_ksyms.c +1 -1
@@ -36,7 +36,7 @@ EXPORT_SYMBOL(copy_page);/* * Userspace access stuff. */ -EXPORT_SYMBOL (copy_from_user); +EXPORT_SYMBOL (___copy_from_user);EXPORT_SYMBOL (copy_to_user);EXPORT_SYMBOL (__copy_user);EXPORT_SYMBOL (strncpy_from_user);
arch/avr32/lib/copy_user.S +4 -4
@@ -23,13 +23,13 @@ */ .text .align 1 - .global copy_from_user - .type copy_from_user, @function -copy_from_user: + .global ___copy_from_user + .type ___copy_from_user, @function +___copy_from_user: branch_if_kernel r8, __copy_user ret_if_privileged r8, r11, r10, r10 rjmp __copy_user - .size copy_from_user, . - copy_from_user + .size ___copy_from_user, . - ___copy_from_user .global copy_to_user .type copy_to_user, @function
arch/blackfin/include/asm/uaccess.h +5 -4
@@ -171,11 +171,12 @@ static inline int bad_user_access_length(void)static inline unsigned long __must_check copy_from_user (void *to,const void __user *from,unsigned long n) { -if (access_ok (VERIFY_READ , from, n)) +if (likely (access_ok (VERIFY_READ , from, n))) {memcpy (to, (const void __force *)from, n); -else -return n; -return 0 ; +return 0 ; + } +memset (to,0 , n); +return n; } static inline unsigned long __must_check
arch/blackfin/mach-bf561/boards/cm_bf561.c +2 -1
@@ -146,7 +146,8 @@ static struct platform_device hitachi_fb_device = {#include <linux/smc91x.h> static struct smc91x_platdata smc91x_info = { - .flags =SMC91X_USE_32BIT |SMC91X_NOWAIT , + .flags =SMC91X_USE_8BIT |SMC91X_USE_16BIT |SMC91X_USE_32BIT | +SMC91X_NOWAIT , .leda =RPC_LED_100_10 , .ledb =RPC_LED_TX_RX , };
arch/blackfin/mach-bf561/boards/ezkit.c +2 -1
@@ -134,7 +134,8 @@ static struct platform_device net2272_bfin_device = {#include <linux/smc91x.h> static struct smc91x_platdata smc91x_info = { - .flags =SMC91X_USE_32BIT |SMC91X_NOWAIT , + .flags =SMC91X_USE_8BIT |SMC91X_USE_16BIT |SMC91X_USE_32BIT | +SMC91X_NOWAIT , .leda =RPC_LED_100_10 , .ledb =RPC_LED_TX_RX , };
arch/cris/include/asm/uaccess.h +32 -39
102 lines not on this page · raw message
arch/frv/include/asm/uaccess.h +9 -3
@@ -263,19 +263,25 @@ do { \extern long __memset_user (void *dst,unsigned long count);extern long __memcpy_user (void *dst,const void *src,unsigned long count); -#define clear_user (dst,count) __memset_user(____force(dst), (count)) +#define __clear_user (dst,count) __memset_user(____force(dst), (count))#define __copy_from_user_inatomic (to, from, n) __memcpy_user((to), ____force(from), (n))#define __copy_to_user_inatomic (to, from, n) __memcpy_user(____force(to), (from), (n))#else -#define clear_user (dst,count) (memset(____force(dst), 0, (count)), 0) +#define __clear_user (dst,count) (memset(____force(dst), 0, (count)), 0)#define __copy_from_user_inatomic (to, from, n) (memcpy((to), ____force(from), (n)), 0)#define __copy_to_user_inatomic (to, from, n) (memcpy(____force(to), (from), (n)), 0)#endif -#define __clear_user clear_user +static inline unsigned long __must_check +clear_user (void __user *to,unsigned long n) +{ +if (likely (__access_ok (to, n))) + n =__clear_user (to, n); +return n; +}static inline unsigned long __must_check __copy_to_user (void __user *to,const void *from,unsigned long n)
arch/hexagon/include/asm/uaccess.h +2 -1
@@ -103,7 +103,8 @@ static inline long hexagon_strncpy_from_user(char *dst, const char __user *src, {long res =__strnlen_user (src, n); -/* return from strnlen can't be zero -- that would be rubbish. */ +if (unlikely (!res)) +return -EFAULT ;if (res > n) {copy_from_user (dst, src, n);
arch/ia64/include/asm/uaccess.h +9 -11
@@ -263,17 +263,15 @@ __copy_from_user (void *to, const void __user *from, unsigned long count) __cu_len; \ }) -#define copy_from_user (to, from, n) \ -({ \ - void *__cu_to = (to); \ - const void __user *__cu_from = (from); \ - long __cu_len = (n); \ - \ - __chk_user_ptr(__cu_from); \ - if (__access_ok(__cu_from, __cu_len, get_fs())) \ - __cu_len = __copy_user((__force void __user *) __cu_to, __cu_from, __cu_len); \ - __cu_len; \ -}) +static inline unsigned long +copy_from_user (void *to,const void __user *from,unsigned long n) +{ +if (likely (__access_ok (from, n,get_fs ()))) + n =__copy_user ((__force void __user *) to, from, n); +else +memset (to,0 , n); +return n; +}#define __copy_in_user (to, from, size) __copy_user((to), (from), (size))
arch/m32r/include/asm/uaccess.h +1 -1
@@ -219,7 +219,7 @@ extern int fixup_exception(struct pt_regs *regs);#define __get_user_nocheck (x, ptr, size) \ ({ \ long __gu_err = 0; \ - unsigned long __gu_val; \ + unsigned long __gu_val = 0; \ might_fault(); \ __get_user_size(__gu_val, (ptr), (size), __gu_err); \ (x) = (__force __typeof__(*(ptr)))__gu_val; \
arch/metag/include/asm/uaccess.h +2 -1
@@ -204,8 +204,9 @@ extern unsigned long __must_check __copy_user_zeroing(void *to,static inline unsigned long copy_from_user (void *to,const void __user *from,unsigned long n) { -if (access_ok (VERIFY_READ , from, n)) +if (likely (access_ok (VERIFY_READ , from, n)))return __copy_user_zeroing (to, from, n); +memset (to,0 , n);return n; }
arch/microblaze/include/asm/uaccess.h +7 -4
@@ -227,7 +227,7 @@ extern long __user_bad(void);#define __get_user (x, ptr) \ ({ \ - unsigned long __gu_val; \ + unsigned long __gu_val = 0; \/*unsigned long __gu_ptr = (unsigned long)(ptr);*/ \long __gu_err; \switch (sizeof (*(ptr))) { \
@@ -373,10 +373,13 @@ extern long __user_bad(void);static inline long copy_from_user (void *to,const void __user *from,unsigned long n) { +unsigned long res = n;might_fault (); -if (access_ok (VERIFY_READ , from, n)) -return __copy_from_user (to, from, n); -return n; +if (likely (access_ok (VERIFY_READ , from, n))) + res =__copy_from_user (to, from, n); +if (unlikely (res)) +memset (to + (n - res),0 , res); +return res; }#define __copy_to_user (to, from, n) \
arch/mips/include/asm/uaccess.h +3 -0
@@ -14,6 +14,7 @@#include <linux/kernel.h> #include <linux/errno.h> #include <linux/thread_info.h> +#include <linux/string.h> #include <asm/asm-eva.h> /*
@@ -1170,6 +1171,8 @@ extern size_t __copy_in_user_eva(void *__to, const void *__from, size_t __n); __cu_len =__invoke_copy_from_user (__cu_to, \ __cu_from, \ __cu_len); \ + }else { \ +memset (__cu_to,0 , __cu_len); \ } \ } \ __cu_len; \
arch/mips/kvm/tlb.c +1 -1
@@ -159,7 +159,7 @@ static int kvm_mips_map_page(struct kvm *kvm, gfn_t gfn) srcu_idx =srcu_read_lock (&kvm->srcu); pfn =kvm_mips_gfn_to_pfn (kvm, gfn); -if (kvm_mips_is_error_pfn (pfn)) { +if (is_error_noslot_pfn (pfn)) {kvm_err ("Couldn't get pfn for gfn %#" PRIx64"!\n" , gfn); err = -EFAULT ; goto out;
arch/mn10300/include/asm/uaccess.h +1 -0
@@ -166,6 +166,7 @@ struct __large_struct { unsigned long buf[100]; };"2:\n" \" .section .fixup,\"ax\"\n" \"3:\n\t" \ +" mov 0,%1\n" \" mov %3,%0\n" \" jmp 2b\n" \" .previous\n" \
arch/mn10300/lib/usercopy.c +3 -1
@@ -9,7 +9,7 @@* as published by the Free Software Foundation; either version * 2 of the Licence, or (at your option) any later version. */ -#include <asm/uaccess.h> +#include <linux/uaccess.h> unsigned long __generic_copy_to_user (void *to,const void *from,unsigned long n)
@@ -24,6 +24,8 @@ __generic_copy_from_user(void *to, const void *from, unsigned long n) {if (access_ok (VERIFY_READ , from, n))__copy_user_zeroing (to, from, n); +else +memset (to,0 , n);return n; }
arch/nios2/include/asm/uaccess.h +8 -5
@@ -102,9 +102,12 @@ extern long __copy_to_user(void __user *to, const void *from, unsigned long n);static inline long copy_from_user (void *to,const void __user *from,unsigned long n) { -if (!access_ok (VERIFY_READ , from, n)) -return n; -return __copy_from_user (to, from, n); +unsigned long res = n; +if (access_ok (VERIFY_READ , from, n)) + res =__copy_from_user (to, from, n); +if (unlikely (res)) +memset (to + (n - res),0 , res); +return res; } static inline long copy_to_user(void __user *to, const void *from,
@@ -139,7 +142,7 @@ extern long strnlen_user(const char __user *s, long n);#define __get_user_unknown (val, size, ptr, err) do { \ err = 0; \ - if (copy_from_user(&(val), ptr, size)) { \ + if (__copy_from_user(&(val), ptr, size)) { \ err = -EFAULT; \ } \ } while (0)
@@ -166,7 +169,7 @@ do { \ ({ \ long __gu_err = -EFAULT; \ const __typeof__(*(ptr)) __user *__gu_ptr = (ptr); \ - unsigned long __gu_val; \ + unsigned long __gu_val = 0; \ __get_user_common(__gu_val, sizeof(*(ptr)), __gu_ptr, __gu_err);\ (x) = (__force __typeof__(x))__gu_val; \ __gu_err; \
arch/openrisc/include/asm/uaccess.h +11 -24
@@ -273,28 +273,20 @@ __copy_tofrom_user(void *to, const void *from, unsigned long size);static inline unsigned long copy_from_user (void *to,const void *from,unsigned long n) { -unsigned long over; - -if (access_ok (VERIFY_READ , from, n)) -return __copy_tofrom_user (to, from, n); -if ((unsigned long )from <TASK_SIZE ) { - over = (unsigned long )from + n -TASK_SIZE ; -return __copy_tofrom_user (to, from, n - over) + over; - } -return n; +unsigned long res = n; + +if (likely (access_ok (VERIFY_READ , from, n))) + res =__copy_tofrom_user (to, from, n); +if (unlikely (res)) +memset (to + (n - res),0 , res); +return res; }static inline unsigned long copy_to_user (void *to,const void *from,unsigned long n) { -unsigned long over; - -if (access_ok (VERIFY_WRITE , to, n)) -return __copy_tofrom_user (to, from, n); -if ((unsigned long )to <TASK_SIZE ) { - over = (unsigned long )to + n -TASK_SIZE ; -return __copy_tofrom_user (to, from, n - over) + over; - } +if (likely (access_ok (VERIFY_WRITE , to, n))) + n =__copy_tofrom_user (to, from, n);return n; }
@@ -303,13 +295,8 @@ extern unsigned long __clear_user(void *addr, unsigned long size);static inline __must_check unsigned long clear_user (void *addr,unsigned long size) { - -if (access_ok (VERIFY_WRITE , addr, size)) -return __clear_user (addr, size); -if ((unsigned long )addr <TASK_SIZE ) { -unsigned long over = (unsigned long )addr + size -TASK_SIZE ; -return __clear_user (addr, size - over) + over; - } +if (likely (access_ok (VERIFY_WRITE , addr, size))) + size =__clear_user (addr, size);return size; }
arch/parisc/include/asm/uaccess.h +4 -2
@@ -10,6 +10,7 @@#include <asm-generic/uaccess-unaligned.h> #include <linux/bug.h> +#include <linux/string.h> #define VERIFY_READ 0#define VERIFY_WRITE 1
@@ -221,13 +222,14 @@ static inline unsigned long __must_check copy_from_user(void *to, unsigned long n) {int sz =__compiletime_object_size (to); -int ret = -EFAULT ; +unsigned long ret = n;if (likely (sz ==-1 || !__builtin_constant_p (n) || sz >= n)) ret =__copy_from_user (to, from, n);else copy_from_user_overflow (); - +if (unlikely (ret)) +memset (to + (n - ret),0 , ret);return ret; }
arch/powerpc/include/asm/uaccess.h +2 -19
@@ -308,30 +308,17 @@ extern unsigned long __copy_tofrom_user(void __user *to,static inline unsigned long copy_from_user (void *to,const void __user *from,unsigned long n) { -unsigned long over; - -if (access_ok (VERIFY_READ , from, n)) +if (likely (access_ok (VERIFY_READ , from, n)))return __copy_tofrom_user ((__force void __user *)to, from, n); -if ((unsigned long )from <TASK_SIZE ) { - over = (unsigned long )from + n -TASK_SIZE ; -return __copy_tofrom_user ((__force void __user *)to, from, - n - over) + over; - } +memset (to,0 , n);return n; }static inline unsigned long copy_to_user (void __user *to,const void *from,unsigned long n) { -unsigned long over; -if (access_ok (VERIFY_WRITE , to, n))return __copy_tofrom_user (to, (__force void __user *)from, n); -if ((unsigned long )to <TASK_SIZE ) { - over = (unsigned long )to + n -TASK_SIZE ; -return __copy_tofrom_user (to, (__force void __user *)from, - n - over) + over; - }return n; }
@@ -422,10 +409,6 @@ static inline unsigned long clear_user(void __user *addr, unsigned long size)might_fault ();if (likely (access_ok (VERIFY_WRITE , addr, size)))return __clear_user (addr, size); -if ((unsigned long )addr <TASK_SIZE ) { -unsigned long over = (unsigned long )addr + size -TASK_SIZE ; -return __clear_user (addr, size - over) + over; - }return size; }
arch/powerpc/kernel/entry_64.S +6 -6
@@ -368,13 +368,13 @@ END_FTR_SECTION_IFSET(CPU_FTR_HAS_PPR) tabort_syscall: /* Firstly we need to enable TM in the kernel */ mfmsr r10 - li r13, 1 - rldimi r10, r13, MSR_TM_LG, 63-MSR_TM_LG + li r9, 1 + rldimi r10, r9, MSR_TM_LG, 63-MSR_TM_LG mtmsrd r10, 0 /* tabort, this dooms the transaction, nothing else */ - li r13, (TM_CAUSE_SYSCALL|TM_CAUSE_PERSISTENT) - TABORT(R13) + li r9, (TM_CAUSE_SYSCALL|TM_CAUSE_PERSISTENT) + TABORT(R9) /* * Return directly to userspace. We have corrupted user register state,
@@ -382,8 +382,8 @@ tabort_syscall: * resume after the tbegin of the aborted transaction with the * checkpointed register state. */ - li r13, MSR_RI - andc r10, r10, r13 + li r9, MSR_RI + andc r10, r10, r9 mtmsrd r10, 1 mtspr SPRN_SRR0, r11 mtspr SPRN_SRR1, r12
arch/powerpc/lib/checksum_32.S +5 -3
@@ -127,17 +127,19 @@ _GLOBAL(csum_partial_copy_generic) stw r7,12(r1) stw r8,8(r1) - andi. r0,r4,1 /* is destination address even ? */ - cmplwi cr7,r0,0 addic r12,r6,0 addi r6,r4,-4 neg r0,r4 addi r4,r3,-4 andi. r0,r0,CACHELINE_MASK /* # bytes to start of cache line */ + crset 4*cr7+eq beq 58f cmplw 0,r5,r0 /* is this more than total to do? */ blt 63f /* if not much to do */ + rlwinm r7,r6,3,0x8 + rlwnm r12,r12,r7,0,31 /* odd destination address: rotate one byte */ + cmplwi cr7,r7,0 /* is destination address even ? */ andi. r8,r0,3 /* get it word-aligned first */ mtctr r8 beq+ 61f
@@ -237,7 +239,7 @@ _GLOBAL(csum_partial_copy_generic) 66: addze r3,r12 addi r1,r1,16 beqlr+ cr7 - rlwinm r3,r3,8,0,31 /* swap bytes for odd destination */ + rlwinm r3,r3,8,0,31 /* odd destination address: rotate one byte */ blr /* read fault */
arch/powerpc/mm/slb_low.S +6 -1
@@ -113,7 +113,12 @@ BEGIN_FTR_SECTION END_MMU_FTR_SECTION_IFCLR(MMU_FTR_1T_SEGMENT) b slb_finish_load_1T -0: +0: /* + * For userspace addresses, make sure this is region 0. + */ + cmpdi r9, 0 + bne 8f + /* when using slices, we extract the psize off the slice bitmaps * and then we need to get the sllp encoding off the mmu_psize_defs * array.
arch/powerpc/platforms/powernv/opal-dump.c +6 -1
@@ -370,6 +370,7 @@ static irqreturn_t process_dump(int irq, void *data)uint32_t dump_id, dump_size, dump_type;struct dump_obj *dump;char name[22 ]; +struct kobject *kobj; rc =dump_read_info (&dump_id, &dump_size, &dump_type);if (rc !=OPAL_SUCCESS )
@@ -381,8 +382,12 @@ static irqreturn_t process_dump(int irq, void *data)* that gracefully and not create two conflicting * entries. */ -if (kset_find_obj (dump_kset, name)) + kobj =kset_find_obj (dump_kset, name); +if (kobj) { +/* Drop reference added by kset_find_obj() */ +kobject_put (kobj);return 0 ; + } dump =create_dump_obj (dump_id, dump_size, dump_type);if (!dump)
arch/powerpc/platforms/powernv/opal-elog.c +6 -1
@@ -247,6 +247,7 @@ static irqreturn_t elog_event(int irq, void *data)uint64_t elog_type;int rc;char name[2 +16 +1 ]; +struct kobject *kobj; rc =opal_get_elog_size (&id, &size, &type);if (rc !=OPAL_SUCCESS ) {
@@ -269,8 +270,12 @@ static irqreturn_t elog_event(int irq, void *data)* that gracefully and not create two conflicting * entries. */ -if (kset_find_obj (elog_kset, name)) + kobj =kset_find_obj (elog_kset, name); +if (kobj) { +/* Drop reference added by kset_find_obj() */ +kobject_put (kobj);return IRQ_HANDLED ; + }create_elog_obj (log_id, elog_size, elog_type);
arch/powerpc/platforms/powernv/pci-ioda.c +2 -1
@@ -156,11 +156,12 @@ static struct pnv_ioda_pe *pnv_ioda_alloc_pe(struct pnv_phb *phb)static void pnv_ioda_free_pe (struct pnv_ioda_pe *pe) {struct pnv_phb *phb = pe->phb; +unsigned int pe_num = pe->pe_number;WARN_ON (pe->pdev);memset (pe,0 ,sizeof (struct pnv_ioda_pe )); -clear_bit (pe->pe_number, phb->ioda.pe_alloc); +clear_bit (pe_num, phb->ioda.pe_alloc); }/* The default M64 BAR is shared by all PEs */
arch/powerpc/sysdev/cpm1.c +4 -2
@@ -534,7 +534,8 @@ struct cpm1_gpio16_chip {static void cpm1_gpio16_save_regs (struct of_mm_gpio_chip *mm_gc) { -struct cpm1_gpio16_chip *cpm1_gc =gpiochip_get_data (&mm_gc->gc); +struct cpm1_gpio16_chip *cpm1_gc = + container_of(mm_gc, struct cpm1_gpio16_chip, mm_gc);struct cpm_ioport16 __iomem *iop = mm_gc->regs; cpm1_gc->cpdata =in_be16 (&iop->dat);
@@ -649,7 +650,8 @@ struct cpm1_gpio32_chip {static void cpm1_gpio32_save_regs (struct of_mm_gpio_chip *mm_gc) { -struct cpm1_gpio32_chip *cpm1_gc =gpiochip_get_data (&mm_gc->gc); +struct cpm1_gpio32_chip *cpm1_gc = + container_of(mm_gc, struct cpm1_gpio32_chip, mm_gc);struct cpm_ioport32b __iomem *iop = mm_gc->regs; cpm1_gc->cpdata =in_be32 (&iop->dat);
arch/powerpc/sysdev/cpm_common.c +2 -1
@@ -82,7 +82,8 @@ struct cpm2_gpio32_chip {static void cpm2_gpio32_save_regs (struct of_mm_gpio_chip *mm_gc) { -struct cpm2_gpio32_chip *cpm2_gc =gpiochip_get_data (&mm_gc->gc); +struct cpm2_gpio32_chip *cpm2_gc = + container_of(mm_gc, struct cpm2_gpio32_chip, mm_gc);struct cpm2_ioports __iomem *iop = mm_gc->regs; cpm2_gc->cpdata =in_be32 (&iop->dat);
arch/s390/include/asm/uaccess.h +4 -4
@@ -209,28 +209,28 @@ int __put_user_bad(void) __attribute__((noreturn));__chk_user_ptr (ptr); \switch (sizeof (*(ptr))) { \case 1 : { \ -unsigned char __x; \ +unsigned char __x =0 ; \ __gu_err =__get_user_fn (&__x, ptr, \sizeof (*(ptr))); \ (x) = *(__force __typeof__(*(ptr)) *) &__x; \break ; \ }; \case 2 : { \ -unsigned short __x; \ +unsigned short __x =0 ; \ __gu_err =__get_user_fn (&__x, ptr, \sizeof (*(ptr))); \ (x) = *(__force __typeof__(*(ptr)) *) &__x; \break ; \ }; \case 4 : { \ -unsigned int __x; \ +unsigned int __x =0 ; \ __gu_err =__get_user_fn (&__x, ptr, \sizeof (*(ptr))); \ (x) = *(__force __typeof__(*(ptr)) *) &__x; \break ; \ }; \case 8 : { \ -unsigned long long __x; \ +unsigned long long __x =0 ; \ __gu_err =__get_user_fn (&__x, ptr, \sizeof (*(ptr))); \ (x) = *(__force __typeof__(*(ptr)) *) &__x; \
arch/s390/kvm/kvm-s390.c +6 -4
@@ -1951,9 +1951,10 @@ int kvm_arch_vcpu_ioctl_set_fpu(struct kvm_vcpu *vcpu, struct kvm_fpu *fpu)return -EINVAL ; current->thread.fpu.fpc = fpu->fpc;if (MACHINE_HAS_VX ) -convert_fp_to_vx (current->thread.fpu.vxrs, (freg_t *)fpu->fprs); +convert_fp_to_vx ((__vector128 *) vcpu->run->s.regs.vrs, + (freg_t *) fpu->fprs);else -memcpy (current->thread.fpu.fprs, &fpu->fprs,sizeof (fpu->fprs)); +memcpy (vcpu->run->s.regs.fprs, &fpu->fprs,sizeof (fpu->fprs));return 0 ; }
@@ -1962,9 +1963,10 @@ int kvm_arch_vcpu_ioctl_get_fpu(struct kvm_vcpu *vcpu, struct kvm_fpu *fpu)/* make sure we have the latest values */ save_fpu_regs ();if (MACHINE_HAS_VX ) -convert_vx_to_fp ((freg_t *)fpu->fprs, current->thread.fpu.vxrs); +convert_vx_to_fp ((freg_t *) fpu->fprs, + (__vector128 *) vcpu->run->s.regs.vrs);else -memcpy (fpu->fprs, current->thread.fpu.fprs,sizeof (fpu->fprs)); +memcpy (fpu->fprs, vcpu->run->s.regs.fprs,sizeof (fpu->fprs)); fpu->fpc = current->thread.fpu.fpc;return 0 ; }
arch/score/include/asm/uaccess.h +24 -22
95 lines not on this page · raw message
arch/sh/include/asm/cmpxchg-xchg.h +1 -1
@@ -21,7 +21,7 @@ static inline u32 __xchg_cmpxchg(volatile void *ptr, u32 x, int size)int off = (unsigned long )ptr %sizeof (u32);volatile u32 *p = ptr - off;#ifdef __BIG_ENDIAN -int bitoff = (sizeof (u32) -1 - off) *BITS_PER_BYTE ; +int bitoff = (sizeof (u32) - size - off) *BITS_PER_BYTE ;#else int bitoff = off *BITS_PER_BYTE ;#endif
arch/sh/include/asm/uaccess.h +4 -1
@@ -151,7 +151,10 @@ copy_from_user(void *to, const void __user *from, unsigned long n)__kernel_size_t __copy_size = (__kernel_size_t ) n;if (__copy_size &&__access_ok (__copy_from, __copy_size)) -return __copy_user (to, from, __copy_size); + __copy_size =__copy_user (to, from, __copy_size); + +if (unlikely (__copy_size)) +memset (to + (n - __copy_size),0 , __copy_size);return __copy_size; }
arch/sh/include/asm/uaccess_64.h +1 -0
@@ -24,6 +24,7 @@#define __get_user_size (x,ptr,size,retval) \ do { \ retval = 0; \ + x = 0; \ switch (size) { \ case 1: \ retval = __get_user_asm_b((void *)&x, \
arch/sparc/include/asm/uaccess_32.h +3 -1
@@ -263,8 +263,10 @@ static inline unsigned long copy_from_user(void *to, const void __user *from, un {if (n &&__access_ok ((unsigned long ) from, n))return __copy_user ((__force void __user *) to, from, n); -else +else { +memset (to,0 , n);return n; + } }static inline unsigned long __copy_from_user (void *to,const void __user *from,unsigned long n)
arch/x86/boot/compressed/eboot.c +69 -65
158 lines not on this page · raw message
arch/x86/configs/tiny.config +2 -0
@@ -1 +1,3 @@ CONFIG_NOHIGHMEM=y +# CONFIG_HIGHMEM4G is not set +# CONFIG_HIGHMEM64G is not set
arch/x86/events/amd/core.c +2 -2
@@ -119,8 +119,8 @@ static const u64 amd_perfmon_event_map[PERF_COUNT_HW_MAX] = { [PERF_COUNT_HW_CPU_CYCLES] = 0x0076, [PERF_COUNT_HW_INSTRUCTIONS] = 0x00c0, - [PERF_COUNT_HW_CACHE_REFERENCES] = 0x0080, - [PERF_COUNT_HW_CACHE_MISSES] = 0x0081, + [PERF_COUNT_HW_CACHE_REFERENCES] = 0x077d, + [PERF_COUNT_HW_CACHE_MISSES] = 0x077e, [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = 0x00c2, [PERF_COUNT_HW_BRANCH_MISSES] = 0x00c3, [PERF_COUNT_HW_STALLED_CYCLES_FRONTEND] = 0x00d0, /* "Decoder empty" event */
arch/x86/events/intel/cqm.c +9 -0
@@ -458,6 +458,11 @@ static void __intel_cqm_event_count(void *info);static void init_mbm_sample (u32 rmid,u32 evt_type);static void __intel_mbm_event_count (void *info); +static bool is_cqm_event (int e) +{ +return (e ==QOS_L3_OCCUP_EVENT_ID ); +} +static bool is_mbm_event (int e) {return (e >=QOS_MBM_TOTAL_EVENT_ID && e <=QOS_MBM_LOCAL_EVENT_ID );
@@ -1366,6 +1371,10 @@ static int intel_cqm_event_init(struct perf_event *event) (event->attr.config > QOS_MBM_LOCAL_EVENT_ID))return -EINVAL ; +if ((is_cqm_event (event->attr.config) && !cqm_enabled) || + (is_mbm_event (event->attr.config) && !mbm_enabled)) +return -EINVAL ; +/* unsupported modes and filters */ if (event->attr.exclude_user || event->attr.exclude_kernel ||
arch/x86/events/intel/ds.c +11 -8
@@ -1274,18 +1274,18 @@ static void intel_pmu_drain_pebs_nhm(struct pt_regs *iregs)struct pebs_record_nhm *p = at;u64 pebs_status; -/* PEBS v3 has accurate status bits */ + pebs_status = p->status & cpuc->pebs_enabled; + pebs_status &= (1ULL << x86_pmu.max_pebs_events) -1 ; + +/* PEBS v3 has more accurate status bits */ if (x86_pmu.intel_cap.pebs_format >=3 ) { -for_each_set_bit (bit, (unsigned long *)&p->status, -MAX_PEBS_EVENTS ) +for_each_set_bit (bit, (unsigned long *)&pebs_status, + x86_pmu.max_pebs_events) counts[bit]++;continue ; } - pebs_status = p->status & cpuc->pebs_enabled; - pebs_status &= (1ULL << x86_pmu.max_pebs_events) -1 ; -/* * On some CPUs the PEBS status can be zero when PEBS is * racing with clearing of GLOBAL_STATUS.
@@ -1333,8 +1333,11 @@ static void intel_pmu_drain_pebs_nhm(struct pt_regs *iregs)continue ; event = cpuc->events[bit]; -WARN_ON_ONCE (!event); -WARN_ON_ONCE (!event->attr.precise_ip); +if (WARN_ON_ONCE (!event)) +continue ; + +if (WARN_ON_ONCE (!event->attr.precise_ip)) +continue ;/* log dropped samples number */ if (error[bit])
arch/x86/events/intel/pt.c +14 -4
@@ -1074,6 +1074,11 @@ static void pt_addr_filters_fini(struct perf_event *event) event->hw.addr_filters =NULL ; } +static inline bool valid_kernel_ip (unsigned long ip) +{ +return virt_addr_valid (ip) &&kernel_ip (ip); +} +static int pt_event_addr_filters_validate (struct list_head *filters) {struct perf_addr_filter *filter;
@@ -1081,11 +1086,16 @@ static int pt_event_addr_filters_validate(struct list_head *filters)list_for_each_entry (filter, filters, entry) {/* PT doesn't support single address triggers */ -if (!filter->range) +if (!filter->range || !filter->size)return -EOPNOTSUPP ; -if (!filter->inode && !kernel_ip (filter->offset)) -return -EINVAL ; +if (!filter->inode) { +if (!valid_kernel_ip (filter->offset)) +return -EINVAL ; + +if (!valid_kernel_ip (filter->offset + filter->size)) +return -EINVAL ; + }if (++range >pt_cap_get (PT_CAP_num_address_ranges))return -EOPNOTSUPP ;
@@ -1111,7 +1121,7 @@ static void pt_event_addr_filters_sync(struct perf_event *event) }else {/* apply the offset */ msr_a = filter->offset + offs[range]; - msr_b = filter->size + msr_a; + msr_b = filter->size + msr_a -1 ; } filters->filter[range].msr_a = msr_a;
arch/x86/include/asm/uaccess.h +5 -1
@@ -414,7 +414,11 @@ do { \#define __get_user_asm_ex (x, addr, itype, rtype, ltype) \ asm volatile("1: mov"itype" %1,%"rtype"0\n" \ "2:\n" \ - _ASM_EXTABLE_EX(1b, 2b) \ + ".section .fixup,\"ax\"\n" \ + "3:xor"itype" %"rtype"0,%"rtype"0\n" \ + " jmp 2b\n" \ + ".previous\n" \ + _ASM_EXTABLE_EX(1b, 3b) \ : ltype(x) : "m" (__m(addr)))#define __put_user_nocheck (x, ptr, size) \
arch/x86/kernel/cpu/amd.c +12 -0
@@ -669,6 +669,17 @@ static void init_amd_gh(struct cpuinfo_x86 *c)set_cpu_bug (c,X86_BUG_AMD_TLB_MMATCH ); } +#define MSR_AMD64_DE_CFG 0xC0011029 + +static void init_amd_ln (struct cpuinfo_x86 *c) +{ +/* +* Apply erratum 665 fix unconditionally so machines without a BIOS +* fix work. +*/ +msr_set_bit (MSR_AMD64_DE_CFG ,31 ); +} +static void init_amd_bd (struct cpuinfo_x86 *c) {u64 value;
@@ -726,6 +737,7 @@ static void init_amd(struct cpuinfo_x86 *c)case 6 :init_amd_k7 (c);break ;case 0xf :init_amd_k8 (c);break ;case 0x10 :init_amd_gh (c);break ; +case 0x12 :init_amd_ln (c);break ;case 0x15 :init_amd_bd (c);break ; }
arch/x86/kernel/paravirt.c +2 -2
@@ -55,12 +55,12 @@ asm (".pushsection .entry.text, \"ax\"\n" ".popsection");/* identity function, which can be inlined */ -u32 _paravirt_ident_32 (u32 x) +u32 notrace _paravirt_ident_32(u32 x) {return x; } -u64 _paravirt_ident_64 (u64 x) +u64 notrace _paravirt_ident_64(u64 x) {return x; }
arch/x86/kvm/ioapic.c +5 -3
@@ -109,6 +109,7 @@ static void __rtc_irq_eoi_tracking_restore_one(struct kvm_vcpu *vcpu) {bool new_val, old_val;struct kvm_ioapic *ioapic = vcpu->kvm->arch.vioapic; +struct dest_map *dest_map = &ioapic->rtc_status.dest_map;union kvm_ioapic_redirect_entry *e; e = &ioapic->redirtbl[RTC_GSI ];
@@ -117,16 +118,17 @@ static void __rtc_irq_eoi_tracking_restore_one(struct kvm_vcpu *vcpu)return ; new_val =kvm_apic_pending_eoi (vcpu, e->fields.vector); - old_val =test_bit (vcpu->vcpu_id, ioapic->rtc_status.dest_map.map); + old_val =test_bit (vcpu->vcpu_id, dest_map->map);if (new_val == old_val)return ;if (new_val) { -__set_bit (vcpu->vcpu_id, ioapic->rtc_status.dest_map.map); +__set_bit (vcpu->vcpu_id, dest_map->map); + dest_map->vectors[vcpu->vcpu_id] = e->fields.vector; ioapic->rtc_status.pending_eoi++; }else { -__clear_bit (vcpu->vcpu_id, ioapic->rtc_status.dest_map.map); +__clear_bit (vcpu->vcpu_id, dest_map->map); ioapic->rtc_status.pending_eoi--;rtc_status_pending_eoi_check_valid (ioapic); }
arch/x86/kvm/pmu_amd.c +2 -2
@@ -23,8 +23,8 @@static struct kvm_event_hw_type_mapping amd_event_mapping[] = { [0 ] = {0x76 ,0x00 ,PERF_COUNT_HW_CPU_CYCLES }, [1 ] = {0xc0 ,0x00 ,PERF_COUNT_HW_INSTRUCTIONS }, - [2 ] = {0x80 ,0x00 ,PERF_COUNT_HW_CACHE_REFERENCES }, - [3 ] = {0x81 ,0x00 ,PERF_COUNT_HW_CACHE_MISSES }, + [2 ] = {0x7d ,0x07 ,PERF_COUNT_HW_CACHE_REFERENCES }, + [3 ] = {0x7e ,0x07 ,PERF_COUNT_HW_CACHE_MISSES }, [4 ] = {0xc2 ,0x00 ,PERF_COUNT_HW_BRANCH_INSTRUCTIONS }, [5 ] = {0xc3 ,0x00 ,PERF_COUNT_HW_BRANCH_MISSES }, [6 ] = {0xd0 ,0x00 ,PERF_COUNT_HW_STALLED_CYCLES_FRONTEND },
arch/x86/mm/pat.c +10 -7
@@ -931,9 +931,10 @@ int track_pfn_copy(struct vm_area_struct *vma) }/* -* prot is passed in as a parameter for the new mapping. If the vma has a -* linear pfn mapping for the entire range reserve the entire vma range with -* single reserve_pfn_range call. +* prot is passed in as a parameter for the new mapping. If the vma has +* a linear pfn mapping for the entire range, or no vma is provided, +* reserve the entire pfn + size range with single reserve_pfn_range +* call. */ int track_pfn_remap (struct vm_area_struct *vma,pgprot_t *prot,unsigned long pfn,unsigned long addr,unsigned long size)
@@ -942,11 +943,12 @@ int track_pfn_remap(struct vm_area_struct *vma, pgprot_t *prot,enum page_cache_mode pcm;/* reserve the whole chunk starting from paddr */ -if (addr == vma->vm_start && size == (vma->vm_end - vma->vm_start)) { +if (!vma || (addr == vma->vm_start + && size == (vma->vm_end - vma->vm_start))) {int ret; ret =reserve_pfn_range (paddr, size, prot,0 ); -if (!ret) +if (ret ==0 && vma) vma->vm_flags |=VM_PAT ;return ret; }
@@ -1001,7 +1003,7 @@ void untrack_pfn(struct vm_area_struct *vma, unsigned long pfn,resource_size_t paddr;unsigned long prot; -if (!(vma->vm_flags &VM_PAT )) +if (vma && !(vma->vm_flags &VM_PAT ))return ;/* free the chunk starting from pfn or the whole chunk */
@@ -1015,7 +1017,8 @@ void untrack_pfn(struct vm_area_struct *vma, unsigned long pfn, size = vma->vm_end - vma->vm_start; }free_pfn_range (paddr, size); - vma->vm_flags &= ~VM_PAT ; +if (vma) + vma->vm_flags &= ~VM_PAT ; }/*
crypto/cryptd.c +7 -2
@@ -594,9 +594,14 @@ static int cryptd_hash_export(struct ahash_request *req, void *out)static int cryptd_hash_import (struct ahash_request *req,const void *in) { -struct cryptd_hash_request_ctx *rctx =ahash_request_ctx (req); +struct crypto_ahash *tfm =crypto_ahash_reqtfm (req); +struct cryptd_hash_ctx *ctx =crypto_ahash_ctx (tfm); +struct shash_desc *desc =cryptd_shash_desc (req); + + desc->tfm = ctx->child; + desc->flags = req->base.flags; -return crypto_shash_import (&rctx->desc, in); +return crypto_shash_import (desc, in); } static int cryptd_create_hash(struct crypto_template *tmpl, struct rtattr **tb,
drivers/ata/libahci.c +1 -1
@@ -2516,7 +2516,7 @@ static int ahci_host_activate_multi_irqs(struct ata_host *host,/* Do not receive interrupts sent by dummy ports */ if (!pp) { -disable_irq (irq + i); +disable_irq (irq);continue ; }
drivers/bus/arm-ccn.c +22 -5
@@ -187,6 +187,7 @@ struct arm_ccn {struct arm_ccn_component *xp;struct arm_ccn_dt dt; +int mn_id; };
@@ -326,6 +327,7 @@ struct arm_ccn_pmu_event {static ssize_t arm_ccn_pmu_event_show (struct device *dev,struct device_attribute *attr,char *buf) { +struct arm_ccn *ccn =pmu_to_arm_ccn (dev_get_drvdata (dev));struct arm_ccn_pmu_event *event =container_of (attr, struct arm_ccn_pmu_event, attr);ssize_t res;
@@ -352,6 +354,9 @@ static ssize_t arm_ccn_pmu_event_show(struct device *dev, res +=snprintf (buf + res,PAGE_SIZE - res,",cmp_l=?,cmp_h=?,mask=?" );break ; +case CCN_TYPE_MN : + res +=snprintf (buf + res,PAGE_SIZE - res,",node=%d" , ccn->mn_id); +break ;default : res +=snprintf (buf + res,PAGE_SIZE - res,",node=?" );break ;
@@ -381,9 +386,9 @@ static umode_t arm_ccn_pmu_events_is_visible(struct kobject *kobj, }static struct arm_ccn_pmu_event arm_ccn_pmu_events[] = { -CCN_EVENT_MN (eobarrier,"dir=0,vc=0,cmp_h=0x1c00" ,CCN_IDX_MASK_OPCODE ), -CCN_EVENT_MN (ecbarrier,"dir=0,vc=0,cmp_h=0x1e00" ,CCN_IDX_MASK_OPCODE ), -CCN_EVENT_MN (dvmop,"dir=0,vc=0,cmp_h=0x2800" ,CCN_IDX_MASK_OPCODE ), +CCN_EVENT_MN (eobarrier,"dir=1,vc=0,cmp_h=0x1c00" ,CCN_IDX_MASK_OPCODE ), +CCN_EVENT_MN (ecbarrier,"dir=1,vc=0,cmp_h=0x1e00" ,CCN_IDX_MASK_OPCODE ), +CCN_EVENT_MN (dvmop,"dir=1,vc=0,cmp_h=0x2800" ,CCN_IDX_MASK_OPCODE ),CCN_EVENT_HNI (txdatflits,"dir=1,vc=3" ,CCN_IDX_MASK_ANY ),CCN_EVENT_HNI (rxdatflits,"dir=0,vc=3" ,CCN_IDX_MASK_ANY ),CCN_EVENT_HNI (txreqflits,"dir=1,vc=0" ,CCN_IDX_MASK_ANY ),
@@ -757,6 +762,12 @@ static int arm_ccn_pmu_event_init(struct perf_event *event)/* Validate node/xp vs topology */ switch (type) { +case CCN_TYPE_MN : +if (node_xp != ccn->mn_id) { +dev_warn (ccn->dev,"Invalid MN ID %d!\n" , node_xp); +return -EINVAL ; + } +break ;case CCN_TYPE_XP :if (node_xp >= ccn->num_xps) {dev_warn (ccn->dev,"Invalid XP ID %d!\n" , node_xp);
@@ -884,6 +895,10 @@ static void arm_ccn_pmu_xp_dt_config(struct perf_event *event, int enable)struct arm_ccn_component *xp;u32 val, dt_cfg; +/* Nothing to do for cycle counter */ +if (hw->idx ==CCN_IDX_PMU_CYCLE_COUNTER ) +return ; +if (CCN_CONFIG_TYPE (event->attr.config) ==CCN_TYPE_XP ) xp = &ccn->xp[CCN_CONFIG_XP (event->attr.config)];else
@@ -986,7 +1001,7 @@ static void arm_ccn_pmu_xp_watchpoint_config(struct perf_event *event)/* Comparison values */ writel (cmp_l &0xffffffff , source->base +CCN_XP_DT_CMP_VAL_L (wp)); -writel ((cmp_l >>32 ) &0xefffffff , +writel ((cmp_l >>32 ) &0x7fffffff , source->base +CCN_XP_DT_CMP_VAL_L (wp) +4 );writel (cmp_h &0xffffffff , source->base +CCN_XP_DT_CMP_VAL_H (wp)); writel((cmp_h >> 32) & 0x0fffffff,
@@ -994,7 +1009,7 @@ static void arm_ccn_pmu_xp_watchpoint_config(struct perf_event *event)/* Mask */ writel (mask_l &0xffffffff , source->base +CCN_XP_DT_CMP_MASK_L (wp)); -writel ((mask_l >>32 ) &0xefffffff , +writel ((mask_l >>32 ) &0x7fffffff , source->base +CCN_XP_DT_CMP_MASK_L (wp) +4 );writel (mask_h &0xffffffff , source->base +CCN_XP_DT_CMP_MASK_H (wp)); writel((mask_h >> 32) & 0x0fffffff,
@@ -1369,6 +1384,8 @@ static int arm_ccn_init_nodes(struct arm_ccn *ccn, int region,switch (type) {case CCN_TYPE_MN : + ccn->mn_id = id; +return 0 ;case CCN_TYPE_DT :return 0 ;case CCN_TYPE_XP :
drivers/clocksource/sun4i_timer.c +8 -1
@@ -123,12 +123,16 @@ static struct clock_event_device sun4i_clockevent = { .set_next_event = sun4i_clkevt_next_event, }; +static void sun4i_timer_clear_interrupt (void ) +{ +writel (TIMER_IRQ_EN (0 ), timer_base +TIMER_IRQ_ST_REG ); +}static irqreturn_t sun4i_timer_interrupt (int irq,void *dev_id) {struct clock_event_device *evt = (struct clock_event_device *)dev_id; -writel (0x1 , timer_base +TIMER_IRQ_ST_REG ); +sun4i_timer_clear_interrupt (); evt->event_handler (evt);return IRQ_HANDLED ;
@@ -193,6 +197,9 @@ static void __init sun4i_timer_init(struct device_node *node)/* Make sure timer is stopped before playing with interrupts */ sun4i_clkevt_time_stop (0 ); +/* clear timer0 interrupt */ +sun4i_timer_clear_interrupt (); + sun4i_clockevent.cpumask = cpu_possible_mask; sun4i_clockevent.irq = irq;
drivers/firmware/efi/libstub/efi-stub-helper.c +139 -30
239 lines not on this page · raw message
drivers/firmware/efi/libstub/fdt.c +39 -15
96 lines not on this page · raw message
drivers/firmware/efi/libstub/random.c +10 -2
@@ -73,12 +73,20 @@ efi_status_t efi_random_alloc(efi_system_table_t *sys_table_arg, unsigned long random_seed) {unsigned long map_size, desc_size, total_slots =0 , target_slot; +unsigned long buff_size;efi_status_t status;efi_memory_desc_t *memory_map;int map_offset; +struct efi_boot_memmap map; - status =efi_get_memory_map (sys_table_arg, &memory_map, &map_size, - &desc_size,NULL ,NULL ); + map.map = &memory_map; + map.map_size = &map_size; + map.desc_size = &desc_size; + map.desc_ver =NULL ; + map.key_ptr =NULL ; + map.buff_size = &buff_size; + + status =efi_get_memory_map (sys_table_arg, &map);if (status !=EFI_SUCCESS )return status;
drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c +5 -5
@@ -320,19 +320,19 @@ atmel_hlcdc_plane_update_pos_and_size(struct atmel_hlcdc_plane *plane,u32 *coeff_tab = heo_upscaling_ycoef;u32 max_memsize; -if (state->crtc_w < state->src_w) +if (state->crtc_h < state->src_h) coeff_tab = heo_downscaling_ycoef;for (i =0 ; i <ARRAY_SIZE (heo_upscaling_ycoef); i++)atmel_hlcdc_layer_update_cfg (&plane->layer,33 + i,0xffffffff , coeff_tab[i]); - factor = ((8 *256 * state->src_w) - (256 *4 )) / - state->crtc_w; + factor = ((8 *256 * state->src_h) - (256 *4 )) / + state->crtc_h; factor++; - max_memsize = ((factor * state->crtc_w) + (256 *4 )) / + max_memsize = ((factor * state->crtc_h) + (256 *4 )) /2048 ; -if (max_memsize > state->src_w) +if (max_memsize > state->src_h) factor--; factor_reg |= (factor <<16 ) |0x80000000 ; }
drivers/gpu/drm/drm_ioc32.c +4 -0
@@ -1015,6 +1015,7 @@ static int compat_drm_wait_vblank(struct file *file, unsigned int cmd,return 0 ; } +#if defined(CONFIG_X86) || defined(CONFIG_IA64) typedef struct drm_mode_fb_cmd232 { u32 fb_id; u32 width;
@@ -1071,6 +1072,7 @@ static int compat_drm_mode_addfb2(struct file *file, unsigned int cmd,return 0 ; } +#endif static drm_ioctl_compat_t *drm_compat_ioctls[] = { [DRM_IOCTL_NR (DRM_IOCTL_VERSION32 )] = compat_drm_version,
@@ -1104,7 +1106,9 @@ static drm_ioctl_compat_t *drm_compat_ioctls[] = { [DRM_IOCTL_NR(DRM_IOCTL_UPDATE_DRAW32)] = compat_drm_update_draw, #endif [DRM_IOCTL_NR(DRM_IOCTL_WAIT_VBLANK32)] = compat_drm_wait_vblank, +#if defined(CONFIG_X86) || defined(CONFIG_IA64) [DRM_IOCTL_NR(DRM_IOCTL_MODE_ADDFB232)] = compat_drm_mode_addfb2, +#endif }; /**
drivers/gpu/drm/i915/i915_debugfs.c +2 -1
@@ -2100,9 +2100,10 @@ static int i915_dump_lrc(struct seq_file *m, void *unused)return ret;list_for_each_entry (ctx, &dev_priv->context_list, link) -if (ctx != dev_priv->kernel_context) +if (ctx != dev_priv->kernel_context) {for_each_engine (engine, dev_priv)i915_dump_lrc_obj (m, ctx, engine); + }mutex_unlock (&dev->struct_mutex);
drivers/gpu/drm/i915/intel_opregion.c +27 -0
@@ -1013,6 +1013,23 @@ err_out:return err; } +static int intel_use_opregion_panel_type_callback (const struct dmi_system_id *id) +{ +DRM_INFO ("Using panel type from OpRegion on %s\n" , id->ident); +return 1 ; +} + +static const struct dmi_system_id intel_use_opregion_panel_type[] = { + { + .callback = intel_use_opregion_panel_type_callback, + .ident ="Conrac GmbH IX45GM2" , + .matches = {DMI_MATCH (DMI_SYS_VENDOR ,"Conrac GmbH" ), +DMI_MATCH (DMI_PRODUCT_NAME ,"IX45GM2" ), + }, + }, + { } +}; +int intel_opregion_get_panel_type (struct drm_device *dev) {
@@ -1039,6 +1056,16 @@ intel_opregion_get_panel_type(struct drm_device *dev) }/* +* So far we know that some machined must use it, others must not use it. +* There doesn't seem to be any way to determine which way to go, except +* via a quirk list :( +*/ +if (!dmi_check_system (intel_use_opregion_panel_type)) { +DRM_DEBUG_KMS ("Ignoring OpRegion panel type (%d)\n" , ret -1 ); +return -ENODEV ; + } + +/* * FIXME On Dell XPS 13 9350 the OpRegion panel type (0) gives us * low vswing for eDP, whereas the VBT panel type (2) gives us normal * vswing instead. Low vswing results in some display flickers, so
drivers/gpu/drm/msm/msm_drv.h +6 -0
@@ -148,6 +148,12 @@ struct msm_drm_private { } vram;struct msm_vblank_ctrl vblank_ctrl; + +/* task holding struct_mutex.. currently only used in submit path +* to detect and reject faults from copy_from_user() for submit +* ioctl. +*/ +struct task_struct *struct_mutex_task; };struct msm_format {
drivers/gpu/drm/msm/msm_gem.c +9 -0
@@ -196,11 +196,20 @@ int msm_gem_fault(struct vm_area_struct *vma, struct vm_fault *vmf) {struct drm_gem_object *obj = vma->vm_private_data;struct drm_device *dev = obj->dev; +struct msm_drm_private *priv = dev->dev_private;struct page **pages;unsigned long pfn;pgoff_t pgoff;int ret; +/* This should only happen if userspace tries to pass a mmap'd +* but unfaulted gem bo vaddr into submit ioctl, triggering +* a page fault while struct_mutex is already held. This is +* not a valid use-case so just bail. +*/ +if (priv->struct_mutex_task == current) +return VM_FAULT_SIGBUS ; +/* Make sure we don't parallel update on a fault, nor move or remove * something from beneath our feet */
drivers/gpu/drm/msm/msm_gem_submit.c +2 -0
@@ -394,6 +394,7 @@ int msm_ioctl_gem_submit(struct drm_device *dev, void *data,return -ENOMEM ;mutex_lock (&dev->struct_mutex); + priv->struct_mutex_task = current; ret =submit_lookup_objects (submit, args, file);if (ret)
@@ -479,6 +480,7 @@ out:submit_cleanup (submit);if (ret)msm_gem_submit_free (submit); + priv->struct_mutex_task =NULL ;mutex_unlock (&dev->struct_mutex);return ret; }
drivers/iio/accel/bmc150-accel-core.c +11 -0
@@ -67,6 +67,9 @@#define BMC150_ACCEL_REG_PMU_BW 0x10#define BMC150_ACCEL_DEF_BW 125 +#define BMC150_ACCEL_REG_RESET 0x14 +#define BMC150_ACCEL_RESET_VAL 0xB6 +#define BMC150_ACCEL_REG_INT_MAP_0 0x19#define BMC150_ACCEL_INT_MAP_0_BIT_SLOPE BIT(2)
@@ -1497,6 +1500,14 @@ static int bmc150_accel_chip_init(struct bmc150_accel_data *data)int ret, i;unsigned int val; +/* +* Reset chip to get it in a known good state. A delay of 1.8ms after +* reset is required according to the data sheets of supported chips. +*/ +regmap_write (data->regmap,BMC150_ACCEL_REG_RESET , +BMC150_ACCEL_RESET_VAL ); +usleep_range (1800 ,2500 ); + ret =regmap_read (data->regmap,BMC150_ACCEL_REG_CHIP_ID , &val);if (ret <0 ) {dev_err (dev,"Error: Reading chip id\n" );
drivers/iio/accel/kxsd9.c +2 -0
@@ -160,11 +160,13 @@ static int kxsd9_read_raw(struct iio_dev *indio_dev,if (ret <0 ) goto error_ret; *val = ret; + ret =IIO_VAL_INT ;break ;case IIO_CHAN_INFO_SCALE : ret =spi_w8r8 (st->us,KXSD9_READ (KXSD9_REG_CTRL_C ));if (ret <0 ) goto error_ret; + *val =0 ; *val2 = kxsd9_micro_scales[ret &KXSD9_FS_MASK ]; ret =IIO_VAL_INT_PLUS_MICRO ;break ;
drivers/iio/adc/Kconfig +1 -0
@@ -377,6 +377,7 @@ config QCOM_SPMI_VADC config ROCKCHIP_SARADC tristate "Rockchip SARADC driver" depends on ARCH_ROCKCHIP || (ARM && COMPILE_TEST) + depends on RESET_CONTROLLER help Say yes here to build support for the SARADC found in SoCs from Rockchip.
drivers/iio/adc/ad799x.c +1 -0
@@ -533,6 +533,7 @@ static struct attribute_group ad799x_event_attrs_group = {static const struct iio_info ad7991_info = { .read_raw = &ad799x_read_raw, .driver_module =THIS_MODULE , + .update_scan_mode = ad799x_update_scan_mode, };static const struct iio_info ad7993_4_7_8_noirq_info = {
drivers/iio/adc/at91_adc.c +2 -2
@@ -381,8 +381,8 @@ static irqreturn_t at91_adc_rl_interrupt(int irq, void *private) st->ts_bufferedmeasure = false;input_report_key (st->ts_input,BTN_TOUCH ,0 );input_sync (st->ts_input); - }else if (status &AT91_ADC_EOC (3 )) { -/* Conversion finished */ + }else if (status &AT91_ADC_EOC (3 ) && st->ts_input) { +/* Conversion finished and we've a touchscreen */ if (st->ts_bufferedmeasure) {/* * Last measurement is always discarded, since it can
drivers/iio/adc/rockchip_saradc.c +30 -0
@@ -21,6 +21,8 @@#include <linux/of_device.h> #include <linux/clk.h> #include <linux/completion.h> +#include <linux/delay.h> +#include <linux/reset.h> #include <linux/regulator/consumer.h> #include <linux/iio/iio.h>
@@ -53,6 +55,7 @@ struct rockchip_saradc {struct clk *clk;struct completion completion;struct regulator *vref; +struct reset_control *reset;const struct rockchip_saradc_data *data;u16 last_val; };
@@ -190,6 +193,16 @@ static const struct of_device_id rockchip_saradc_match[] = { };MODULE_DEVICE_TABLE (of, rockchip_saradc_match); +/** +* Reset SARADC Controller. +*/ +static void rockchip_saradc_reset_controller (struct reset_control *reset) +{ +reset_control_assert (reset); +usleep_range (10 ,20 ); +reset_control_deassert (reset); +} +static int rockchip_saradc_probe (struct platform_device *pdev) {struct rockchip_saradc *info =NULL ;
@@ -218,6 +231,20 @@ static int rockchip_saradc_probe(struct platform_device *pdev)if (IS_ERR (info->regs))return PTR_ERR (info->regs); +/* +* The reset should be an optional property, as it should work +* with old devicetrees as well +*/ + info->reset =devm_reset_control_get (&pdev->dev,"saradc-apb" ); +if (IS_ERR (info->reset)) { + ret =PTR_ERR (info->reset); +if (ret != -ENOENT ) +return ret; + +dev_dbg (&pdev->dev,"no reset control found\n" ); + info->reset =NULL ; + } +init_completion (&info->completion); irq =platform_get_irq (pdev,0 );
@@ -252,6 +279,9 @@ static int rockchip_saradc_probe(struct platform_device *pdev)return PTR_ERR (info->vref); } +if (info->reset) +rockchip_saradc_reset_controller (info->reset); +/* * Use a default value for the converter clock. * This may become user-configurable in the future.
drivers/iio/adc/ti-ads1015.c +2 -1
@@ -403,7 +403,8 @@ static const struct iio_info ads1015_info = {#ifdef CONFIG_OF static int ads1015_get_channels_config_of (struct i2c_client *client) { -struct ads1015_data *data =i2c_get_clientdata (client); +struct iio_dev *indio_dev =i2c_get_clientdata (client); +struct ads1015_data *data =iio_priv (indio_dev);struct device_node *node; if (!client->dev.of_node ||
drivers/iio/adc/ti_am335x_adc.c +12 -4
@@ -32,6 +32,7 @@struct tiadc_device {struct ti_tscadc_dev *mfd_tscadc; +struct mutex fifo1_lock;/* to protect fifo access */ int channels;u8 channel_line[8 ];u8 channel_step[8 ];
@@ -360,6 +361,7 @@ static int tiadc_read_raw(struct iio_dev *indio_dev, int *val, int *val2, long mask) { struct tiadc_device *adc_dev = iio_priv(indio_dev); +int ret =IIO_VAL_INT ;int i, map_val;unsigned int fifo1count, read, stepid;bool found = false;
@@ -373,13 +375,14 @@ static int tiadc_read_raw(struct iio_dev *indio_dev,if (!step_en)return -EINVAL ; +mutex_lock (&adc_dev->fifo1_lock); fifo1count =tiadc_readl (adc_dev,REG_FIFO1CNT );while (fifo1count--)tiadc_readl (adc_dev,REG_FIFO1 );am335x_tsc_se_set_once (adc_dev->mfd_tscadc, step_en); - timeout = jiffies +usecs_to_jiffies + timeout = jiffies +msecs_to_jiffies (IDLE_TIMEOUT * adc_dev->channels);/* Wait for Fifo threshold interrupt */ while (1 ) {
@@ -389,7 +392,8 @@ static int tiadc_read_raw(struct iio_dev *indio_dev,if (time_after (jiffies, timeout)) {am335x_tsc_se_adc_done (adc_dev->mfd_tscadc); -return -EAGAIN ; + ret = -EAGAIN ; + goto err_unlock; } } map_val = adc_dev->channel_step[chan->scan_index];
@@ -415,8 +419,11 @@ static int tiadc_read_raw(struct iio_dev *indio_dev,am335x_tsc_se_adc_done (adc_dev->mfd_tscadc);if (found == false) -return -EBUSY ; -return IIO_VAL_INT ; + ret = -EBUSY ; + +err_unlock: +mutex_unlock (&adc_dev->fifo1_lock); +return ret; }static const struct iio_info tiadc_info = {
@@ -485,6 +492,7 @@ static int tiadc_probe(struct platform_device *pdev)tiadc_step_config (indio_dev);tiadc_writel (adc_dev,REG_FIFO1THR ,FIFO1_THRESHOLD ); +mutex_init (&adc_dev->fifo1_lock); err =tiadc_channel_init (indio_dev, adc_dev->channels);if (err <0 )
drivers/iio/common/hid-sensors/hid-sensor-attributes.c +2 -2
@@ -56,8 +56,8 @@ static struct { {HID_USAGE_SENSOR_ALS, 0, 1, 0}, {HID_USAGE_SENSOR_ALS, HID_USAGE_SENSOR_UNITS_LUX, 1, 0}, - {HID_USAGE_SENSOR_PRESSURE, 0, 100000, 0}, - {HID_USAGE_SENSOR_PRESSURE, HID_USAGE_SENSOR_UNITS_PASCAL, 1, 0}, + {HID_USAGE_SENSOR_PRESSURE, 0, 100, 0}, + {HID_USAGE_SENSOR_PRESSURE, HID_USAGE_SENSOR_UNITS_PASCAL, 0, 1000}, };static int pow_10 (unsigned power)
drivers/iio/humidity/am2315.c +1 -1
@@ -244,7 +244,7 @@ static int am2315_probe(struct i2c_client *client, indio_dev->channels = am2315_channels; indio_dev->num_channels =ARRAY_SIZE (am2315_channels); - ret =iio_triggered_buffer_setup (indio_dev,NULL , + ret =iio_triggered_buffer_setup (indio_dev, iio_pollfunc_store_time, am2315_trigger_handler,NULL );if (ret <0 ) {dev_err (&client->dev,"iio triggered buffer setup failed\n" );
drivers/iio/humidity/hdc100x.c +7 -20
@@ -142,7 +142,7 @@ static int hdc100x_get_measurement(struct hdc100x_data *data,struct i2c_client *client = data->client;int delay = data->adc_int_us[chan->address];int ret; -int val; +__be16 val;/* start measurement */ ret =i2c_smbus_write_byte (client, chan->address);
@@ -154,26 +154,13 @@ static int hdc100x_get_measurement(struct hdc100x_data *data,/* wait for integration time to pass */ usleep_range (delay, delay +1000 ); -/* -* i2c_smbus_read_word_data cannot() be used here due to the command -* value not being understood and causes NAKs preventing any reading -* from being accessed. -*/ - ret =i2c_smbus_read_byte (client); +/* read measurement */ + ret =i2c_master_recv (data->client, (char *)&val,sizeof (val));if (ret <0 ) { -dev_err (&client->dev,"cannot read high byte measurement" ); +dev_err (&client->dev,"cannot read sensor data\n" );return ret; } - val = ret <<8 ; - - ret =i2c_smbus_read_byte (client); -if (ret <0 ) { -dev_err (&client->dev,"cannot read low byte measurement" ); -return ret; - } - val |= ret; - -return val; +return be16_to_cpu (val); }static int hdc100x_get_heater_status (struct hdc100x_data *data)
@@ -272,8 +259,8 @@ static int hdc100x_probe(struct i2c_client *client,struct iio_dev *indio_dev;struct hdc100x_data *data; -if (!i2c_check_functionality (client->adapter, -I2C_FUNC_SMBUS_WORD_DATA |I2C_FUNC_SMBUS_BYTE )) +if (!i2c_check_functionality (client->adapter,I2C_FUNC_SMBUS_WORD_DATA | +I2C_FUNC_SMBUS_BYTE |I2C_FUNC_I2C ))return -EOPNOTSUPP ; indio_dev =devm_iio_device_alloc (&client->dev,sizeof (*data));
drivers/iio/industrialio-buffer.c +2 -2
@@ -110,7 +110,7 @@ ssize_t iio_buffer_read_first_n_outer(struct file *filp, char __user *buf,DEFINE_WAIT_FUNC (wait, woken_wake_function);size_t datum_size;size_t to_wait; -int ret; +int ret =0 ;if (!indio_dev->info)return -ENODEV ;
@@ -153,7 +153,7 @@ ssize_t iio_buffer_read_first_n_outer(struct file *filp, char __user *buf, ret = rb->access->read_first_n (rb, n, buf);if (ret ==0 && (filp->f_flags &O_NONBLOCK )) ret = -EAGAIN ; - }while (ret ==0 ); + }while (ret ==0 );remove_wait_queue (&rb->pollq, &wait);return ret;
drivers/iio/industrialio-core.c +2 -3
@@ -532,9 +532,8 @@ ssize_t iio_format_value(char *buf, unsigned int type, int size, int *vals)return sprintf (buf,"%d.%09u\n" , vals[0 ], vals[1 ]);case IIO_VAL_FRACTIONAL : tmp =div_s64 ((s64 )vals[0 ] *1000000000LL , vals[1 ]); - vals[1 ] =do_div (tmp,1000000000LL ); - vals[0 ] = tmp; -return sprintf (buf,"%d.%09u\n" , vals[0 ], vals[1 ]); + vals[0 ] = (int )div_s64_rem (tmp,1000000000 , &vals[1 ]); +return sprintf (buf,"%d.%09u\n" , vals[0 ],abs (vals[1 ]));case IIO_VAL_FRACTIONAL_LOG2 : tmp = (s64 )vals[0 ] *1000000000LL >> vals[1 ]; vals[1 ] =do_div (tmp,1000000000LL );
drivers/iio/proximity/as3935.c +1 -1
@@ -392,7 +392,7 @@ static int as3935_probe(struct spi_device *spi)return ret; } - ret =iio_triggered_buffer_setup (indio_dev,NULL , + ret =iio_triggered_buffer_setup (indio_dev, iio_pollfunc_store_time, &as3935_trigger_handler,NULL );if (ret) {
drivers/infiniband/core/uverbs.h +1 -0
@@ -116,6 +116,7 @@ struct ib_uverbs_event_file {struct ib_uverbs_file {struct kref ref;struct mutex mutex; +struct mutex cleanup_mutex;/* protect cleanup */ struct ib_uverbs_device *device;struct ib_ucontext *ucontext;struct ib_event_handler event_handler;
drivers/infiniband/core/uverbs_main.c +24 -13
@@ -931,6 +931,7 @@ static int ib_uverbs_open(struct inode *inode, struct file *filp) file->async_file =NULL ;kref_init (&file->ref);mutex_init (&file->mutex); +mutex_init (&file->cleanup_mutex); filp->private_data = file;kobject_get (&dev->kobj);
@@ -956,18 +957,20 @@ static int ib_uverbs_close(struct inode *inode, struct file *filp) {struct ib_uverbs_file *file = filp->private_data;struct ib_uverbs_device *dev = file->device; -struct ib_ucontext *ucontext =NULL ; + +mutex_lock (&file->cleanup_mutex); +if (file->ucontext) { +ib_uverbs_cleanup_ucontext (file, file->ucontext); + file->ucontext =NULL ; + } +mutex_unlock (&file->cleanup_mutex);mutex_lock (&file->device->lists_mutex); - ucontext = file->ucontext; - file->ucontext =NULL ;if (!file->is_closed) {list_del (&file->list); file->is_closed =1 ; }mutex_unlock (&file->device->lists_mutex); -if (ucontext) -ib_uverbs_cleanup_ucontext (file, ucontext);if (file->async_file)kref_put (&file->async_file->ref, ib_uverbs_release_event_file);
@@ -1181,22 +1184,30 @@ static void ib_uverbs_free_hw_resources(struct ib_uverbs_device *uverbs_dev,mutex_lock (&uverbs_dev->lists_mutex);while (!list_empty (&uverbs_dev->uverbs_file_list)) {struct ib_ucontext *ucontext; - file =list_first_entry (&uverbs_dev->uverbs_file_list, struct ib_uverbs_file, list); file->is_closed =1 ; - ucontext = file->ucontext;list_del (&file->list); - file->ucontext =NULL ;kref_get (&file->ref);mutex_unlock (&uverbs_dev->lists_mutex); -/* We must release the mutex before going ahead and calling -* disassociate_ucontext. disassociate_ucontext might end up -* indirectly calling uverbs_close, for example due to freeing -* the resources (e.g mmput). -*/ +ib_uverbs_event_handler (&file->event_handler, &event); + +mutex_lock (&file->cleanup_mutex); + ucontext = file->ucontext; + file->ucontext =NULL ; +mutex_unlock (&file->cleanup_mutex); + +/* At this point ib_uverbs_close cannot be running +* ib_uverbs_cleanup_ucontext +*/ if (ucontext) { +/* We must release the mutex before going ahead and +* calling disassociate_ucontext. disassociate_ucontext +* might end up indirectly calling uverbs_close, +* for example due to freeing the resources +* (e.g mmput). +*/ ib_dev->disassociate_ucontext (ucontext);ib_uverbs_cleanup_ucontext (file, ucontext); }
drivers/infiniband/hw/hfi1/debugfs.c +9 -5
@@ -223,28 +223,32 @@ DEBUGFS_SEQ_FILE_OPEN(ctx_stats)DEBUGFS_FILE_OPS (ctx_stats);static void *_qp_stats_seq_start (struct seq_file *s,loff_t *pos) -__acquires (RCU ) +__acquires (RCU ) {struct qp_iter *iter;loff_t n = *pos; -rcu_read_lock (); iter =qp_iter_init (s->private); + +/* stop calls rcu_read_unlock */ +rcu_read_lock (); +if (!iter)return NULL ; -while (n--) { +do {if (qp_iter_next (iter)) {kfree (iter);return NULL ; } - } + }while (n--);return iter; }static void *_qp_stats_seq_next (struct seq_file *s,void *iter_ptr,loff_t *pos) +__must_hold (RCU ) {struct qp_iter *iter = iter_ptr;
@@ -259,7 +263,7 @@ static void *_qp_stats_seq_next(struct seq_file *s, void *iter_ptr, }static void _qp_stats_seq_stop (struct seq_file *s,void *iter_ptr) -__releases (RCU ) +__releases (RCU ) {rcu_read_unlock (); }
drivers/infiniband/hw/hfi1/platform.c +5 -1
@@ -638,9 +638,13 @@ static int tune_active_qsfp(struct hfi1_pportdata *ppd, u32 *ptr_tx_preset,if (ret)return ret; +/* +* We'll change the QSFP memory contents from here on out, thus we set a +* flag here to remind ourselves to reset the QSFP module. This prevents +* reuse of stale settings established in our previous pass through. +*/ if (ppd->qsfp_info.reset_needed) {reset_qsfp (ppd); - ppd->qsfp_info.reset_needed =0 ;refresh_qsfp_cache (ppd, &ppd->qsfp_info); }else { ppd->qsfp_info.reset_needed =1 ;
drivers/infiniband/hw/hfi1/qp.c +0 -4
@@ -595,10 +595,6 @@ struct qp_iter *qp_iter_init(struct hfi1_ibdev *dev) iter->dev = dev; iter->specials = dev->rdi.ibdev.phys_port_cnt *2 ; -if (qp_iter_next (iter)) { -kfree (iter); -return NULL ; - }return iter; }
drivers/infiniband/hw/qib/qib_debugfs.c +9 -3
@@ -189,27 +189,32 @@ static int _ctx_stats_seq_show(struct seq_file *s, void *v)DEBUGFS_FILE (ctx_stats) static void *_qp_stats_seq_start(struct seq_file *s, loff_t *pos) +__acquires (RCU ) {struct qib_qp_iter *iter;loff_t n = *pos; -rcu_read_lock (); iter =qib_qp_iter_init (s->private); + +/* stop calls rcu_read_unlock */ +rcu_read_lock (); +if (!iter)return NULL ; -while (n--) { +do {if (qib_qp_iter_next (iter)) {kfree (iter);return NULL ; } - } + }while (n--);return iter; }static void *_qp_stats_seq_next (struct seq_file *s,void *iter_ptr,loff_t *pos) +__must_hold (RCU ) {struct qib_qp_iter *iter = iter_ptr;
@@ -224,6 +229,7 @@ static void *_qp_stats_seq_next(struct seq_file *s, void *iter_ptr, }static void _qp_stats_seq_stop (struct seq_file *s,void *iter_ptr) +__releases (RCU ) {rcu_read_unlock (); }
drivers/infiniband/hw/qib/qib_qp.c +0 -4
@@ -530,10 +530,6 @@ struct qib_qp_iter *qib_qp_iter_init(struct qib_ibdev *dev)return NULL ; iter->dev = dev; -if (qib_qp_iter_next (iter)) { -kfree (iter); -return NULL ; - }return iter; }
drivers/iommu/dmar.c +2 -1
@@ -1871,10 +1871,11 @@ static int dmar_hp_remove_drhd(struct acpi_dmar_header *header, void *arg)/* * All PCI devices managed by this unit should have been destroyed. */ -if (!dmaru->include_all && dmaru->devices && dmaru->devices_cnt) +if (!dmaru->include_all && dmaru->devices && dmaru->devices_cnt) {for_each_active_dev_scope (dmaru->devices, dmaru->devices_cnt, i, dev)return -EBUSY ; + } ret =dmar_ir_hotplug (dmaru, false);if (ret ==0 )
drivers/iommu/intel-iommu.c +2 -1
@@ -4272,10 +4272,11 @@ int dmar_check_one_atsr(struct acpi_dmar_header *hdr, void *arg)if (!atsru)return 0 ; -if (!atsru->include_all && atsru->devices && atsru->devices_cnt) +if (!atsru->include_all && atsru->devices && atsru->devices_cnt) {for_each_active_dev_scope (atsru->devices, atsru->devices_cnt, i, dev)return -EBUSY ; + }return 0 ; }
drivers/irqchip/irq-atmel-aic.c +3 -2
@@ -176,6 +176,7 @@ static int aic_irq_domain_xlate(struct irq_domain *d, {struct irq_domain_chip_generic *dgc = d->gc;struct irq_chip_generic *gc; +unsigned long flags;unsigned smr;int idx;int ret;
@@ -194,11 +195,11 @@ static int aic_irq_domain_xlate(struct irq_domain *d, gc = dgc->gc[idx]; -irq_gc_lock (gc); +irq_gc_lock_irqsave (gc, flags); smr =irq_reg_readl (gc,AT91_AIC_SMR (*out_hwirq));aic_common_set_priority (intspec[2 ], &smr);irq_reg_writel (gc, smr,AT91_AIC_SMR (*out_hwirq)); -irq_gc_unlock (gc); +irq_gc_unlock_irqrestore (gc, flags);return ret; }
drivers/irqchip/irq-atmel-aic5.c +3 -2
@@ -258,6 +258,7 @@ static int aic5_irq_domain_xlate(struct irq_domain *d, unsigned int *out_type) {struct irq_chip_generic *bgc =irq_get_domain_generic_chip (d,0 ); +unsigned long flags;unsigned smr;int ret;
@@ -269,12 +270,12 @@ static int aic5_irq_domain_xlate(struct irq_domain *d,if (ret)return ret; -irq_gc_lock (bgc); +irq_gc_lock_irqsave (bgc, flags);irq_reg_writel (bgc, *out_hwirq,AT91_AIC5_SSR ); smr =irq_reg_readl (bgc,AT91_AIC5_SMR );aic_common_set_priority (intspec[2 ], &smr);irq_reg_writel (bgc, smr,AT91_AIC5_SMR ); -irq_gc_unlock (bgc); +irq_gc_unlock_irqrestore (bgc, flags);return ret; }
drivers/md/dm-crypt.c +8 -1
@@ -1453,7 +1453,7 @@ static int crypt_alloc_tfms(struct crypt_config *cc, char *ciphermode)unsigned i;int err; - cc->tfms =kmalloc (cc->tfms_count *sizeof (struct crypto_skcipher *), + cc->tfms =kzalloc (cc->tfms_count *sizeof (struct crypto_skcipher *),GFP_KERNEL );if (!cc->tfms)return -ENOMEM ;
@@ -1923,6 +1923,13 @@ static int crypt_map(struct dm_target *ti, struct bio *bio)return DM_MAPIO_REMAPPED ; } +/* +* Check if bio is too large, split as needed. +*/ +if (unlikely (bio->bi_iter.bi_size > (BIO_MAX_PAGES <<PAGE_SHIFT )) && +bio_data_dir (bio) ==WRITE ) +dm_accept_partial_bio (bio, ((BIO_MAX_PAGES <<PAGE_SHIFT ) >>SECTOR_SHIFT )); + io =dm_per_bio_data (bio, cc->per_bio_data_size);crypt_io_init (io, cc, bio,dm_target_offset (ti, bio->bi_iter.bi_sector)); io->ctx.req = (struct skcipher_request *)(io +1 );
drivers/md/dm-flakey.c +16 -11
@@ -289,15 +289,13 @@ static int flakey_map(struct dm_target *ti, struct bio *bio) pb->bio_submitted = true;/* -* Map reads as normal only if corrupt_bio_byte set. +* Error reads if neither corrupt_bio_byte or drop_writes are set. +* Otherwise, flakey_end_io() will decide if the reads should be modified. */ if (bio_data_dir (bio) ==READ ) { -/* If flags were specified, only corrupt those that match. */ -if (fc->corrupt_bio_byte && (fc->corrupt_bio_rw ==READ ) && -all_corrupt_bio_flags_match (bio, fc)) - goto map_bio; -else +if (!fc->corrupt_bio_byte && !test_bit (DROP_WRITES , &fc->flags))return -EIO ; + goto map_bio; }/*
@@ -334,14 +332,21 @@ static int flakey_end_io(struct dm_target *ti, struct bio *bio, int error)struct flakey_c *fc = ti->private;struct per_bio_data *pb =dm_per_bio_data (bio,sizeof (struct per_bio_data )); -/* -* Corrupt successful READs while in down state. -*/ if (!error && pb->bio_submitted && (bio_data_dir (bio) ==READ )) { -if (fc->corrupt_bio_byte) +if (fc->corrupt_bio_byte && (fc->corrupt_bio_rw ==READ ) && +all_corrupt_bio_flags_match (bio, fc)) { +/* +* Corrupt successful matching READs while in down state. +*/ corrupt_bio_data (bio, fc); -else + + }else if (!test_bit (DROP_WRITES , &fc->flags)) { +/* +* Error read during the down_interval if drop_writes +* wasn't configured. +*/ return -EIO ; + } }return error;
drivers/md/dm-log-writes.c +3 -3
@@ -258,12 +258,12 @@ static int log_one_block(struct log_writes_c *lc, goto out; sector++; +atomic_inc (&lc->io_blocks); bio =bio_alloc (GFP_KERNEL , block->vec_cnt);if (!bio) {DMERR ("Couldn't alloc log bio" ); goto error; } -atomic_inc (&lc->io_blocks); bio->bi_iter.bi_size =0 ; bio->bi_iter.bi_sector = sector; bio->bi_bdev = lc->logdev->bdev;
@@ -456,9 +456,9 @@ static int log_writes_ctr(struct dm_target *ti, unsigned int argc, char **argv) goto bad; } - ret = -EINVAL ; lc->log_kthread =kthread_run (log_writes_kthread, lc,"log-write" ); -if (!lc->log_kthread) { +if (IS_ERR (lc->log_kthread)) { + ret =PTR_ERR (lc->log_kthread); ti->error ="Couldn't alloc kthread" ;dm_put_device (ti, lc->dev);dm_put_device (ti, lc->logdev);
drivers/md/md.c +4 -8
@@ -7599,16 +7599,12 @@ EXPORT_SYMBOL(unregister_md_cluster_operations);int md_setup_cluster (struct mddev *mddev,int nodes) { -int err; - - err =request_module ("md-cluster" ); -if (err) { -pr_err ("md-cluster module not found.\n" ); -return -ENOENT ; - } - +if (!md_cluster_ops) +request_module ("md-cluster" );spin_lock (&pers_lock); +/* ensure module won't be unloaded */ if (!md_cluster_ops || !try_module_get (md_cluster_mod)) { +pr_err ("can't find md-cluster module or get it's reference.\n" );spin_unlock (&pers_lock);return -ENOENT ; }
drivers/memory/omap-gpmc.c +7 -14
@@ -2250,7 +2250,7 @@ static int gpmc_probe_dt(struct platform_device *pdev)return 0 ; } -static int gpmc_probe_dt_children (struct platform_device *pdev) +static void gpmc_probe_dt_children (struct platform_device *pdev) {int ret;struct device_node *child;
@@ -2265,11 +2265,11 @@ static int gpmc_probe_dt_children(struct platform_device *pdev) else ret =gpmc_probe_generic_child (pdev, child); -if (ret) - return ret; +if (ret) { +dev_err (&pdev->dev,"failed to probe DT child '%s': %d\n" , + child->name, ret); + } } - -return 0 ; }#else static int gpmc_probe_dt (struct platform_device *pdev)
@@ -2277,9 +2277,8 @@ static int gpmc_probe_dt(struct platform_device *pdev) return 0; } -static int gpmc_probe_dt_children (struct platform_device *pdev) +static void gpmc_probe_dt_children (struct platform_device *pdev) { -return 0 ; }#endif
@@ -2372,16 +2371,10 @@ static int gpmc_probe(struct platform_device *pdev) goto setup_irq_failed; } - rc =gpmc_probe_dt_children (pdev); -if (rc <0 ) { -dev_err (gpmc->dev,"failed to probe DT children\n" ); - goto dt_children_failed; - } +gpmc_probe_dt_children (pdev);return 0 ; -dt_children_failed: -gpmc_free_irq (gpmc); setup_irq_failed:gpmc_gpio_exit (gpmc); gpio_init_failed:
drivers/mmc/host/sdhci-st.c +14 -1
@@ -28,6 +28,7 @@struct st_mmc_platform_data {struct reset_control *rstc; +struct clk *icnclk;void __iomem *top_ioaddr; };
@@ -353,7 +354,7 @@ static int sdhci_st_probe(struct platform_device *pdev)struct sdhci_host *host;struct st_mmc_platform_data *pdata;struct sdhci_pltfm_host *pltfm_host; -struct clk *clk; +struct clk *clk, *icnclk;int ret =0 ;u16 host_version;struct resource *res;
@@ -365,6 +366,11 @@ static int sdhci_st_probe(struct platform_device *pdev)return PTR_ERR (clk); } +/* ICN clock isn't compulsory, but use it if it's provided. */ + icnclk =devm_clk_get (&pdev->dev,"icn" ); +if (IS_ERR (icnclk)) + icnclk =NULL ; + rstc =devm_reset_control_get (&pdev->dev,NULL );if (IS_ERR (rstc)) rstc =NULL ;
@@ -389,6 +395,7 @@ static int sdhci_st_probe(struct platform_device *pdev) }clk_prepare_enable (clk); +clk_prepare_enable (icnclk);/* Configure the FlashSS Top registers for setting eMMC TX/RX delay */ res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
@@ -400,6 +407,7 @@ static int sdhci_st_probe(struct platform_device *pdev) } pltfm_host->clk = clk; + pdata->icnclk = icnclk;/* Configure the Arasan HC inside the flashSS */ st_mmcss_cconfig (np, host);
@@ -422,6 +430,7 @@ static int sdhci_st_probe(struct platform_device *pdev)return 0 ; err_out: +clk_disable_unprepare (icnclk);clk_disable_unprepare (clk); err_of:sdhci_pltfm_free (pdev);
@@ -442,6 +451,8 @@ static int sdhci_st_remove(struct platform_device *pdev) ret =sdhci_pltfm_unregister (pdev); +clk_disable_unprepare (pdata->icnclk); +if (rstc)reset_control_assert (rstc);
@@ -462,6 +473,7 @@ static int sdhci_st_suspend(struct device *dev)if (pdata->rstc)reset_control_assert (pdata->rstc);
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/broadcom/bnxt/bnxt.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/cavium/thunder/nic_reg.h +0 -1
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/cavium/thunder/nicvf_ethtool.c +4 -1
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/mellanox/mlx5/core/cmd.c +54 -31
85 lines not on this page · raw message
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c +15 -7
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/mellanox/mlx5/core/main.c +29 -30
59 lines not on this page · raw message
drivers/net/ethernet/smsc/smc91x.h +45 -20
65 lines not on this page · raw message
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/net/wireless/intel/iwlegacy/3945.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/pinctrl/sunxi/pinctrl-sun8i-a23.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/pinctrl/sunxi/pinctrl-sun8i-a33.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/tty/serial/8250/8250_pci.c +139 -0
139 lines not on this page · raw message
fs/nfs/flexfilelayout/flexfilelayout.c +18 -19
Lines of this file are not shown. View the raw message.
fs/nfs/flexfilelayout/flexfilelayoutdev.c +10 -9
Lines of this file are not shown. View the raw message.
mm/page_alloc.c +2 -48
50 lines not on this page · raw message
net/core/filter.c +18 -52
70 lines not on this page · raw message
net/unix/af_unix.c +49 -62
111 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.