Linux 4.4.22
Greg KH
maintainerI'm announcing the release of the 4.4.22 kernel.
All users of the 4.4 kernel series must upgrade.
The updated 4.4.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.4.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
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/pgtable.h | 3 arch/arc/include/asm/uaccess.h | 11 arch/arm/boot/dts/imx6qdl.dtsi | 2 arch/arm/boot/dts/kirkwood-ib62x0.dts | 2 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/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/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/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/mm/slb_low.S | 7 arch/powerpc/platforms/powernv/opal-dump.c | 7 arch/powerpc/platforms/powernv/opal-elog.c | 7 arch/s390/include/asm/uaccess.h | 8 arch/score/include/asm/uaccess.h | 46 +-- 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/configs/tiny.config | 2 arch/x86/include/asm/uaccess.h | 6 arch/x86/kernel/cpu/amd.c | 12 arch/x86/kernel/paravirt.c | 4 arch/x86/kvm/x86.c | 1 crypto/cryptd.c | 9 drivers/bus/arm-ccn.c | 27 + drivers/clocksource/sun4i_timer.c | 9 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 10 drivers/gpu/drm/drm_ioc32.c | 4 drivers/gpu/drm/gma500/cdv_intel_dp.c | 2 drivers/gpu/drm/i915/intel_display.c | 16 - drivers/gpu/drm/i915/intel_drv.h | 6 drivers/gpu/drm/i915/intel_sprite.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_am335x_adc.c | 16 - drivers/iio/common/hid-sensors/hid-sensor-attributes.c | 4 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/irqchip/irq-atmel-aic.c | 5 drivers/irqchip/irq-atmel-aic5.c | 5 drivers/lightnvm/rrpc.c | 4 drivers/md/dm-crypt.c | 7 drivers/md/dm-flakey.c | 27 + drivers/md/dm-log-writes.c | 6 drivers/md/md.c | 12 drivers/mmc/host/dw_mmc-pltfm.c | 2 drivers/mmc/host/dw_mmc.c | 2 drivers/net/ethernet/cavium/thunder/nic_reg.h | 1 drivers/net/ethernet/cavium/thunder/nicvf_ethtool.c | 5 drivers/net/wireless/ath/ath9k/main.c | 8 drivers/pinctrl/pinctrl-at91-pio4.c | 2 drivers/pinctrl/pinctrl-pistachio.c | 12 drivers/pinctrl/sunxi/pinctrl-sun8i-a23.c | 4 drivers/pinctrl/sunxi/pinctrl-sun8i-a33.c | 4 drivers/soc/qcom/spm.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/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/ext4/crypto_policy.c | 3 fs/ext4/ioctl.c | 6 fs/ext4/mballoc.c | 47 ++- fs/f2fs/crypto_policy.c | 3 fs/fuse/file.c | 7 fs/kernfs/file.c | 28 +- fs/nfs/callback.c | 1 fs/nfs/nfs4proc.c | 12 fs/nfs/pnfs.c | 4 fs/nfsd/nfs4state.c | 40 +- fs/proc/base.c | 7 include/asm-generic/uaccess.h | 20 - include/linux/irq.h | 10 include/linux/mfd/ti_am335x_tscadc.h | 8 include/linux/mm.h | 1 include/linux/mmc/dw_mmc.h | 2 include/linux/netdevice.h | 11 include/linux/uio.h | 2 kernel/audit_watch.c | 8 kernel/configs/tiny.config | 8 kernel/cpuset.c | 15 + kernel/fork.c | 23 + kernel/irq/msi.c | 1 kernel/kexec_file.c | 3 kernel/sched/core.c | 22 + lib/iov_iter.c | 24 - net/ipv6/addrconf.c | 2 net/tipc/link.c | 2 net/tipc/name_distr.c | 1 net/tipc/udp_media.c | 5 net/wireless/wext-core.c | 25 - 132 files changed, 886 insertions(+), 449 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
Alison Schofield (1):
iio: proximity: as3935: set up buffer timestamps for non-zero values
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
Arnd Bergmann (5):
mmc: dw_mmc: use resource_size_t to store physical address
pinctrl: at91-pio4: use %pr format string for resource
soc: qcom/spm: shut up uninitialized variable warning
kconfig: tinyconfig: provide whole choice blocks to avoid warnings
net: simplify napi_synchronize() to avoid warnings
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 (1):
iio: adc: rockchip_saradc: reset saradc controller before programming it
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
Chuck Lever (1):
nfsd: Close race between nfsd4_release_lockowner and nfsd4_lock
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
Daniele Palmas (1):
USB: serial: simple: add support for another Infineon flashloader
David Daney (1):
net: thunderx: Fix OOPs with ethtool --register-dump
Emanuel Czirai (1):
x86/AMD: Apply erratum 665 on machines without a BIOS fix
Eric Biggers (2):
fscrypto: add authorization check for setting encryption policy
fscrypto: require write access to mount to set encryption policy
Fabio Estevam (1):
ARM: dts: imx6qdl: Fix SPDIF regression
Felix Fietkau (1):
ath9k: fix using sta->drv_priv before initializing it
Greg Kroah-Hartman (1):
Linux 4.4.22
Gregor Boirie (1):
iio:core: fix IIO_VAL_FRACTIONAL sign handling
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
Icenowy Zheng (1):
pinctrl: sunxi: fix uart1 CTS/RTS pins at PG on A23/A33
James Hartley (1):
pinctrl: pistachio: fix mfio pll_lock pinmux
James Hogan (1):
MIPS: KVM: Check for pfn noslot case
Jan Leupold (1):
drm: atmel-hlcdc: Fix vertical scaling
Jason Gunthorpe (1):
IB/uverbs: Fix race between uverbs_close and remove_one
Jimi Damon (1):
serial: 8250: added acces i/o products quad and octal serial cards
Johan Hovold (2):
ARM: dts: overo: fix gpmc nand cs0 range
ARM: dts: overo: fix gpmc nand on boards with ethernet
Johannes Berg (1):
Revert "wext: Fix 32 bit iwpriv compatibility issue with 64 bit Kernel"
Jon Paul Maloy (1):
tipc: move linearization of buffers to generic code
Keerthy (1):
ARM: AM43XX: hwmod: Fix RSTST register offset for pruss
Konstantin Khlebnikov (1):
ext4: use __GFP_NOFAIL in ext4_free_blocks()
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
Lars-Peter Clausen (1):
iio: ad799x: Fix buffered capture for ad7991/ad7995/ad7999
Lee Jones (2):
ARM: dts: STiH410: Handle interconnect clock required by EHCI/OHCI (USB)
ARM: dts: STiH407-family: Provide interconnect clock for consumption in ST SDHCI
Linus Torvalds (1):
gma500: remove annoying deprecation warning
Linus Walleij (2):
iio: accel: kxsd9: Fix raw read return
iio: accel: kxsd9: Fix scaling bug
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
Mika Kuoppala (1):
drm/i915: Avoid pointer arithmetic in calculating plane surface offset
Mike Danese (1):
mpssd: fix buffer overflow warning
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
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
Paolo Bonzini (1):
Revert "KVM: x86: fix missed hardware breakpoints"
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
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
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 (4):
pNFS: The client must not do I/O to the DS if it's lease has expired 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
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
Vineet Gupta (2):
ARC: mm: fix build breakage with STRICT_MM_TYPECHECKS
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
Wei Yongjun (1):
ipv6: addrconf: fix dev refcont leak when DAD failed
Wenwei Tao (1):
lightnvm: put bio before return
Will Deacon (1):
arm64: spinlocks: implement smp_mb__before_spinlock() as smp_mb()
Yoshihiro Shimoda (1):
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
@@ -12,6 +12,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";
@@ -19,6 +24,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 = 4 -SUBLEVEL = 21 +SUBLEVEL = 22 EXTRAVERSION = NAME = Blurry Fish Butt
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/pgtable.h +1 -2
@@ -277,8 +277,7 @@ static inline void pmd_set(pmd_t *pmdp, pte_t *ptep)#define mk_pte (page, prot) pfn_pte(page_to_pfn(page), prot)#define pte_pfn (pte) (pte_val(pte) >> PAGE_SHIFT) -#define pfn_pte (pfn, prot) (__pte(((pte_t)(pfn) << PAGE_SHIFT) | \ - pgprot_val(prot))) +#define pfn_pte (pfn, prot) (__pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot)))#define __pte_index (addr) (((addr) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1))/*
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/imx6qdl.dtsi +1 -1
@@ -221,7 +221,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/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 { linux,mtd-name= "micron,mt29c4g96maz";
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/stih407-family.dtsi +6 -4
@@ -497,8 +497,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; };
@@ -512,8 +513,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
@@ -155,8 +155,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
@@ -1852,6 +1852,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
@@ -1474,6 +1474,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
@@ -723,8 +723,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/arm64/include/asm/spinlock.h +10 -0
@@ -312,4 +312,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
@@ -177,11 +177,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/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
@@ -152,7 +152,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
@@ -181,6 +181,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
@@ -245,13 +246,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
@@ -323,30 +323,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; }
@@ -437,10 +424,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
@@ -334,13 +334,13 @@ syscall_exit_work: 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,
@@ -348,8 +348,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/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/s390/include/asm/uaccess.h +4 -4
@@ -215,28 +215,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/score/include/asm/uaccess.h +24 -22
95 lines not on this page · raw message
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
@@ -328,8 +328,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/configs/tiny.config +2 -0
@@ -1 +1,3 @@ CONFIG_NOHIGHMEM=y +# CONFIG_HIGHMEM4G is not set +# CONFIG_HIGHMEM64G is not set
arch/x86/include/asm/uaccess.h +5 -1
@@ -394,7 +394,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
@@ -656,6 +656,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;
@@ -713,6 +724,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/x86.c +0 -1
@@ -2735,7 +2735,6 @@ void kvm_arch_vcpu_load(struct kvm_vcpu *vcpu, int cpu) }kvm_make_request (KVM_REQ_STEAL_UPDATE , vcpu); - vcpu->arch.switch_db_regs |=KVM_DEBUGREG_RELOAD ; }void kvm_arch_vcpu_put (struct kvm_vcpu *vcpu)
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/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,
@@ -1368,6 +1383,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/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c +5 -5
@@ -316,19 +316,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/gma500/cdv_intel_dp.c +1 -1
@@ -220,7 +220,7 @@ i2c_dp_aux_prepare_bus(struct i2c_adapter *adapter)* FIXME: This is the old dp aux helper, gma500 is the last driver that needs to * be ported over to the new helper code in drm_dp_helper.c like i915 or radeon. */ -static int __deprecated +static int i2c_dp_aux_add_bus (struct i2c_adapter *adapter) {int error;
drivers/gpu/drm/i915/intel_display.c +9 -7
@@ -2950,13 +2950,13 @@ u32 intel_fb_stride_alignment(struct drm_device *dev, uint64_t fb_modifier, } } -unsigned long intel_plane_obj_offset (struct intel_plane *intel_plane, -struct drm_i915_gem_object *obj, -unsigned int plane) +u32 intel_plane_obj_offset (struct intel_plane *intel_plane, +struct drm_i915_gem_object *obj, +unsigned int plane) {const struct i915_ggtt_view *view = &i915_ggtt_view_normal;struct i915_vma *vma; -unsigned char *offset; +u64 offset;if (intel_rotation_90_or_270 (intel_plane->base.state->rotation)) view = &i915_ggtt_view_rotated;
@@ -2966,14 +2966,16 @@ unsigned long intel_plane_obj_offset(struct intel_plane *intel_plane, view->type))return -1 ; - offset = (unsigned char *)vma->node.start; + offset = vma->node.start;if (plane ==1 ) { offset += vma->ggtt_view.rotation_info.uv_start_page *PAGE_SIZE ; } -return (unsigned long )offset; +WARN_ON (upper_32_bits (offset)); + +return lower_32_bits (offset); }static void skl_detach_scaler (struct intel_crtc *intel_crtc,int id)
@@ -3099,7 +3101,7 @@ static void skylake_update_primary_plane(struct drm_crtc *crtc,u32 tile_height, plane_offset, plane_size;unsigned int rotation;int x_offset, y_offset; -unsigned long surf_addr; +u32 surf_addr;struct intel_crtc_state *crtc_state = intel_crtc->config;struct intel_plane_state *plane_state;int src_x =0 , src_y =0 , src_w =0 , src_h =0 ;
drivers/gpu/drm/i915/intel_drv.h +3 -3
@@ -1177,9 +1177,9 @@ void intel_modeset_preclose(struct drm_device *dev, struct drm_file *file);int skl_update_scaler_crtc (struct intel_crtc_state *crtc_state);int skl_max_scale (struct intel_crtc *crtc,struct intel_crtc_state *crtc_state); -unsigned long intel_plane_obj_offset (struct intel_plane *intel_plane, -struct drm_i915_gem_object *obj, -unsigned int plane); +u32 intel_plane_obj_offset (struct intel_plane *intel_plane, +struct drm_i915_gem_object *obj, +unsigned int plane);u32 skl_plane_ctl_format (uint32_t pixel_format);u32 skl_plane_ctl_tiling (uint64_t fb_modifier);
drivers/gpu/drm/i915/intel_sprite.c +1 -1
@@ -195,7 +195,7 @@ skl_update_plane(struct drm_plane *drm_plane, struct drm_crtc *crtc,int pixel_size =drm_format_plane_cpp (fb->pixel_format,0 );const struct drm_intel_sprite_colorkey *key = &to_intel_plane_state (drm_plane->state)->ckey; -unsigned long surf_addr; +u32 surf_addr;u32 tile_height, plane_offset, plane_size;unsigned int rotation;int x_offset, y_offset;
drivers/iio/accel/bmc150-accel-core.c +11 -0
@@ -68,6 +68,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)
@@ -1487,6 +1490,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(data->dev,
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
@@ -306,6 +306,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; };
@@ -171,6 +174,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 ;
@@ -199,6 +212,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 );
@@ -233,6 +260,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_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/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
@@ -447,9 +447,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
@@ -922,6 +922,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);
@@ -947,18 +948,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);
@@ -1172,22 +1175,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/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,12 +195,12 @@ 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)); ret =aic_common_set_priority (intspec[2 ], &smr);if (!ret)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,13 +270,13 @@ 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 ); ret =aic_common_set_priority (intspec[2 ], &smr);if (!ret)irq_reg_writel (bgc, intspec[2 ] | smr,AT91_AIC5_SMR ); -irq_gc_unlock (bgc); +irq_gc_unlock_irqrestore (bgc, flags);return ret; }
drivers/lightnvm/rrpc.c +3 -1
@@ -287,8 +287,10 @@ static int rrpc_move_valid_pages(struct rrpc *rrpc, struct rrpc_block *rblk) } page =mempool_alloc (rrpc->page_pool,GFP_NOIO ); -if (!page) +if (!page) { +bio_put (bio);return -ENOMEM ; + }while ((slot =find_first_zero_bit (rblk->invalid_pages, nr_pgs_per_blk)) < nr_pgs_per_blk) {
drivers/md/dm-crypt.c +7 -0
@@ -1920,6 +1920,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 ablkcipher_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
@@ -7572,16 +7572,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/mmc/host/dw_mmc-pltfm.c +1 -1
@@ -60,7 +60,7 @@ int dw_mci_pltfm_register(struct platform_device *pdev, regs =platform_get_resource (pdev,IORESOURCE_MEM ,0 );/* Get registers' physical base address */ - host->phy_regs = (void *)(regs->start); + host->phy_regs = regs->start; host->regs =devm_ioremap_resource (&pdev->dev, regs);if (IS_ERR (host->regs))return PTR_ERR (host->regs);
drivers/mmc/host/dw_mmc.c +1 -1
@@ -699,7 +699,7 @@ static int dw_mci_edmac_start_dma(struct dw_mci *host,int ret =0 ;/* Set external dma config: burst size, burst width */ - cfg.dst_addr = (dma_addr_t)(host->phy_regs + fifo_offset); + cfg.dst_addr = host->phy_regs + fifo_offset; cfg.src_addr = cfg.dst_addr; cfg.dst_addr_width =DMA_SLAVE_BUSWIDTH_4_BYTES ; cfg.src_addr_width =DMA_SLAVE_BUSWIDTH_4_BYTES ;
drivers/net/ethernet/cavium/thunder/nic_reg.h +0 -1
@@ -170,7 +170,6 @@#define NIC_QSET_SQ_0_7_DOOR (0x010838)#define NIC_QSET_SQ_0_7_STATUS (0x010840)#define NIC_QSET_SQ_0_7_DEBUG (0x010848) -#define NIC_QSET_SQ_0_7_CNM_CHG (0x010860)#define NIC_QSET_SQ_0_7_STAT_0_1 (0x010900)#define NIC_QSET_RBDR_0_1_CFG (0x010C00)
drivers/net/ethernet/cavium/thunder/nicvf_ethtool.c +4 -1
@@ -380,7 +380,10 @@ static void nicvf_get_regs(struct net_device *dev, p[i++] =nicvf_queue_reg_read (nic,NIC_QSET_SQ_0_7_DOOR , q); p[i++] =nicvf_queue_reg_read (nic,NIC_QSET_SQ_0_7_STATUS , q); p[i++] =nicvf_queue_reg_read (nic,NIC_QSET_SQ_0_7_DEBUG , q); - p[i++] =nicvf_queue_reg_read (nic,NIC_QSET_SQ_0_7_CNM_CHG , q); +/* Padding, was NIC_QSET_SQ_0_7_CNM_CHG, which +* produces bus errors when read +*/ + p[i++] =0 ; p[i++] =nicvf_queue_reg_read (nic,NIC_QSET_SQ_0_7_STAT_0_1 , q); reg_offset =NIC_QSET_SQ_0_7_STAT_0_1 | (1 <<3 ); p[i++] =nicvf_queue_reg_read (nic, reg_offset, q);
drivers/net/wireless/ath/ath9k/main.c +4 -4
@@ -1550,13 +1550,13 @@ static int ath9k_sta_state(struct ieee80211_hw *hw,struct ath_common *common =ath9k_hw_common (sc->sc_ah);int ret =0 ; -if (old_state ==IEEE80211_STA_AUTH && - new_state ==IEEE80211_STA_ASSOC ) { +if (old_state ==IEEE80211_STA_NOTEXIST && + new_state ==IEEE80211_STA_NONE ) { ret =ath9k_sta_add (hw, vif, sta);ath_dbg (common,CONFIG ,"Add station: %pM\n" , sta->addr); - }else if (old_state ==IEEE80211_STA_ASSOC && - new_state ==IEEE80211_STA_AUTH ) { + }else if (old_state ==IEEE80211_STA_NONE && + new_state ==IEEE80211_STA_NOTEXIST ) { ret =ath9k_sta_remove (hw, vif, sta);ath_dbg (common,CONFIG ,"Remove station: %pM\n" , sta->addr);
drivers/pinctrl/pinctrl-at91-pio4.c +1 -1
@@ -1002,7 +1002,7 @@ static int atmel_pinctrl_probe(struct platform_device *pdev) atmel_pioctrl->irqs[i] = res->start;irq_set_chained_handler (res->start, atmel_gpio_irq_handler);irq_set_handler_data (res->start, atmel_pioctrl); -dev_dbg (dev,"bank %i: hwirq=%u\n" , i, res->start); +dev_dbg (dev,"bank %i: irq=%pr\n" , i, res); } atmel_pioctrl->irq_domain = irq_domain_add_linear(dev->of_node,
drivers/pinctrl/pinctrl-pistachio.c +6 -6
@@ -809,17 +809,17 @@ static const struct pistachio_pin_group pistachio_groups[] = { PADS_FUNCTION_SELECT2, 12, 0x3),MFIO_MUX_PIN_GROUP (83 ,MIPS_PLL_LOCK ,MIPS_TRACE_DATA ,USB_DEBUG ,PADS_FUNCTION_SELECT2 ,14 ,0x3 ), -MFIO_MUX_PIN_GROUP (84 ,SYS_PLL_LOCK ,MIPS_TRACE_DATA ,USB_DEBUG , +MFIO_MUX_PIN_GROUP (84 ,AUDIO_PLL_LOCK ,MIPS_TRACE_DATA ,USB_DEBUG ,PADS_FUNCTION_SELECT2 ,16 ,0x3 ), -MFIO_MUX_PIN_GROUP (85 ,WIFI_PLL_LOCK ,MIPS_TRACE_DATA ,SDHOST_DEBUG , +MFIO_MUX_PIN_GROUP (85 ,RPU_V_PLL_LOCK ,MIPS_TRACE_DATA ,SDHOST_DEBUG ,PADS_FUNCTION_SELECT2 ,18 ,0x3 ), -MFIO_MUX_PIN_GROUP (86 ,BT_PLL_LOCK ,MIPS_TRACE_DATA ,SDHOST_DEBUG , +MFIO_MUX_PIN_GROUP (86 ,RPU_L_PLL_LOCK ,MIPS_TRACE_DATA ,SDHOST_DEBUG ,PADS_FUNCTION_SELECT2 ,20 ,0x3 ), -MFIO_MUX_PIN_GROUP (87 ,RPU_V_PLL_LOCK ,DREQ2 ,SOCIF_DEBUG , +MFIO_MUX_PIN_GROUP (87 ,SYS_PLL_LOCK ,DREQ2 ,SOCIF_DEBUG ,PADS_FUNCTION_SELECT2 ,22 ,0x3 ), -MFIO_MUX_PIN_GROUP (88 ,RPU_L_PLL_LOCK ,DREQ3 ,SOCIF_DEBUG , +MFIO_MUX_PIN_GROUP (88 ,WIFI_PLL_LOCK ,DREQ3 ,SOCIF_DEBUG ,PADS_FUNCTION_SELECT2 ,24 ,0x3 ), -MFIO_MUX_PIN_GROUP (89 ,AUDIO_PLL_LOCK ,DREQ4 ,DREQ5 , +MFIO_MUX_PIN_GROUP (89 ,BT_PLL_LOCK ,DREQ4 ,DREQ5 ,PADS_FUNCTION_SELECT2 ,26 ,0x3 ),PIN_GROUP (TCK ,"tck" ), PIN_GROUP(TRSTN, "trstn"),
drivers/pinctrl/sunxi/pinctrl-sun8i-a23.c +2 -2
@@ -485,12 +485,12 @@ static const struct sunxi_desc_pin sun8i_a23_pins[] = {SUNXI_PIN (SUNXI_PINCTRL_PIN (G ,8 ),SUNXI_FUNCTION (0x0 ,"gpio_in" ),SUNXI_FUNCTION (0x1 ,"gpio_out" ), -SUNXI_FUNCTION (0x2 ,"uart2" ),/* RTS */ +SUNXI_FUNCTION (0x2 ,"uart1" ),/* RTS */ SUNXI_FUNCTION_IRQ_BANK (0x4 ,2 ,8 )),/* PG_EINT8 */ SUNXI_PIN (SUNXI_PINCTRL_PIN (G ,9 ),SUNXI_FUNCTION (0x0 ,"gpio_in" ),SUNXI_FUNCTION (0x1 ,"gpio_out" ), -SUNXI_FUNCTION (0x2 ,"uart2" ),/* CTS */ +SUNXI_FUNCTION (0x2 ,"uart1" ),/* CTS */ SUNXI_FUNCTION_IRQ_BANK (0x4 ,2 ,9 )),/* PG_EINT9 */ SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 10), SUNXI_FUNCTION(0x0, "gpio_in"),
drivers/pinctrl/sunxi/pinctrl-sun8i-a33.c +2 -2
@@ -407,12 +407,12 @@ static const struct sunxi_desc_pin sun8i_a33_pins[] = {SUNXI_PIN (SUNXI_PINCTRL_PIN (G ,8 ),SUNXI_FUNCTION (0x0 ,"gpio_in" ),SUNXI_FUNCTION (0x1 ,"gpio_out" ), -SUNXI_FUNCTION (0x2 ,"uart2" ),/* RTS */ +SUNXI_FUNCTION (0x2 ,"uart1" ),/* RTS */ SUNXI_FUNCTION_IRQ_BANK (0x4 ,1 ,8 )),/* PG_EINT8 */ SUNXI_PIN (SUNXI_PINCTRL_PIN (G ,9 ),SUNXI_FUNCTION (0x0 ,"gpio_in" ),SUNXI_FUNCTION (0x1 ,"gpio_out" ), -SUNXI_FUNCTION (0x2 ,"uart2" ),/* CTS */ +SUNXI_FUNCTION (0x2 ,"uart1" ),/* CTS */ SUNXI_FUNCTION_IRQ_BANK (0x4 ,1 ,9 )),/* PG_EINT9 */ SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 10), SUNXI_FUNCTION(0x0, "gpio_in"),
drivers/soc/qcom/spm.c +1 -1
@@ -288,7 +288,7 @@ static struct spm_driver_data *spm_get_drv(struct platform_device *pdev,struct spm_driver_data *drv =NULL ;struct device_node *cpu_node, *saw_node;int cpu; -bool found; +bool found =0 ;for_each_possible_cpu (cpu) { cpu_node =of_cpu_device_node_get (cpu);
drivers/tty/serial/8250/8250_mid.c +3 -0
@@ -149,6 +149,9 @@ static void mid8250_set_termios(struct uart_port *p,unsigned long w =BIT (24 ) -1 ;unsigned long mul, div; +/* Gracefully handle the B0 case: fall back to B9600 */ + fuart = fuart ? fuart :9600 *16 ; +if (mid->board->freq < fuart) {/* Find prescaler value that satisfies Fuart < Fref */ if (mid->board->freq > baud)
drivers/tty/serial/8250/8250_pci.c +139 -0
151 lines not on this page · raw message
drivers/usb/chipidea/udc.c +9 -0
@@ -939,6 +939,15 @@ static int isr_setup_status_phase(struct ci_hdrc *ci)int retval;struct ci_hw_ep *hwep; +/* +* Unexpected USB controller behavior, caused by bad signal integrity +* or ground reference problems, can lead to isr_setup_status_phase +* being called with ci->status equal to NULL. +* If this situation occurs, you should review your USB hardware design. +*/ +if (WARN_ON_ONCE (!ci->status)) +return -EPIPE ; + hwep = (ci->ep0_dir ==TX ) ? ci->ep0out : ci->ep0in; ci->status->context = ci; ci->status->complete = isr_setup_status_complete;
drivers/usb/core/config.c +17 -11
@@ -211,8 +211,10 @@ static int usb_parse_endpoint(struct device *ddev, int cfgno, int inum,memcpy (&endpoint->desc, d, n);INIT_LIST_HEAD (&endpoint->urb_list); -/* Fix up bInterval values outside the legal range. Use 32 ms if no -* proper value can be guessed. */ +/* +* Fix up bInterval values outside the legal range. +* Use 10 or 8 ms if no proper value can be guessed. +*/ i =0 ;/* i = min, j = max, n = default */ j =255 ;if (usb_endpoint_xfer_int (d)) {
@@ -221,13 +223,15 @@ static int usb_parse_endpoint(struct device *ddev, int cfgno, int inum,case USB_SPEED_SUPER_PLUS :case USB_SPEED_SUPER :case USB_SPEED_HIGH : -/* Many device manufacturers are using full-speed +/* +* Many device manufacturers are using full-speed * bInterval values in high-speed interrupt endpoint -* descriptors. Try to fix those and fall back to a -* 32 ms default value otherwise. */ +* descriptors. Try to fix those and fall back to an +* 8-ms default value otherwise. +*/ n =fls (d->bInterval*8 );if (n ==0 ) - n =9 ;/* 32 ms = 2^(9-1) uframes */ + n =7 ;/* 8 ms = 2^(7-1) uframes */ j =16 ;/*
@@ -242,10 +246,12 @@ static int usb_parse_endpoint(struct device *ddev, int cfgno, int inum, }break ;default :/* USB_SPEED_FULL or _LOW */ -/* For low-speed, 10 ms is the official minimum. +/* +* For low-speed, 10 ms is the official minimum. * But some "overclocked" devices might want faster -* polling so we'll allow it. */ - n =32 ; +* polling so we'll allow it. +*/ + n =10 ;break ; } }else if (usb_endpoint_xfer_isoc (d)) {
@@ -253,10 +259,10 @@ static int usb_parse_endpoint(struct device *ddev, int cfgno, int inum, j =16 ;switch (to_usb_device (ddev)->speed) {case USB_SPEED_HIGH : - n =9 ;/* 32 ms = 2^(9-1) uframes */ + n =7 ;/* 8 ms = 2^(7-1) uframes */ break ;default :/* USB_SPEED_FULL */ - n =6 ;/* 32 ms = 2^(6-1) frames */ + n =4 ;/* 8 ms = 2^(4-1) frames */ break ; } }
drivers/usb/host/xhci-ring.c +5 -1
@@ -846,6 +846,10 @@ void xhci_stop_endpoint_command_watchdog(unsigned long arg)spin_lock_irqsave (&xhci->lock, flags); ep->stop_cmds_pending--; +if (xhci->xhc_state &XHCI_STATE_REMOVING ) { +spin_unlock_irqrestore (&xhci->lock, flags); +return ; + }if (xhci->xhc_state &XHCI_STATE_DYING ) {xhci_dbg_trace (xhci, trace_xhci_dbg_cancel_urb, "Stop EP timer ran, but another timer marked "
@@ -899,7 +903,7 @@ void xhci_stop_endpoint_command_watchdog(unsigned long arg)spin_unlock_irqrestore (&xhci->lock, flags);xhci_dbg_trace (xhci, trace_xhci_dbg_cancel_urb,"Calling usb_hc_died()" ); -usb_hc_died (xhci_to_hcd (xhci)->primary_hcd); +usb_hc_died (xhci_to_hcd (xhci));xhci_dbg_trace (xhci, trace_xhci_dbg_cancel_urb,"xHCI host controller is dead." ); }
drivers/usb/renesas_usbhs/mod.c +9 -2
@@ -282,9 +282,16 @@ static irqreturn_t usbhs_interrupt(int irq, void *data)if (usbhs_mod_is_host (priv))usbhs_write (priv,INTSTS1 , ~irq_state.intsts1 &INTSTS1_MAGIC ); -usbhs_write (priv,BRDYSTS , ~irq_state.brdysts); +/* +* The driver should not clear the xxxSTS after the line of +* "call irq callback functions" because each "if" statement is +* possible to call the callback function for avoiding any side effects. +*/ +if (irq_state.intsts0 &BRDY ) +usbhs_write (priv,BRDYSTS , ~irq_state.brdysts);usbhs_write (priv,NRDYSTS , ~irq_state.nrdysts); -usbhs_write (priv,BEMPSTS , ~irq_state.bempsts); +if (irq_state.intsts0 &BEMP ) +usbhs_write (priv,BEMPSTS , ~irq_state.bempsts);/* * call irq callback functions
drivers/usb/serial/usb-serial-simple.c +2 -1
@@ -54,7 +54,8 @@ DEVICE(funsoft, FUNSOFT_IDS);/* Infineon Flashloader driver */ #define FLASHLOADER_IDS () \ { USB_DEVICE_INTERFACE_CLASS(0x058b, 0x0041, USB_CLASS_CDC_DATA) }, \ - { USB_DEVICE(0x8087, 0x0716) } + { USB_DEVICE(0x8087, 0x0716) }, \ + { USB_DEVICE(0x8087, 0x0801) }DEVICE (flashloader,FLASHLOADER_IDS );/* Google Serial USB SubClass */
fs/btrfs/tree-log.c +1 -0
@@ -2850,6 +2850,7 @@ int btrfs_sync_log(struct btrfs_trans_handle *trans,if (log_root_tree->log_transid_committed >= root_log_ctx.log_transid) {blk_finish_plug (&plug); +list_del_init (&root_log_ctx.list);mutex_unlock (&log_root_tree->log_mutex); ret = root_log_ctx.log_ret; goto out;
fs/ext4/crypto_policy.c +3 -0
@@ -102,6 +102,9 @@ static int ext4_create_encryption_context_from_policy(int ext4_process_policy (const struct ext4_encryption_policy *policy,struct inode *inode) { +if (!inode_owner_or_capable (inode)) +return -EACCES ; +if (policy->version !=0 )return -EINVAL ;
fs/ext4/ioctl.c +6 -0
@@ -629,7 +629,13 @@ resizefs_out: goto encryption_policy_out; } + err =mnt_want_write_file (filp); +if (err) + goto encryption_policy_out; + err =ext4_process_policy (&policy, inode); + +mnt_drop_write_file (filp); encryption_policy_out:return err;#else
fs/ext4/mballoc.c +28 -19
155 lines not on this page · raw message
fs/f2fs/crypto_policy.c +3 -0
@@ -89,6 +89,9 @@ static int f2fs_create_encryption_context_from_policy(int f2fs_process_policy (const struct f2fs_encryption_policy *policy,struct inode *inode) { +if (!inode_owner_or_capable (inode)) +return -EACCES ; +if (policy->version !=0 )return -EINVAL ;
fs/fuse/file.c +4 -3
@@ -540,13 +540,13 @@ void fuse_read_fill(struct fuse_req *req, struct file *file, loff_t pos, req->out.args[0 ].size = count; } -static void fuse_release_user_pages (struct fuse_req *req,int write) +static void fuse_release_user_pages (struct fuse_req *req,bool should_dirty) {unsigned i;for (i =0 ; i < req->num_pages; i++) {struct page *page = req->pages[i]; -if (write) +if (should_dirty)set_page_dirty_lock (page);put_page (page); }
@@ -1331,6 +1331,7 @@ ssize_t fuse_direct_io(struct fuse_io_priv *io, struct iov_iter *iter, loff_t *ppos, int flags) { int write = flags & FUSE_DIO_WRITE; +bool should_dirty = !write &&iter_is_iovec (iter);int cuse = flags &FUSE_DIO_CUSE ;struct file *file = io->file;struct inode *inode = file->f_mapping->host;
@@ -1375,7 +1376,7 @@ ssize_t fuse_direct_io(struct fuse_io_priv *io, struct iov_iter *iter, nres =fuse_send_read (req, io, pos, nbytes, owner);if (!io->async) -fuse_release_user_pages (req, !write); +fuse_release_user_pages (req, should_dirty);if (req->out.h.error) {if (!res) res = req->out.h.error;
fs/kernfs/file.c +21 -7
@@ -833,21 +833,35 @@ repeat:mutex_lock (&kernfs_mutex);list_for_each_entry (info, &kernfs_root (kn)->supers, node) { +struct kernfs_node *parent;struct inode *inode; -struct dentry *dentry; +/* +* We want fsnotify_modify() on @kn but as the +* modifications aren't originating from userland don't +* have the matching @file available. Look up the inodes +* and generate the events manually. +*/ inode =ilookup (info->sb, kn->ino);if (!inode)continue ; - dentry =d_find_any_alias (inode); -if (dentry) { -fsnotify_parent (NULL , dentry,FS_MODIFY ); -fsnotify (inode,FS_MODIFY , inode,FSNOTIFY_EVENT_INODE , -NULL ,0 ); -dput (dentry); + parent =kernfs_get_parent (kn); +if (parent) { +struct inode *p_inode; + + p_inode =ilookup (info->sb, parent->ino); +if (p_inode) { +fsnotify (p_inode,FS_MODIFY |FS_EVENT_ON_CHILD , + inode,FSNOTIFY_EVENT_INODE , kn->name,0 ); +iput (p_inode); + } + +kernfs_put (parent); } +fsnotify (inode,FS_MODIFY , inode,FSNOTIFY_EVENT_INODE , + kn->name,0 );iput (inode); }
fs/nfs/callback.c +1 -0
@@ -275,6 +275,7 @@ static int nfs_callback_up_net(int minorversion, struct svc_serv *serv, err_socks:svc_rpcb_cleanup (serv, net); err_bind: + nn->cb_users[minorversion]--;dprintk ("NFS: Couldn't create callback socket: err = %d; " "net = %p\n" , ret, net);return ret;
fs/nfs/nfs4proc.c +10 -2
@@ -7424,12 +7424,20 @@ static int _nfs4_proc_create_session(struct nfs_client *clp, status =rpc_call_sync (session->clp->cl_rpcclient, &msg,RPC_TASK_TIMEOUT );trace_nfs4_create_session (clp, status); +switch (status) { +case -NFS4ERR_STALE_CLIENTID : +case -NFS4ERR_DELAY : +case -ETIMEDOUT : +case -EACCES : +case -EAGAIN : + goto out; + }; + + clp->cl_seqid++;if (!status) {/* Verify the session's negotiated channel_attrs values */ status =nfs4_verify_channel_attrs (&args, &res);/* Increment the clientid slot sequence id */ -if (clp->cl_seqid == res.seqid) - clp->cl_seqid++;if (status) goto out;nfs4_update_session (session, &res);
fs/nfs/pnfs.c +4 -0
@@ -365,6 +365,9 @@ pnfs_layout_need_return(struct pnfs_layout_hdr *lo,static bool pnfs_prepare_layoutreturn (struct pnfs_layout_hdr *lo) { +/* Serialise LAYOUTGET/LAYOUTRETURN */ +if (atomic_read (&lo->plh_outstanding) !=0 ) +return false;if (test_and_set_bit (NFS_LAYOUT_RETURN , &lo->plh_flags))return false; lo->plh_return_iomode =0 ;
@@ -1530,6 +1533,7 @@ pnfs_update_layout(struct inode *ino, goto out; lookup_again: +nfs4_client_recover_expired_lease (clp); first = false;spin_lock (&ino->i_lock); lo =pnfs_find_alloc_layout (ino, ctx, gfp_flags);
fs/nfsd/nfs4state.c +17 -23
@@ -1200,27 +1200,6 @@ free_ol_stateid_reaplist(struct list_head *reaplist) } } -static void release_lockowner (struct nfs4_lockowner *lo) -{ -struct nfs4_client *clp = lo->lo_owner.so_client; -struct nfs4_ol_stateid *stp; -struct list_head reaplist; - -INIT_LIST_HEAD (&reaplist); - -spin_lock (&clp->cl_lock); -unhash_lockowner_locked (lo); -while (!list_empty (&lo->lo_owner.so_stateids)) { - stp =list_first_entry (&lo->lo_owner.so_stateids, - struct nfs4_ol_stateid, st_perstateowner); -WARN_ON (!unhash_lock_stateid (stp)); -put_ol_stateid_locked (stp, &reaplist); - } -spin_unlock (&clp->cl_lock); -free_ol_stateid_reaplist (&reaplist); -nfs4_put_stateowner (&lo->lo_owner); -} -static void release_open_stateid_locks (struct nfs4_ol_stateid *open_stp,struct list_head *reaplist) {
@@ -5952,6 +5931,7 @@ nfsd4_release_lockowner(struct svc_rqst *rqstp,__be32 status;struct nfsd_net *nn =net_generic (SVC_NET (rqstp), nfsd_net_id);struct nfs4_client *clp; +LIST_HEAD (reaplist);dprintk ("nfsd4_release_lockowner clientid: (%08x/%08x):\n" , clid->cl_boot, clid->cl_id);
@@ -5982,9 +5962,23 @@ nfsd4_release_lockowner(struct svc_rqst *rqstp,nfs4_get_stateowner (sop);break ; } +if (!lo) { +spin_unlock (&clp->cl_lock); +return status; + } + +unhash_lockowner_locked (lo); +while (!list_empty (&lo->lo_owner.so_stateids)) { + stp =list_first_entry (&lo->lo_owner.so_stateids, + struct nfs4_ol_stateid, + st_perstateowner); +WARN_ON (!unhash_lock_stateid (stp)); +put_ol_stateid_locked (stp, &reaplist); + }spin_unlock (&clp->cl_lock); -if (lo) -release_lockowner (lo); +free_ol_stateid_reaplist (&reaplist); +nfs4_put_stateowner (&lo->lo_owner); +return status; }
fs/proc/base.c +1 -6
@@ -1545,18 +1545,13 @@ static const struct file_operations proc_pid_set_comm_operations = {static int proc_exe_link (struct dentry *dentry,struct path *exe_path) {struct task_struct *task; -struct mm_struct *mm;struct file *exe_file; task =get_proc_task (d_inode (dentry));if (!task)return -ENOENT ; - mm =get_task_mm (task); + exe_file =get_task_exe_file (task);put_task_struct (task); -if (!mm) -return -ENOENT ; - exe_file =get_mm_exe_file (mm); -mmput (mm);if (exe_file) { *exe_path = exe_file->f_path;path_get (&exe_file->f_path);
include/asm-generic/uaccess.h +13 -7
@@ -230,14 +230,18 @@ extern int __put_user_bad(void) __attribute__((noreturn));might_fault (); \access_ok (VERIFY_READ , __p,sizeof (*ptr)) ? \ __get_user((x), (__typeof__(*(ptr)) *)__p) : \ - -EFAULT ; \ + ((x) = (__typeof__ (*(ptr )))0 ,-EFAULT ); \ })#ifndef __get_user_fnstatic inline int __get_user_fn (size_t size,const void __user *ptr,void *x) { - size =__copy_from_user (x, ptr, size); -return size ? -EFAULT : size; +size_t n =__copy_from_user (x, ptr, size); +if (unlikely (n)) { +memset (x + (size - n),0 , n); +return -EFAULT ; + } +return 0 ; }#define __get_user_fn (sz, u, k) __get_user_fn(sz, u, k)
@@ -257,11 +261,13 @@ extern int __get_user_bad(void) __attribute__((noreturn));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); -else -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; } static inline long copy_to_user(void __user *to,
include/linux/irq.h +10 -0
@@ -916,6 +916,16 @@ static inline void irq_gc_lock(struct irq_chip_generic *gc) { }static inline void irq_gc_unlock (struct irq_chip_generic *gc) { }#endif +/* +* The irqsave variants are for usage in non interrupt code. Do not use +* them in irq_chip callbacks. Use irq_gc_lock() instead. +*/ +#define irq_gc_lock_irqsave (gc, flags) \ + raw_spin_lock_irqsave(&(gc)->lock, flags) + +#define irq_gc_unlock_irqrestore (gc, flags) \ + raw_spin_unlock_irqrestore(&(gc)->lock, flags) +static inline void irq_reg_writel (struct irq_chip_generic *gc,u32 val,int reg_offset) {
include/linux/mfd/ti_am335x_tscadc.h +4 -4
@@ -138,16 +138,16 @@/* * time in us for processing a single channel, calculated as follows: * -* num cycles = open delay + (sample delay + conv time) * averaging +* max num cycles = open delay + (sample delay + conv time) * averaging * -* num cycles: 152 + (1 + 13) * 16 = 376 +* max num cycles: 262143 + (255 + 13) * 16 = 266431 * * clock frequency: 26MHz / 8 = 3.25MHz * clock period: 1 / 3.25MHz = 308ns * -* processing time: 376 * 308ns = 116us +* max processing time: 266431 * 308ns = 83ms(approx) */ -#define IDLE_TIMEOUT 116/* microsec */ +#define IDLE_TIMEOUT 83/* milliseconds */ #define TSCADC_CELLS 2
include/linux/mm.h +1 -0
@@ -1898,6 +1898,7 @@ extern void mm_drop_all_locks(struct mm_struct *mm);extern void set_mm_exe_file (struct mm_struct *mm,struct file *new_exe_file);extern struct file *get_mm_exe_file (struct mm_struct *mm); +extern struct file *get_task_exe_file (struct task_struct *task);extern int may_expand_vm (struct mm_struct *mm,unsigned long npages); extern struct vm_area_struct *_install_special_mapping(struct mm_struct *mm,
include/linux/mmc/dw_mmc.h +1 -1
@@ -172,7 +172,7 @@ struct dw_mci {/* For edmac */ struct dw_mci_dma_slave *dms;/* Registers's physical base address */ -void *phy_regs; +resource_size_t phy_regs;u32 cmd_status;u32 data_status;
include/linux/netdevice.h +5 -6
@@ -511,7 +511,6 @@ static inline void napi_enable(struct napi_struct *n)clear_bit (NAPI_STATE_NPSVC , &n->state); } -#ifdef CONFIG_SMP /** * napi_synchronize - wait until NAPI is not running * @n: napi context
@@ -522,12 +521,12 @@ static inline void napi_enable(struct napi_struct *n)*/ static inline void napi_synchronize (const struct napi_struct *n) { -while (test_bit (NAPI_STATE_SCHED , &n->state)) -msleep (1 ); +if (IS_ENABLED (CONFIG_SMP )) +while (test_bit (NAPI_STATE_SCHED , &n->state)) +msleep (1 ); +else +barrier (); } -#else -# define napi_synchronize (n) barrier() -#endif enum netdev_queue_state_t { __QUEUE_STATE_DRV_XOFF,
include/linux/uio.h +1 -1
@@ -76,7 +76,7 @@ size_t iov_iter_copy_from_user_atomic(struct page *page, struct iov_iter *i, unsigned long offset, size_t bytes);void iov_iter_advance (struct iov_iter *i,size_t bytes);int iov_iter_fault_in_readable (struct iov_iter *i,size_t bytes); -int iov_iter_fault_in_multipages_readable (struct iov_iter *i,size_t bytes); +#define iov_iter_fault_in_multipages_readable iov_iter_fault_in_readablesize_t iov_iter_single_seg_count (const struct iov_iter *i);size_t copy_page_to_iter (struct page *page,size_t offset,size_t bytes,struct iov_iter *i);
kernel/audit_watch.c +5 -3
@@ -19,6 +19,7 @@* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include <linux/file.h> #include <linux/kernel.h> #include <linux/audit.h> #include <linux/kthread.h>
@@ -544,10 +545,11 @@ int audit_exe_compare(struct task_struct *tsk, struct audit_fsnotify_mark *mark)unsigned long ino;dev_t dev; -rcu_read_lock (); - exe_file =rcu_dereference (tsk->mm->exe_file); + exe_file =get_task_exe_file (tsk); +if (!exe_file) +return 0 ; ino = exe_file->f_inode->i_ino; dev = exe_file->f_inode->i_sb->s_dev; -rcu_read_unlock (); +fput (exe_file);return audit_mark_compare (mark, ino, dev); }
kernel/configs/tiny.config +8 -0
@@ -1,4 +1,12 @@ +# CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE is not set CONFIG_CC_OPTIMIZE_FOR_SIZE=y +# CONFIG_KERNEL_GZIP is not set +# CONFIG_KERNEL_BZIP2 is not set +# CONFIG_KERNEL_LZMA is not set CONFIG_KERNEL_XZ=y +# CONFIG_KERNEL_LZO is not set +# CONFIG_KERNEL_LZ4 is not set CONFIG_OPTIMIZE_INLINING=y +# CONFIG_SLAB is not set +# CONFIG_SLUB is not set CONFIG_SLOB=y
kernel/cpuset.c +15 -0
@@ -2074,6 +2074,20 @@ static void cpuset_bind(struct cgroup_subsys_state *root_css)mutex_unlock (&cpuset_mutex); } +/* +* Make sure the new task conform to the current state of its parent, +* which could have been changed by cpuset just after it inherits the +* state from the parent and before it sits on the cgroup's task list. +*/ +void cpuset_fork (struct task_struct *task) +{ +if (task_css_is_root (task, cpuset_cgrp_id)) +return ; + +set_cpus_allowed_ptr (task, ¤t->cpus_allowed); + task->mems_allowed = current->mems_allowed; +} +struct cgroup_subsys cpuset_cgrp_subsys = { .css_alloc = cpuset_css_alloc, .css_online = cpuset_css_online,
@@ -2084,6 +2098,7 @@ struct cgroup_subsys cpuset_cgrp_subsys = { .attach = cpuset_attach, .post_attach = cpuset_post_attach, .bind = cpuset_bind, + .fork = cpuset_fork, .legacy_cftypes = files, .early_init = 1, };
kernel/fork.c +23 -0
@@ -764,6 +764,29 @@ struct file *get_mm_exe_file(struct mm_struct *mm)EXPORT_SYMBOL (get_mm_exe_file);/** +* get_task_exe_file - acquire a reference to the task's executable file +* +* Returns %NULL if task's mm (if any) has no associated executable file or +* this is a kernel thread with borrowed mm (see the comment above get_task_mm). +* User must release file via fput(). +*/ +struct file *get_task_exe_file (struct task_struct *task) +{ +struct file *exe_file =NULL ; +struct mm_struct *mm; + +task_lock (task); + mm = task->mm; +if (mm) { +if (!(task->flags &PF_KTHREAD )) + exe_file =get_mm_exe_file (mm); + } +task_unlock (task); +return exe_file; +} +EXPORT_SYMBOL (get_task_exe_file); + +/** * get_task_mm - acquire a reference to the task's mm * * Returns %NULL if the task has no mm. Checks PF_KTHREAD (meaning
kernel/irq/msi.c +1 -0
@@ -298,6 +298,7 @@ int msi_domain_alloc_irqs(struct irq_domain *domain, struct device *dev, ops->msi_finish (&arg,0 );for_each_msi_entry (desc, dev) { + virq = desc->irq;if (desc->nvec_used ==1 )dev_dbg (dev,"irq %d for MSI\n" , virq);else
kernel/kexec_file.c +3 -0
@@ -934,7 +934,10 @@ int kexec_load_purgatory(struct kimage *image, unsigned long min,return 0 ; out:vfree (pi->sechdrs); + pi->sechdrs =NULL ; +vfree (pi->purgatory_buf); + pi->purgatory_buf =NULL ;return ret; }
kernel/sched/core.c +22 -0
@@ -1945,6 +1945,28 @@ try_to_wake_up(struct task_struct *p, unsigned int state, int wake_flags) success =1 ;/* we're going to change ->state */ cpu =task_cpu (p); +/* +* Ensure we load p->on_rq _after_ p->state, otherwise it would +* be possible to, falsely, observe p->on_rq == 0 and get stuck +* in smp_cond_load_acquire() below. +* +* sched_ttwu_pending() try_to_wake_up() +* [S] p->on_rq = 1; [L] P->state +* UNLOCK rq->lock -----. +* \ +* +--- RMB +* schedule() / +* LOCK rq->lock -----' +* UNLOCK rq->lock +* +* [task p] +* [S] p->state = UNINTERRUPTIBLE [L] p->on_rq +* +* Pairs with the UNLOCK+LOCK on rq->lock from the +* last wakeup of our task and the schedule that got our task +* current. +*/ +smp_rmb ();if (p->on_rq &&ttwu_remote (p, wake_flags)) goto stat;
lib/iov_iter.c +2 -22
@@ -298,33 +298,13 @@ done: }/* -* Fault in the first iovec of the given iov_iter, to a maximum length -* of bytes. Returns 0 on success, or non-zero if the memory could not be -* accessed (ie. because it is an invalid address). -* -* writev-intensive code may want this to prefault several iovecs -- that -* would be possible (callers must not rely on the fact that _only_ the -* first iovec will be faulted with the current implementation). -*/ -int iov_iter_fault_in_readable (struct iov_iter *i,size_t bytes) -{ -if (!(i->type & (ITER_BVEC |ITER_KVEC ))) { -char __user *buf = i->iov->iov_base + i->iov_offset; - bytes =min (bytes, i->iov->iov_len - i->iov_offset); -return fault_in_pages_readable (buf, bytes); - } -return 0 ; -} -EXPORT_SYMBOL (iov_iter_fault_in_readable); - -/* * Fault in one or more iovecs of the given iov_iter, to a maximum length of * bytes. For each iovec, fault in each page that constitutes the iovec. * * Return 0 on success, or non-zero if the memory could not be accessed (i.e. * because it is an invalid address). */ -int iov_iter_fault_in_multipages_readable (struct iov_iter *i,size_t bytes) +int iov_iter_fault_in_readable (struct iov_iter *i,size_t bytes) {size_t skip = i->iov_offset;const struct iovec *iov;
@@ -341,7 +321,7 @@ int iov_iter_fault_in_multipages_readable(struct iov_iter *i, size_t bytes) }return 0 ; } -EXPORT_SYMBOL (iov_iter_fault_in_multipages_readable); +EXPORT_SYMBOL (iov_iter_fault_in_readable); void iov_iter_init(struct iov_iter *i, int direction, const struct iovec *iov, unsigned long nr_segs,
net/ipv6/addrconf.c +2 -0
@@ -1898,6 +1898,7 @@ errdad:spin_unlock_bh (&ifp->lock);addrconf_mod_dad_work (ifp,0 ); +in6_ifa_put (ifp); }/* Join to solicited addr multicast group.
@@ -3609,6 +3610,7 @@ static void addrconf_dad_work(struct work_struct *w)addrconf_dad_begin (ifp); goto out; }else if (action ==DAD_ABORT ) { +in6_ifa_hold (ifp);addrconf_dad_stop (ifp,1 ); goto out; }
net/tipc/link.c +2 -0
@@ -1262,6 +1262,8 @@ static int tipc_link_proto_rcv(struct tipc_link *l, struct sk_buff *skb,/* fall thru' */ case ACTIVATE_MSG : +skb_linearize (skb); + hdr =buf_msg (skb);/* Complete own link name with peer's interface name */ if_name =strrchr (l->name,':' ) +1 ;
net/tipc/name_distr.c +1 -0
@@ -397,6 +397,7 @@ void tipc_named_rcv(struct net *net, struct sk_buff_head *inputq)spin_lock_bh (&tn->nametbl_lock);for (skb =skb_dequeue (inputq); skb; skb =skb_dequeue (inputq)) { +skb_linearize (skb); msg =buf_msg (skb); mtype =msg_type (msg); item = (struct distr_item *)msg_data (msg);
net/tipc/udp_media.c +0 -5
@@ -48,7 +48,6 @@#include <linux/tipc_netlink.h> #include "core.h" #include "bearer.h" -#include "msg.h" /* IANA assigned UDP port */ #define UDP_PORT_DEFAULT 6118
@@ -224,10 +223,6 @@ static int tipc_udp_recv(struct sock *sk, struct sk_buff *skb) {struct udp_bearer *ub;struct tipc_bearer *b; -int usr =msg_user (buf_msg (skb)); - -if ((usr ==LINK_PROTOCOL ) || (usr ==NAME_DISTRIBUTOR )) -skb_linearize (skb); ub =rcu_dereference_sk_user_data (sk);if (!ub) {
net/wireless/wext-core.c +2 -23
@@ -955,29 +955,8 @@ static int wireless_process_ioctl(struct net *net, struct ifreq *ifr,return private (dev, iwr, cmd, info, handler); }/* Old driver API : call driver ioctl handler */ -if (dev->netdev_ops->ndo_do_ioctl) { -#ifdef CONFIG_COMPAT -if (info->flags &IW_REQUEST_FLAG_COMPAT ) { -int ret =0 ; -struct iwreq iwr_lcl; -struct compat_iw_point *iwp_compat = (void *) &iwr->u.data; - -memcpy (&iwr_lcl, iwr,sizeof (struct iwreq )); - iwr_lcl.u.data.pointer =compat_ptr (iwp_compat->pointer); - iwr_lcl.u.data.length = iwp_compat->length; - iwr_lcl.u.data.flags = iwp_compat->flags; - - ret = dev->netdev_ops->ndo_do_ioctl (dev, (void *) &iwr_lcl, cmd); - - iwp_compat->pointer =ptr_to_compat (iwr_lcl.u.data.pointer); - iwp_compat->length = iwr_lcl.u.data.length; - iwp_compat->flags = iwr_lcl.u.data.flags; - -return ret; - } else -#endif -return dev->netdev_ops->ndo_do_ioctl (dev, ifr, cmd); - } +if (dev->netdev_ops->ndo_do_ioctl) +return dev->netdev_ops->ndo_do_ioctl (dev, ifr, cmd);return -EOPNOTSUPP ; }