Linux 4.20.4
Greg KH
maintainerI'm announcing the release of the 4.20.4 kernel.
All users of the 4.20 kernel series must upgrade.
The updated 4.20.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.20.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 17 arch/arm64/boot/dts/marvell/armada-ap806.dtsi | 17 arch/arm64/include/asm/kvm_arm.h | 3 arch/arm64/kernel/head.S | 5 arch/arm64/kernel/kaslr.c | 8 arch/arm64/kvm/hyp/switch.c | 2 arch/mips/Kconfig | 1 arch/mips/bcm47xx/setup.c | 31 + arch/mips/cavium-octeon/setup.c | 2 arch/mips/lantiq/irq.c | 68 --- arch/mips/pci/msi-octeon.c | 4 arch/powerpc/kernel/signal_64.c | 7 arch/x86/xen/time.c | 12 block/partition-generic.c | 8 crypto/authenc.c | 14 crypto/authencesn.c | 2 crypto/sm3_generic.c | 2 drivers/block/loop.c | 443 +++++++++++++---------- drivers/block/loop.h | 1 drivers/block/nbd.c | 5 drivers/crypto/Kconfig | 1 drivers/crypto/bcm/cipher.c | 44 -- drivers/crypto/caam/caamhash.c | 15 drivers/crypto/ccree/cc_aead.c | 40 -- drivers/crypto/talitos.c | 26 - drivers/gpu/drm/drm_atomic_uapi.c | 3 drivers/gpu/drm/drm_fb_helper.c | 7 drivers/gpu/drm/drm_mode_object.c | 4 drivers/gpu/drm/i915/gvt/kvmgt.c | 14 drivers/gpu/drm/rockchip/rockchip_rgb.c | 4 drivers/gpu/drm/vkms/vkms_plane.c | 7 drivers/infiniband/core/nldev.c | 4 drivers/infiniband/hw/vmw_pvrdma/pvrdma.h | 35 + drivers/infiniband/hw/vmw_pvrdma/pvrdma_qp.c | 6 drivers/media/common/videobuf2/videobuf2-core.c | 14 drivers/media/platform/vim2m.c | 4 drivers/media/platform/vivid/vivid-kthread-cap.c | 5 drivers/media/platform/vivid/vivid-kthread-out.c | 5 drivers/media/platform/vivid/vivid-vid-common.c | 2 drivers/media/v4l2-core/v4l2-ioctl.c | 4 drivers/mfd/tps6586x.c | 24 + drivers/misc/mic/vop/vop_main.c | 9 drivers/mmc/host/sdhci-msm.c | 43 ++ drivers/net/bonding/bond_main.c | 3 drivers/net/dsa/realtek-smi.c | 18 drivers/net/ethernet/microchip/lan743x_main.c | 11 drivers/net/ethernet/realtek/r8169.c | 7 drivers/net/phy/bcm87xx.c | 2 drivers/net/phy/cortina.c | 1 drivers/net/phy/meson-gxl.c | 1 drivers/net/phy/micrel.c | 1 drivers/net/phy/phy_device.c | 12 drivers/net/phy/teranetics.c | 1 drivers/net/tun.c | 11 drivers/of/property.c | 1 drivers/remoteproc/remoteproc_virtio.c | 9 drivers/s390/virtio/virtio_ccw.c | 12 drivers/scsi/scsi_pm.c | 26 - drivers/scsi/sd.c | 6 drivers/tty/tty_io.c | 22 - drivers/tty/tty_ldsem.c | 10 drivers/video/fbdev/offb.c | 18 drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c | 2 drivers/virtio/virtio_balloon.c | 98 +++-- drivers/virtio/virtio_mmio.c | 9 drivers/xen/events/events_base.c | 2 fs/block_dev.c | 28 - fs/btrfs/disk-io.c | 8 fs/btrfs/inode.c | 3 fs/pstore/ram.c | 9 include/linux/bcma/bcma_soc.h | 1 include/linux/genhd.h | 2 include/linux/phy.h | 2 include/net/netfilter/nf_conntrack_count.h | 19 include/uapi/linux/in.h | 2 include/uapi/rdma/vmw_pvrdma-abi.h | 1 init/Kconfig | 1 lib/int_sqrt.c | 2 net/bridge/br_netfilter_hooks.c | 2 net/bridge/netfilter/ebtables.c | 6 net/can/gw.c | 30 + net/core/filter.c | 21 - net/core/lwt_bpf.c | 1 net/ipv4/ip_sockglue.c | 12 net/ipv4/tcp_timer.c | 2 net/ipv6/datagram.c | 11 net/ipv6/icmp.c | 8 net/netfilter/nf_conncount.c | 290 ++++++--------- net/netfilter/nft_connlimit.c | 14 net/packet/af_packet.c | 4 net/sctp/ipv6.c | 5 net/sctp/protocol.c | 4 net/smc/af_smc.c | 4 net/sunrpc/rpcb_clnt.c | 8 net/sunrpc/xprtsock.c | 22 + net/tipc/netlink_compat.c | 50 ++ net/tipc/topsrv.c | 2 security/security.c | 7 security/selinux/ss/policydb.c | 3 security/yama/yama_lsm.c | 4 100 files changed, 1122 insertions(+), 721 deletions(-)
Adit Ranadive (1):
RDMA/vmw_pvrdma: Return the correct opcode when creating WR
Andrew Lunn (1):
net: phy: Add missing features to PHY drivers
Ard Biesheuvel (1):
arm64: kaslr: ensure randomized quantities are clean to the PoC
Arnd Bergmann (1):
mips: fix n32 compat_ipc_parse_version
Aurelien Jarno (1):
MIPS: OCTEON: fix kexec support
Aymen Sghaier (1):
crypto: caam - fix zero-length buffer DMA mapping
Breno Leitao (1):
powerpc/tm: Limit TM code inside PPC_TRANSACTIONAL_MEM
Bryan Whitehead (1):
lan743x: Remove phy_read from link status change function
Camelia Groza (1):
net: phy: add missing phy driver features
Christophe Leroy (2):
crypto: talitos - reorder code in talitos_edesc_alloc()
crypto: talitos - fix ablkcipher for CONFIG_VMAP_STACK
Cong Wang (1):
smc: move unhash as early as possible in smc_release()
Daniel Vetter (1):
drm/vkms: Fix plane duplicate_state
David Sterba (1):
Revert "btrfs: balance dirty metadata pages in btrfs_finish_ordered_io"
Dmitry Safonov (4):
tty/ldsem: Wake up readers after timed out down_write()
tty: Hold tty_ldisc_lock() during tty_reopen()
tty: Simplify tty->count math in tty_reopen()
tty: Don't hold ldisc lock in tty_reopen() if ldisc present
Eric Biggers (4):
crypto: sm3 - fix undefined shift by >= width of value
crypto: ccree - convert to use crypto_authenc_extractkeys()
crypto: bcm - convert to use crypto_authenc_extractkeys()
crypto: authenc - fix parsing key with misaligned rta_len
Eric Dumazet (2):
ipv6: fix kernel-infoleak in ipv6_local_error()
ipv6: make icmp6_send() robust against null skb->dev
Florian La Roche (1):
fix int_sqrt64() for very large numbers
Florian Westphal (5):
netfilter: nf_conncount: don't skip eviction when age is negative
netfilter: nf_conncount: split gc in two phases
netfilter: nf_conncount: restart search when nodes have been erased
netfilter: nf_conncount: merge lookup and add functions
netfilter: nf_conncount: fix argument order to find_next_bit
Greg Kroah-Hartman (2):
IN_BADCLASS: fix macro to actually work
Linux 4.20.4
Hans Verkuil (4):
media: vim2m: only cancel work if it is for right context
media: vivid: fix error handling of kthread_run
media: vivid: set min width/height to a value > 0
media: vb2: vb2_mmap: move lock up
Harsh Jain (1):
crypto: authencesn - Avoid twice completion call in decrypt path
Hauke Mehrtens (1):
MIPS: lantiq: Fix IPI interrupt handling
Heiner Kallweit (2):
r8169: load Realtek PHY driver module before r8169
r8169: don't try to read counters if chip is in a PCI power-save state
Heinrich Schuchardt (1):
arm64: dts: marvell: armada-ap806: reserve PSCI area
Ivan Mironov (2):
scsi: sd: Fix cache_type_store()
drm/fb-helper: Ignore the value of fb_var_screeninfo.pixclock
J. Bruce Fields (1):
sunrpc: handle ENOMEM in rpcb_getport_async
Jaegeuk Kim (1):
loop: drop caches if offset or block_size are changed
James Morris (1):
LSM: Check for NULL cred-security on free
Jan Kara (16):
blockdev: Fix livelocks on loop device
loop: Fold __loop_release into loop_release
loop: Get rid of loop_index_mutex
loop: Push lo_ctl_mutex down into individual ioctls
loop: Split setting of lo_state from loop_clr_fd
loop: Push loop_ctl_mutex down into loop_clr_fd()
loop: Push loop_ctl_mutex down to loop_get_status()
loop: Push loop_ctl_mutex down to loop_set_status()
loop: Push loop_ctl_mutex down to loop_set_fd()
loop: Push loop_ctl_mutex down to loop_change_fd()
loop: Move special partition reread handling in loop_clr_fd()
loop: Move loop_reread_partitions() out of loop_ctl_mutex
loop: Fix deadlock when calling blkdev_reread_part()
loop: Avoid circular locking dependency between loop_ctl_mutex and bd_mutex
loop: Get rid of 'nested' acquisition of loop_ctl_mutex
nbd: Use set_blocksize() to set device blocksize
Jason Gunthorpe (1):
packet: Do not leak dev refcounts on error exit
JianJhen Chen (1):
net: bridge: fix a bug on using a neighbour cache entry without checking its state
Johan Hovold (1):
net: dsa: realtek-smi: fix OF child-node lookup
Jonathan Hunter (1):
mfd: tps6586x: Handle interrupts on suspend
Josef Bacik (1):
btrfs: wait on ordered extents on abort cleanup
Juergen Gross (1):
xen: Fix x86 sched_clock() interface for xen
Julia Lawall (2):
drm/rockchip: add missing of_node_put
OF: properties: add missing of_node_put
Kees Cook (2):
Yama: Check for pid death before checking ancestry pstore/ram: Avoid allocation and leak of platform data
Leon Romanovsky (1):
RDMA/nldev: Don't expose unsafe global rkey to regular user
Loic Poulain (1):
mmc: sdhci-msm: Disable CDR function on TX
Mark Rutland (2):
arm64/kvm: consistently handle host HCR_EL2 flags
arm64: Don't trap host pointer auth use to EL2
Masahiro Yamada (2):
kbuild: fix single target build for external module
kbuild: mark prepare0 as PHONY to fix external module build
Mauro Carvalho Chehab (1):
media: vb2: be sure to unlock mutex on errors
Oliver Hartkopp (1):
can: gw: ensure DLC boundaries after CAN frame modification
Pablo Neira Ayuso (2):
netfilter: nf_conncount: move all list iterations under spinlock
netfilter: nf_conncount: speculative garbage collection on empty lists
Paul Burton (1):
kbuild: Disable LD_DEAD_CODE_DATA_ELIMINATION with ftrace & GCC <= 4.7
Rafał Miłecki (1):
MIPS: BCM47XX: Setup struct device for the SoC
Rob Herring (1):
fbdev: offb: Fix OF node name handling
Sakari Ailus (1):
media: v4l: ioctl: Validate num_planes for debug messages
Shakeel Butt (1):
netfilter: ebtables: account ebt_table_info to kmemcg
Shawn Bohrer (1):
netfilter: nf_conncount: replace CONNCOUNT_LOCK_SLOTS with CONNCOUNT_SLOTS
Stanislav Fomichev (1):
tun: publish tfile after it's fully initialized
Stanley Chu (1):
scsi: core: Synchronize request queue PM status only on successful resume
Stephen Smalley (1):
selinux: fix GPF on invalid policy
Tetsuo Handa (4):
gpu/drm: Fix lock held when returning to user space. block/loop: Don't grab "struct file" for vfs_getattr() operation. block/loop: Use global lock for ioctl() operation.
loop: Fix double mutex_unlock(&loop_ctl_mutex) in loop_control_ioctl()
Timotej Lazar (1):
net: phy: meson-gxl: Use the genphy_soft_reset callback
Trond Myklebust (1):
SUNRPC: Fix TCP receive code on archs with flush_dcache_page()
Vlad Tsyrklevich (1):
omap2fb: Fix stack memory disclosure
Wei Wang (2):
virtio: don't allocate vqs when names[i] = NULL
virtio-balloon: tweak config_changed implementation
Willem de Bruijn (3):
bonding: update nest level on unlink
ip: on queued skb use skb_header_pointer instead of pskb_may_pull
bpf: in __bpf_redirect_no_mac pull mac only if present
Xin Long (1):
sctp: allocate sctp_sockaddr_entry with kzalloc
Ying Xue (6):
tipc: fix uninit-value in in tipc_conn_rcv_sub
tipc: fix uninit-value in tipc_nl_compat_link_reset_stats
tipc: fix uninit-value in tipc_nl_compat_bearer_enable
tipc: fix uninit-value in tipc_nl_compat_link_set
tipc: fix uninit-value in tipc_nl_compat_name_table_dump
tipc: fix uninit-value in tipc_nl_compat_doit
Yuchung Cheng (1):
tcp: change txhash on SYN-data timeout
Yufen Yu (1):
block: use rcu_work instead of call_rcu to avoid sleep in softirq
YunQiang Su (1):
Disable MSI also when pcie-octeon.pcie_disable on
Zhenyu Wang (1):
drm/i915/gvt: Fix mmap range check
Greg KH
maintainerMakefile +6 -11
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 4 PATCHLEVEL = 20 -SUBLEVEL = 3 +SUBLEVEL = 4 EXTRAVERSION = NAME = Shy Crocodile
@@ -967,6 +967,7 @@ ifdef CONFIG_STACK_VALIDATION endif endif +PHONY += prepare0 ifeq ($(KBUILD_EXTMOD),) core-y += kernel/ certs/ mm/ fs/ ipc/ security/ crypto/ block/
@@ -1075,8 +1076,7 @@ scripts: scripts_basic scripts_dtc asm-generic gcc-plugins $(autoksyms_h) # archprepare is used in arch Makefiles and when processed asm symlink, # version.h and scripts_basic is processed / created. -# Listed in dependency order -PHONY += prepare archprepare prepare0 prepare1 prepare2 prepare3 +PHONY += prepare archprepare prepare1 prepare2 prepare3 # prepare3 is used to check if we are building in a separate output directory, # and if so do:
@@ -1545,9 +1545,6 @@ else # KBUILD_EXTMOD # We are always building modules KBUILD_MODULES := 1 -PHONY += crmodverdir -crmodverdir: - $(cmd_crmodverdir) PHONY += $(objtree)/Module.symvers $(objtree)/Module.symvers:
@@ -1559,7 +1556,7 @@ $(objtree)/Module.symvers: module-dirs := $(addprefix _module_,$(KBUILD_EXTMOD)) PHONY += $(module-dirs) modules -$(module-dirs): crmodverdir $(objtree)/Module.symvers +$(module-dirs): prepare $(objtree)/Module.symvers $(Q)$(MAKE) $(build)=$(patsubst _module_%,%,$@) modules: $(module-dirs)
@@ -1600,7 +1597,8 @@ help: # Dummies... PHONY += prepare scripts -prepare: ; +prepare: + $(cmd_crmodverdir) scripts: ; endif # KBUILD_EXTMOD
@@ -1724,17 +1722,14 @@ endif # Modules /: prepare scripts FORCE - $(cmd_crmodverdir) $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \ $(build)=$(build-dir) # Make sure the latest headers are built for Documentation Documentation/ samples/: headers_install %/: prepare scripts FORCE - $(cmd_crmodverdir) $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \ $(build)=$(build-dir) %.ko: prepare scripts FORCE - $(cmd_crmodverdir) $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \ $(build)=$(build-dir) $(@:.ko=.o) $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
arch/arm64/boot/dts/marvell/armada-ap806.dtsi +17 -0
@@ -28,6 +28,23 @@ method = "smc"; }; + reserved-memory { + #address-cells = <2>; + #size-cells = <2>; + ranges; + + /* + * This area matches the mapping done with a + * mainline U-Boot, and should be updated by the + * bootloader. + */ + + psci-area@4000000 { + reg = <0x0 0x4000000 0x0 0x200000>; + no-map; + }; + }; + ap806 { #address-cells = <2>; #size-cells = <2>;
arch/arm64/include/asm/kvm_arm.h +3 -0
@@ -24,6 +24,8 @@/* Hyp Configuration Register (HCR) bits */ #define HCR_FWB (UL(1) << 46) +#define HCR_API (UL(1) << 41) +#define HCR_APK (UL(1) << 40)#define HCR_TEA (UL(1) << 37)#define HCR_TERR (UL(1) << 36)#define HCR_TLOR (UL(1) << 35)
@@ -87,6 +89,7 @@ HCR_AMO | HCR_SWIO | HCR_TIDCP | HCR_RW | HCR_TLOR | \ HCR_FMO | HCR_IMO)#define HCR_VIRT_EXCP_MASK (HCR_VSE | HCR_VI | HCR_VF) +#define HCR_HOST_NVHE_FLAGS (HCR_RW | HCR_API | HCR_APK)#define HCR_HOST_VHE_FLAGS (HCR_RW | HCR_TGE | HCR_E2H)/* TCR_EL2 Registers bits */
arch/arm64/kernel/head.S +2 -3
@@ -496,10 +496,9 @@ ENTRY(el2_setup) #endif /* Hyp configuration. */ - mov x0, #HCR_RW // 64-bit EL1 + mov_q x0, HCR_HOST_NVHE_FLAGS cbz x2, set_hcr - orr x0, x0, #HCR_TGE // Enable Host Extensions - orr x0, x0, #HCR_E2H + mov_q x0, HCR_HOST_VHE_FLAGS set_hcr: msr hcr_el2, x0 isb
arch/arm64/kernel/kaslr.c +6 -2
@@ -14,6 +14,7 @@#include <linux/sched.h> #include <linux/types.h> +#include <asm/cacheflush.h> #include <asm/fixmap.h> #include <asm/kernel-pgtable.h> #include <asm/memory.h>
@@ -43,7 +44,7 @@ static __init u64 get_kaslr_seed(void *fdt)return ret; } -static __init const u8 *get_cmdline (void *fdt) +static __init const u8 *kaslr_get_cmdline (void *fdt) {static __initconst const u8 default_cmdline[] =CONFIG_CMDLINE ;
@@ -109,7 +110,7 @@ u64 __init kaslr_early_init(u64 dt_phys)* Check if 'nokaslr' appears on the command line, and * return 0 if that is the case. */ - cmdline =get_cmdline (fdt); + cmdline =kaslr_get_cmdline (fdt); str =strstr (cmdline,"nokaslr" );if (str == cmdline || (str > cmdline && *(str -1 ) ==' ' ))return 0 ;
@@ -169,5 +170,8 @@ u64 __init kaslr_early_init(u64 dt_phys) module_alloc_base += (module_range * (seed & ((1 <<21 ) -1 ))) >>21 ; module_alloc_base &=PAGE_MASK ; +__flush_dcache_area (&module_alloc_base,sizeof (module_alloc_base)); +__flush_dcache_area (&memstart_offset_seed,sizeof (memstart_offset_seed)); +return offset; }
arch/arm64/kvm/hyp/switch.c +1 -1
@@ -157,7 +157,7 @@ static void __hyp_text __deactivate_traps_nvhe(void) mdcr_el2 |=MDCR_EL2_E2PB_MASK <<MDCR_EL2_E2PB_SHIFT ;write_sysreg (mdcr_el2, mdcr_el2); -write_sysreg (HCR_RW , hcr_el2); +write_sysreg (HCR_HOST_NVHE_FLAGS , hcr_el2);write_sysreg (CPTR_EL2_DEFAULT , cptr_el2); }
arch/mips/Kconfig +1 -0
@@ -3184,6 +3184,7 @@ config MIPS32_O32 config MIPS32_N32 bool "Kernel support for n32 binaries" depends on 64BIT + select ARCH_WANT_COMPAT_IPC_PARSE_VERSION select COMPAT select MIPS32_COMPAT select SYSVIPC_COMPAT if SYSVIPC
arch/mips/bcm47xx/setup.c +31 -0
@@ -173,6 +173,31 @@ void __init plat_mem_setup(void) pm_power_off = bcm47xx_machine_halt; } +#ifdef CONFIG_BCM47XX_BCMA +static struct device *__init bcm47xx_setup_device (void ) +{ +struct device *dev; +int err; + + dev =kzalloc (sizeof (*dev),GFP_KERNEL ); +if (!dev) +return NULL ; + + err =dev_set_name (dev,"bcm47xx_soc" ); +if (err) { +pr_err ("Failed to set SoC device name: %d\n" , err); +kfree (dev); +return NULL ; + } + + err =dma_coerce_mask_and_coherent (dev,DMA_BIT_MASK (32 )); +if (err) +pr_err ("Failed to set SoC DMA mask: %d\n" , err); + +return dev; +} +#endif +/* * This finishes bus initialization doing things that were not possible without * kmalloc. Make sure to call it late enough (after mm_init).
@@ -183,6 +208,10 @@ void __init bcm47xx_bus_setup(void)if (bcm47xx_bus_type ==BCM47XX_BUS_TYPE_BCMA ) {int err; + bcm47xx_bus.bcma.dev =bcm47xx_setup_device (); +if (!bcm47xx_bus.bcma.dev) +panic ("Failed to setup SoC device\n" ); + err =bcma_host_soc_init (&bcm47xx_bus.bcma);if (err)panic ("Failed to initialize BCMA bus (err %d)" , err);
@@ -235,6 +264,8 @@ static int __init bcm47xx_register_bus_complete(void)#endif #ifdef CONFIG_BCM47XX_BCMA case BCM47XX_BUS_TYPE_BCMA : +if (device_register (bcm47xx_bus.bcma.dev)) +pr_err ("Failed to register SoC device\n" );bcma_bus_register (&bcm47xx_bus.bcma.bus);break ;#endif
arch/mips/cavium-octeon/setup.c +1 -1
@@ -96,7 +96,7 @@ static void octeon_kexec_smp_down(void *ignored)" sync \n" " synci ($0) \n"); - relocated_kexec_smp_wait(NULL); + kexec_reboot(); }#endif
arch/mips/lantiq/irq.c +5 -63
98 lines not on this page · raw message
arch/mips/pci/msi-octeon.c +3 -1
@@ -369,7 +369,9 @@ int __init octeon_msi_initialize(void)int irq;struct irq_chip *msi; -if (octeon_dma_bar_type ==OCTEON_DMA_BAR_TYPE_PCIE ) { +if (octeon_dma_bar_type ==OCTEON_DMA_BAR_TYPE_INVALID ) { +return 0 ; + }else if (octeon_dma_bar_type ==OCTEON_DMA_BAR_TYPE_PCIE ) { msi_rcv_reg[0 ] =CVMX_PEXP_NPEI_MSI_RCV0 ; msi_rcv_reg[1 ] =CVMX_PEXP_NPEI_MSI_RCV1 ; msi_rcv_reg[2 ] =CVMX_PEXP_NPEI_MSI_RCV2 ;
arch/powerpc/kernel/signal_64.c +4 -3
@@ -755,11 +755,12 @@ SYSCALL_DEFINE0(rt_sigreturn)if (restore_tm_sigcontexts (current, &uc->uc_mcontext, &uc_transact->uc_mcontext)) goto badframe; - } + } else#endif -/* Fall through, for non-TM restore */ -if (!MSR_TM_ACTIVE (msr)) { + {/* +* Fall through, for non-TM restore +* * Unset MSR[TS] on the thread regs since MSR from user * context does not have MSR active, and recheckpoint was * not called since restore_tm_sigcontexts() was not called
arch/x86/xen/time.c +9 -3
@@ -361,8 +361,6 @@ void xen_timer_resume(void) {int cpu; -pvclock_resume (); -if (xen_clockevent != &xen_vcpuop_clockevent)return ;
@@ -379,12 +377,15 @@ static const struct pv_time_ops xen_time_ops __initconst = { };static struct pvclock_vsyscall_time_info *xen_clock__read_mostly ; +static u64 xen_clock_value_saved;void xen_save_time_memory_area (void ) {struct vcpu_register_time_memory_area t;int ret; + xen_clock_value_saved =xen_clocksource_read () - xen_sched_clock_offset; +if (!xen_clock)return ;
@@ -404,7 +405,7 @@ void xen_restore_time_memory_area(void)int ret;if (!xen_clock) -return ; + goto out; t.addr.v = &xen_clock->pvti;
@@ -421,6 +422,11 @@ void xen_restore_time_memory_area(void)if (ret !=0 )pr_notice ("Cannot restore secondary vcpu_time_info (err %d)" , ret); + +out: +/* Need pvclock_resume() before using xen_clocksource_read(). */ +pvclock_resume (); + xen_sched_clock_offset =xen_clocksource_read () - xen_clock_value_saved; }static void xen_setup_vsyscall_time_info (void )
block/partition-generic.c +5 -3
@@ -249,9 +249,10 @@ struct device_type part_type = { .uevent = part_uevent, }; -static void delete_partition_rcu_cb (struct rcu_head *head) +static void delete_partition_work_fn (struct work_struct *work) { - struct hd_struct *part = container_of(head, struct hd_struct, rcu_head); + struct hd_struct *part = container_of(to_rcu_work(work), struct hd_struct, + rcu_work); part->start_sect =0 ; part->nr_sects =0 ;
@@ -262,7 +263,8 @@ static void delete_partition_rcu_cb(struct rcu_head *head)void __delete_partition (struct percpu_ref *ref) { struct hd_struct *part = container_of(ref, struct hd_struct, ref); -call_rcu (&part->rcu_head, delete_partition_rcu_cb); +INIT_RCU_WORK (&part->rcu_work, delete_partition_work_fn); +queue_rcu_work (system_wq, &part->rcu_work); }/*
crypto/authenc.c +11 -3
@@ -58,14 +58,22 @@ int crypto_authenc_extractkeys(struct crypto_authenc_keys *keys, const u8 *key,return -EINVAL ;if (rta->rta_type !=CRYPTO_AUTHENC_KEYA_PARAM )return -EINVAL ; -if (RTA_PAYLOAD (rta) <sizeof (*param)) + +/* +* RTA_OK() didn't align the rtattr's payload when validating that it +* fits in the buffer. Yet, the keys should start on the next 4-byte +* aligned boundary. To avoid confusion, require that the rtattr +* payload be exactly the param struct, which has a 4-byte aligned size. +*/ +if (RTA_PAYLOAD (rta) !=sizeof (*param))return -EINVAL ; +BUILD_BUG_ON (sizeof (*param) %RTA_ALIGNTO ); param =RTA_DATA (rta); keys->enckeylen =be32_to_cpu (param->enckeylen); - key +=RTA_ALIGN (rta->rta_len); - keylen -=RTA_ALIGN (rta->rta_len); + key += rta->rta_len; + keylen -= rta->rta_len;if (keylen < keys->enckeylen)return -EINVAL ;
crypto/authencesn.c +1 -1
@@ -279,7 +279,7 @@ static void authenc_esn_verify_ahash_done(struct crypto_async_request *areq,struct aead_request *req = areq->data; err = err ?:crypto_authenc_esn_decrypt_tail (req,0 ); -aead_request_complete (req, err); +authenc_esn_request_complete (req, err); }static int crypto_authenc_esn_decrypt (struct aead_request *req)
crypto/sm3_generic.c +1 -1
@@ -100,7 +100,7 @@ static void sm3_compress(u32 *w, u32 *wt, u32 *m)for (i =0 ; i <=63 ; i++) { - ss1 =rol32 ((rol32 (a,12 ) + e +rol32 (t (i), i)),7 ); + ss1 =rol32 ((rol32 (a,12 ) + e +rol32 (t (i), i &31 )),7 ); ss2 = ss1 ^rol32 (a,12 );
drivers/block/loop.c +266 -177
800 lines not on this page · raw message
drivers/block/loop.h +0 -1
@@ -54,7 +54,6 @@ struct loop_device {spinlock_t lo_lock;int lo_state; -struct mutex lo_ctl_mutex;struct kthread_worker worker;struct task_struct *worker_task;bool use_dio;
drivers/block/nbd.c +3 -2
@@ -288,9 +288,10 @@ static void nbd_size_update(struct nbd_device *nbd)blk_queue_physical_block_size (nbd->disk->queue, config->blksize);set_capacity (nbd->disk, config->bytesize >>9 );if (bdev) { -if (bdev->bd_disk) +if (bdev->bd_disk) {bd_set_size (bdev, config->bytesize); -else +set_blocksize (bdev, config->blksize); + }else bdev->bd_invalidated =1 ;bdput (bdev); }
drivers/crypto/Kconfig +1 -0
@@ -692,6 +692,7 @@ config CRYPTO_DEV_BCM_SPU depends on ARCH_BCM_IPROC depends on MAILBOX default m + select CRYPTO_AUTHENC select CRYPTO_DES select CRYPTO_MD5 select CRYPTO_SHA1
drivers/crypto/bcm/cipher.c +13 -31
80 lines not on this page · raw message
drivers/crypto/caam/caamhash.c +9 -6
@@ -1071,13 +1071,16 @@ static int ahash_final_no_ctx(struct ahash_request *req) desc = edesc->hw_desc; - state->buf_dma =dma_map_single (jrdev, buf, buflen,DMA_TO_DEVICE ); -if (dma_mapping_error (jrdev, state->buf_dma)) { -dev_err (jrdev,"unable to map src\n" ); - goto unmap; - } +if (buflen) { + state->buf_dma =dma_map_single (jrdev, buf, buflen, +DMA_TO_DEVICE ); +if (dma_mapping_error (jrdev, state->buf_dma)) { +dev_err (jrdev,"unable to map src\n" ); + goto unmap; + } -append_seq_in_ptr (desc, state->buf_dma, buflen,0 ); +append_seq_in_ptr (desc, state->buf_dma, buflen,0 ); + } edesc->dst_dma =map_seq_out_ptr_result (desc, jrdev, req->result, digestsize);
drivers/crypto/ccree/cc_aead.c +19 -21
@@ -540,13 +540,12 @@ static int cc_aead_setkey(struct crypto_aead *tfm, const u8 *key, unsigned int keylen) {struct cc_aead_ctx *ctx =crypto_aead_ctx (tfm); -struct rtattr *rta = (struct rtattr *)key;struct cc_crypto_req cc_req = {}; -struct crypto_authenc_key_param *param;struct cc_hw_desc desc[MAX_AEAD_SETKEY_SEQ ]; -int rc = -EINVAL ;unsigned int seq_len =0 ;struct device *dev =drvdata_to_dev (ctx->drvdata); +const u8 *enckey, *authkey; +int rc;dev_dbg (dev,"Setting key in context @%p for %s. key=%p keylen=%u\n" , ctx,crypto_tfm_alg_name (crypto_aead_tfm (tfm)), key, keylen);
@@ -554,35 +553,33 @@ static int cc_aead_setkey(struct crypto_aead *tfm, const u8 *key,/* STAT_PHASE_0: Init and sanity checks */ if (ctx->auth_mode !=DRV_HASH_NULL ) {/* authenc() alg. */ -if (!RTA_OK (rta, keylen)) - goto badkey; -if (rta->rta_type !=CRYPTO_AUTHENC_KEYA_PARAM ) - goto badkey; -if (RTA_PAYLOAD (rta) <sizeof (*param)) - goto badkey; - param =RTA_DATA (rta); - ctx->enc_keylen =be32_to_cpu (param->enckeylen); - key +=RTA_ALIGN (rta->rta_len); - keylen -=RTA_ALIGN (rta->rta_len); -if (keylen < ctx->enc_keylen) +struct crypto_authenc_keys keys; + + rc =crypto_authenc_extractkeys (&keys, key, keylen); +if (rc) goto badkey; - ctx->auth_keylen = keylen - ctx->enc_keylen; + enckey = keys.enckey; + authkey = keys.authkey; + ctx->enc_keylen = keys.enckeylen; + ctx->auth_keylen = keys.authkeylen;if (ctx->cipher_mode ==DRV_CIPHER_CTR ) {/* the nonce is stored in bytes at end of key */ + rc = -EINVAL ;if (ctx->enc_keylen < (AES_MIN_KEY_SIZE +CTR_RFC3686_NONCE_SIZE )) goto badkey;/* Copy nonce from last 4 bytes in CTR key to * first 4 bytes in CTR IV */ -memcpy (ctx->ctr_nonce, key + ctx->auth_keylen + - ctx->enc_keylen -CTR_RFC3686_NONCE_SIZE , -CTR_RFC3686_NONCE_SIZE ); +memcpy (ctx->ctr_nonce, enckey + ctx->enc_keylen - +CTR_RFC3686_NONCE_SIZE ,CTR_RFC3686_NONCE_SIZE );/* Set CTR key size */ ctx->enc_keylen -=CTR_RFC3686_NONCE_SIZE ; } }else {/* non-authenc - has just one key */ + enckey = key; + authkey =NULL ; ctx->enc_keylen = keylen; ctx->auth_keylen =0 ; }
@@ -594,13 +591,14 @@ static int cc_aead_setkey(struct crypto_aead *tfm, const u8 *key,/* STAT_PHASE_1: Copy key to ctx */ /* Get key material */ -memcpy (ctx->enckey, key + ctx->auth_keylen, ctx->enc_keylen); +memcpy (ctx->enckey, enckey, ctx->enc_keylen);if (ctx->enc_keylen ==24 )memset (ctx->enckey +24 ,0 ,CC_AES_KEY_SIZE_MAX -24 );if (ctx->auth_mode ==DRV_HASH_XCBC_MAC ) { -memcpy (ctx->auth_state.xcbc.xcbc_keys, key, ctx->auth_keylen); +memcpy (ctx->auth_state.xcbc.xcbc_keys, authkey, + ctx->auth_keylen); }else if (ctx->auth_mode !=DRV_HASH_NULL ) {/* HMAC */ - rc =cc_get_plain_hmac_key (tfm, key, ctx->auth_keylen); + rc =cc_get_plain_hmac_key (tfm, authkey, ctx->auth_keylen);if (rc) goto badkey; }
drivers/crypto/talitos.c +9 -17
@@ -1361,23 +1361,18 @@ static struct talitos_edesc *talitos_edesc_alloc(struct device *dev,struct talitos_private *priv =dev_get_drvdata (dev);bool is_sec1 =has_ftr_sec1 (priv);int max_len = is_sec1 ?TALITOS1_MAX_DATA_LEN :TALITOS2_MAX_DATA_LEN ; -void *err;if (cryptlen + authsize > max_len) {dev_err (dev,"length exceeds h/w max limit\n" );return ERR_PTR (-EINVAL ); } -if (ivsize) - iv_dma =dma_map_single (dev, iv, ivsize,DMA_TO_DEVICE ); -if (!dst || dst == src) { src_len = assoclen + cryptlen + authsize; src_nents =sg_nents_for_len (src, src_len);if (src_nents <0 ) {dev_err (dev,"Invalid number of src SG.\n" ); - err =ERR_PTR (-EINVAL ); - goto error_sg; +return ERR_PTR (-EINVAL ); } src_nents = (src_nents ==1 ) ?0 : src_nents; dst_nents = dst ? src_nents :0 ;
@@ -1387,16 +1382,14 @@ static struct talitos_edesc *talitos_edesc_alloc(struct device *dev, src_nents =sg_nents_for_len (src, src_len);if (src_nents <0 ) {dev_err (dev,"Invalid number of src SG.\n" ); - err =ERR_PTR (-EINVAL ); - goto error_sg; +return ERR_PTR (-EINVAL ); } src_nents = (src_nents ==1 ) ?0 : src_nents; dst_len = assoclen + cryptlen + (encrypt ? authsize :0 ); dst_nents =sg_nents_for_len (dst, dst_len);if (dst_nents <0 ) {dev_err (dev,"Invalid number of dst SG.\n" ); - err =ERR_PTR (-EINVAL ); - goto error_sg; +return ERR_PTR (-EINVAL ); } dst_nents = (dst_nents ==1 ) ?0 : dst_nents; }
@@ -1423,11 +1416,14 @@ static struct talitos_edesc *talitos_edesc_alloc(struct device *dev,/* if its a ahash, add space for a second desc next to the first one */ if (is_sec1 && !dst) alloc_len +=sizeof (struct talitos_desc ); + alloc_len += ivsize; edesc =kmalloc (alloc_len,GFP_DMA | flags); -if (!edesc) { - err =ERR_PTR (-ENOMEM ); - goto error_sg; +if (!edesc) +return ERR_PTR (-ENOMEM ); +if (ivsize) { + iv =memcpy (((u8 *)edesc) + alloc_len - ivsize, iv, ivsize); + iv_dma =dma_map_single (dev, iv, ivsize,DMA_TO_DEVICE ); }memset (&edesc->desc,0 ,sizeof (edesc->desc));
@@ -1445,10 +1441,6 @@ static struct talitos_edesc *talitos_edesc_alloc(struct device *dev, DMA_BIDIRECTIONAL); }return edesc; -error_sg: -if (iv_dma) -dma_unmap_single (dev, iv_dma, ivsize,DMA_TO_DEVICE ); -return err; } static struct talitos_edesc *aead_edesc_alloc(struct aead_request *areq, u8 *iv,
drivers/gpu/drm/drm_atomic_uapi.c +1 -2
@@ -1275,12 +1275,11 @@ int drm_mode_atomic_ioctl(struct drm_device *dev, (arg->flags & DRM_MODE_PAGE_FLIP_EVENT))return -EINVAL ; -drm_modeset_acquire_init (&ctx,DRM_MODESET_ACQUIRE_INTERRUPTIBLE ); - state =drm_atomic_state_alloc (dev);if (!state)return -ENOMEM ; +drm_modeset_acquire_init (&ctx,DRM_MODESET_ACQUIRE_INTERRUPTIBLE ); state->acquire_ctx = &ctx; state->allow_modeset = !!(arg->flags &DRM_MODE_ATOMIC_ALLOW_MODESET );
drivers/gpu/drm/drm_fb_helper.c +6 -1
@@ -1690,9 +1690,14 @@ int drm_fb_helper_check_var(struct fb_var_screeninfo *var,struct drm_fb_helper *fb_helper = info->par;struct drm_framebuffer *fb = fb_helper->fb; -if (var->pixclock !=0 ||in_dbg_master ()) +if (in_dbg_master ())return -EINVAL ; +if (var->pixclock !=0 ) { +DRM_DEBUG ("fbdev emulation doesn't support changing the pixel clock, value of pixclock is ignored\n" ); + var->pixclock =0 ; + } +/* * Changes struct fb_var_screeninfo are currently not pushed back * to KMS, hence fail if different settings are requested.
drivers/gpu/drm/drm_mode_object.c +2 -2
@@ -458,11 +458,11 @@ static int set_property_atomic(struct drm_mode_object *obj,struct drm_modeset_acquire_ctx ctx;int ret; -drm_modeset_acquire_init (&ctx,0 ); - state =drm_atomic_state_alloc (dev);if (!state)return -ENOMEM ; + +drm_modeset_acquire_init (&ctx,0 ); state->acquire_ctx = &ctx; retry:if (prop == state->dev->mode_config.dpms_property) {
drivers/gpu/drm/i915/gvt/kvmgt.c +12 -2
@@ -996,7 +996,7 @@ static int intel_vgpu_mmap(struct mdev_device *mdev, struct vm_area_struct *vma) {unsigned int index;u64 virtaddr; -unsigned long req_size, pgoff =0 ; +unsigned long req_size, pgoff, req_start;pgprot_t pg_prot;struct intel_vgpu *vgpu =mdev_get_drvdata (mdev);
@@ -1014,7 +1014,17 @@ static int intel_vgpu_mmap(struct mdev_device *mdev, struct vm_area_struct *vma) pg_prot = vma->vm_page_prot; virtaddr = vma->vm_start; req_size = vma->vm_end - vma->vm_start; - pgoff =vgpu_aperture_pa_base (vgpu) >>PAGE_SHIFT ; + pgoff = vma->vm_pgoff & + ((1U << (VFIO_PCI_OFFSET_SHIFT -PAGE_SHIFT )) -1 ); + req_start = pgoff <<PAGE_SHIFT ; + +if (!intel_vgpu_in_aperture (vgpu, req_start)) +return -EINVAL ; +if (req_start + req_size > +vgpu_aperture_offset (vgpu) +vgpu_aperture_sz (vgpu)) +return -EINVAL ; + + pgoff = (gvt_aperture_pa_base (vgpu->gvt) >>PAGE_SHIFT ) + pgoff;return remap_pfn_range (vma, virtaddr, pgoff, req_size, pg_prot); }
drivers/gpu/drm/rockchip/rockchip_rgb.c +3 -1
@@ -113,8 +113,10 @@ struct rockchip_rgb *rockchip_rgb_init(struct device *dev, child_count++; ret =drm_of_find_panel_or_bridge (dev->of_node,0 , endpoint_id, &panel, &bridge); -if (!ret) +if (!ret) { +of_node_put (endpoint);break ; + } }of_node_put (port);
drivers/gpu/drm/vkms/vkms_plane.c +5 -2
@@ -23,8 +23,11 @@ vkms_plane_duplicate_state(struct drm_plane *plane)return NULL ; crc_data =kzalloc (sizeof (*crc_data),GFP_KERNEL ); -if (WARN_ON (!crc_data)) -DRM_INFO ("Couldn't allocate crc_data" ); +if (!crc_data) { +DRM_DEBUG_KMS ("Couldn't allocate crc_data\n" ); +kfree (vkms_state); +return NULL ; + } vkms_state->crc_data = crc_data;
drivers/infiniband/core/nldev.c +0 -4
@@ -580,10 +580,6 @@ static int fill_res_pd_entry(struct sk_buff *msg, struct netlink_callback *cb,if (nla_put_u64_64bit (msg,RDMA_NLDEV_ATTR_RES_USECNT ,atomic_read (&pd->usecnt),RDMA_NLDEV_ATTR_PAD )) goto err; -if ((pd->flags &IB_PD_UNSAFE_GLOBAL_RKEY ) && -nla_put_u32 (msg,RDMA_NLDEV_ATTR_RES_UNSAFE_GLOBAL_RKEY , - pd->unsafe_global_rkey)) - goto err;if (fill_res_name_pid (msg, res)) goto err;
drivers/infiniband/hw/vmw_pvrdma/pvrdma.h +34 -1
@@ -427,7 +427,40 @@ static inline enum ib_qp_state pvrdma_qp_state_to_ib(enum pvrdma_qp_state state)static inline enum pvrdma_wr_opcode ib_wr_opcode_to_pvrdma (enum ib_wr_opcode op) { -return (enum pvrdma_wr_opcode )op; +switch (op) { +case IB_WR_RDMA_WRITE : +return PVRDMA_WR_RDMA_WRITE ; +case IB_WR_RDMA_WRITE_WITH_IMM : +return PVRDMA_WR_RDMA_WRITE_WITH_IMM ; +case IB_WR_SEND : +return PVRDMA_WR_SEND ; +case IB_WR_SEND_WITH_IMM : +return PVRDMA_WR_SEND_WITH_IMM ; +case IB_WR_RDMA_READ : +return PVRDMA_WR_RDMA_READ ; +case IB_WR_ATOMIC_CMP_AND_SWP : +return PVRDMA_WR_ATOMIC_CMP_AND_SWP ; +case IB_WR_ATOMIC_FETCH_AND_ADD : +return PVRDMA_WR_ATOMIC_FETCH_AND_ADD ; +case IB_WR_LSO : +return PVRDMA_WR_LSO ; +case IB_WR_SEND_WITH_INV : +return PVRDMA_WR_SEND_WITH_INV ; +case IB_WR_RDMA_READ_WITH_INV : +return PVRDMA_WR_RDMA_READ_WITH_INV ; +case IB_WR_LOCAL_INV : +return PVRDMA_WR_LOCAL_INV ; +case IB_WR_REG_MR : +return PVRDMA_WR_FAST_REG_MR ; +case IB_WR_MASKED_ATOMIC_CMP_AND_SWP : +return PVRDMA_WR_MASKED_ATOMIC_CMP_AND_SWP ; +case IB_WR_MASKED_ATOMIC_FETCH_AND_ADD : +return PVRDMA_WR_MASKED_ATOMIC_FETCH_AND_ADD ; +case IB_WR_REG_SIG_MR : +return PVRDMA_WR_REG_SIG_MR ; +default : +return PVRDMA_WR_ERROR ; + } } static inline enum ib_wc_status pvrdma_wc_status_to_ib(
drivers/infiniband/hw/vmw_pvrdma/pvrdma_qp.c +6 -0
@@ -721,6 +721,12 @@ int pvrdma_post_send(struct ib_qp *ibqp, const struct ib_send_wr *wr, wr->opcode == IB_WR_RDMA_WRITE_WITH_IMM) wqe_hdr->ex.imm_data = wr->ex.imm_data; +if (unlikely (wqe_hdr->opcode ==PVRDMA_WR_ERROR )) { + *bad_wr = wr; + ret = -EINVAL ; + goto out; + } +switch (qp->ibqp.qp_type) {case IB_QPT_GSI :case IB_QPT_UD :
drivers/media/common/videobuf2/videobuf2-core.c +10 -4
@@ -2146,9 +2146,13 @@ int vb2_mmap(struct vb2_queue *q, struct vm_area_struct *vma)return -EINVAL ; } } + +mutex_lock (&q->mmap_lock); +if (vb2_fileio_is_active (q)) {dprintk (1 ,"mmap: file io in progress\n" ); -return -EBUSY ; + ret = -EBUSY ; + goto unlock; }/*
@@ -2156,7 +2160,7 @@ int vb2_mmap(struct vb2_queue *q, struct vm_area_struct *vma)*/ ret =__find_plane_by_offset (q, off, &buffer, &plane);if (ret) -return ret; + goto unlock; vb = q->bufs[buffer];
@@ -2169,11 +2173,13 @@ int vb2_mmap(struct vb2_queue *q, struct vm_area_struct *vma)if (length < (vma->vm_end - vma->vm_start)) {dprintk (1 ,"MMAP invalid, as it would overflow buffer length\n" ); -return -EINVAL ; + ret = -EINVAL ; + goto unlock; } -mutex_lock (&q->mmap_lock); ret =call_memop (vb, mmap, vb->planes[plane].mem_priv, vma); + +unlock:mutex_unlock (&q->mmap_lock);if (ret)return ret;
drivers/media/platform/vim2m.c +3 -1
@@ -809,7 +809,9 @@ static void vim2m_stop_streaming(struct vb2_queue *q)struct vb2_v4l2_buffer *vbuf;unsigned long flags; -cancel_delayed_work_sync (&dev->work_run); +if (v4l2_m2m_get_curr_priv (dev->m2m_dev) == ctx) +cancel_delayed_work_sync (&dev->work_run); +for (;;) {if (V4L2_TYPE_IS_OUTPUT (q->type)) vbuf =v4l2_m2m_src_buf_remove (ctx->fh.m2m_ctx);
drivers/media/platform/vivid/vivid-kthread-cap.c +4 -1
@@ -873,8 +873,11 @@ int vivid_start_generating_vid_cap(struct vivid_dev *dev, bool *pstreaming) "%s-vid-cap", dev->v4l2_dev.name);if (IS_ERR (dev->kthread_vid_cap)) { +int err =PTR_ERR (dev->kthread_vid_cap); + + dev->kthread_vid_cap =NULL ;v4l2_err (&dev->v4l2_dev,"kernel_thread() failed\n" ); -return PTR_ERR (dev->kthread_vid_cap); +return err; } *pstreaming = true;vivid_grab_controls (dev, true);
drivers/media/platform/vivid/vivid-kthread-out.c +4 -1
@@ -244,8 +244,11 @@ int vivid_start_generating_vid_out(struct vivid_dev *dev, bool *pstreaming) "%s-vid-out", dev->v4l2_dev.name);if (IS_ERR (dev->kthread_vid_out)) { +int err =PTR_ERR (dev->kthread_vid_out); + + dev->kthread_vid_out =NULL ;v4l2_err (&dev->v4l2_dev,"kernel_thread() failed\n" ); -return PTR_ERR (dev->kthread_vid_out); +return err; } *pstreaming = true;vivid_grab_controls (dev, true);
drivers/media/platform/vivid/vivid-vid-common.c +1 -1
@@ -21,7 +21,7 @@ const struct v4l2_dv_timings_cap vivid_dv_timings_cap = { .type = V4L2_DV_BT_656_1120, /* keep this initialization for compatibility with GCC < 4.4.6 */ .reserved = { 0 }, -V4L2_INIT_BT_TIMINGS (0 ,MAX_WIDTH ,0 ,MAX_HEIGHT ,14000000 ,775000000 , +V4L2_INIT_BT_TIMINGS (16 ,MAX_WIDTH ,16 ,MAX_HEIGHT ,14000000 ,775000000 ,V4L2_DV_BT_STD_CEA861 |V4L2_DV_BT_STD_DMT |V4L2_DV_BT_STD_CVT |V4L2_DV_BT_STD_GTF ,V4L2_DV_BT_CAP_PROGRESSIVE |V4L2_DV_BT_CAP_INTERLACED )
drivers/media/v4l2-core/v4l2-ioctl.c +3 -1
@@ -286,6 +286,7 @@ static void v4l_print_format(const void *arg, bool write_only)const struct v4l2_window *win;const struct v4l2_sdr_format *sdr;const struct v4l2_meta_format *meta; +u32 planes;unsigned i;pr_cont ("type=%s" ,prt_names (p->type, v4l2_type_names));
@@ -316,7 +317,8 @@ static void v4l_print_format(const void *arg, bool write_only)prt_names (mp->field, v4l2_field_names), mp->colorspace, mp->num_planes, mp->flags, mp->ycbcr_enc, mp->quantization, mp->xfer_func); -for (i =0 ; i < mp->num_planes; i++) + planes =min_t (u32, mp->num_planes,VIDEO_MAX_PLANES ); +for (i =0 ; i < planes; i++)printk (KERN_DEBUG "plane %u: bytesperline=%u sizeimage=%u\n" , i, mp->plane_fmt[i].bytesperline, mp->plane_fmt[i].sizeimage);
drivers/mfd/tps6586x.c +24 -0
@@ -592,6 +592,29 @@ static int tps6586x_i2c_remove(struct i2c_client *client)return 0 ; } +static int __maybe_unused tps6586x_i2c_suspend (struct device *dev) +{ +struct tps6586x *tps6586x =dev_get_drvdata (dev); + +if (tps6586x->client->irq) +disable_irq (tps6586x->client->irq); + +return 0 ; +} + +static int __maybe_unused tps6586x_i2c_resume (struct device *dev) +{ +struct tps6586x *tps6586x =dev_get_drvdata (dev); + +if (tps6586x->client->irq) +enable_irq (tps6586x->client->irq); + +return 0 ; +} + +static SIMPLE_DEV_PM_OPS(tps6586x_pm_ops, tps6586x_i2c_suspend, + tps6586x_i2c_resume); +static const struct i2c_device_id tps6586x_id_table[] = { {"tps6586x" ,0 }, { },
@@ -602,6 +625,7 @@ static struct i2c_driver tps6586x_driver = { .driver = { .name = "tps6586x", .of_match_table = of_match_ptr(tps6586x_of_match), + .pm = &tps6586x_pm_ops, }, .probe = tps6586x_i2c_probe, .remove = tps6586x_i2c_remove,
drivers/misc/mic/vop/vop_main.c +7 -2
@@ -381,16 +381,21 @@ static int vop_find_vqs(struct virtio_device *dev, unsigned nvqs,struct _vop_vdev *vdev =to_vopvdev (dev);struct vop_device *vpdev = vdev->vpdev;struct mic_device_ctrl __iomem *dc = vdev->dc; -int i, err, retry; +int i, err, retry, queue_idx =0 ;/* We must have this many virtqueues. */ if (nvqs >ioread8 (&vdev->desc->num_vq))return -ENOENT ;for (i =0 ; i < nvqs; ++i) { +if (!names[i]) { + vqs[i] =NULL ; +continue ; + } +dev_dbg (_vop_dev (vdev),"%s: %d: %s\n" , __func__, i, names[i]); - vqs[i] =vop_find_vq (dev, i, callbacks[i], names[i], + vqs[i] =vop_find_vq (dev, queue_idx++, callbacks[i], names[i], ctx ? ctx[i] : false);if (IS_ERR (vqs[i])) { err =PTR_ERR (vqs[i]);
drivers/mmc/host/sdhci-msm.c +42 -1
68 lines not on this page · raw message
drivers/net/bonding/bond_main.c +3 -0
@@ -1948,6 +1948,9 @@ static int __bond_release_one(struct net_device *bond_dev,if (!bond_has_slaves (bond)) {bond_set_carrier (bond);eth_hw_addr_random (bond_dev); + bond->nest_level =SINGLE_DEPTH_NESTING ; + }else { + bond->nest_level =dev_get_nest_level (bond_dev) +1 ; }unblock_netpoll_tx ();
drivers/net/dsa/realtek-smi.c +13 -5
@@ -347,16 +347,17 @@ int realtek_smi_setup_mdio(struct realtek_smi *smi)struct device_node *mdio_np;int ret; - mdio_np =of_find_compatible_node (smi->dev->of_node,NULL , -"realtek,smi-mdio" ); + mdio_np =of_get_compatible_child (smi->dev->of_node,"realtek,smi-mdio" );if (!mdio_np) {dev_err (smi->dev,"no MDIO bus node\n" );return -ENODEV ; } smi->slave_mii_bus =devm_mdiobus_alloc (smi->dev); -if (!smi->slave_mii_bus) -return -ENOMEM ; +if (!smi->slave_mii_bus) { + ret = -ENOMEM ; + goto err_put_node; + } smi->slave_mii_bus->priv = smi; smi->slave_mii_bus->name ="SMI slave MII" ; smi->slave_mii_bus->read = realtek_smi_mdio_read;
@@ -371,10 +372,15 @@ int realtek_smi_setup_mdio(struct realtek_smi *smi)if (ret) {dev_err (smi->dev,"unable to register MDIO bus %s\n" , smi->slave_mii_bus->id); -of_node_put (mdio_np); + goto err_put_node; }return 0 ; + +err_put_node: +of_node_put (mdio_np); + +return ret; }static int realtek_smi_probe (struct platform_device *pdev)
@@ -457,6 +463,8 @@ static int realtek_smi_remove(struct platform_device *pdev)struct realtek_smi *smi =dev_get_drvdata (&pdev->dev);dsa_unregister_switch (smi->ds); +if (smi->slave_mii_bus) +of_node_put (smi->slave_mii_bus->dev.of_node);gpiod_set_value (smi->reset,1 );return 0 ;
drivers/net/ethernet/microchip/lan743x_main.c +4 -7
@@ -962,13 +962,10 @@ static void lan743x_phy_link_status_change(struct net_device *netdev)memset (&ksettings,0 ,sizeof (ksettings));phy_ethtool_get_link_ksettings (netdev, &ksettings); - local_advertisement =phy_read (phydev,MII_ADVERTISE ); -if (local_advertisement <0 ) -return ; - - remote_advertisement =phy_read (phydev,MII_LPA ); -if (remote_advertisement <0 ) -return ; + local_advertisement = +ethtool_adv_to_mii_adv_t (phydev->advertising); + remote_advertisement = +ethtool_adv_to_mii_adv_t (phydev->lp_advertising); lan743x_phy_update_flowcontrol(adapter, ksettings.base.duplex,
drivers/net/ethernet/realtek/r8169.c +5 -2
@@ -714,6 +714,7 @@ module_param(use_dac, int, 0);MODULE_PARM_DESC (use_dac,"Enable PCI DAC. Unsafe on 32 bit PCI slot." );module_param_named (debug, debug.msg_enable, int,0 );MODULE_PARM_DESC (debug,"Debug verbosity level (0=none, ..., 16=all)" ); +MODULE_SOFTDEP ("pre: realtek" );MODULE_LICENSE ("GPL" );MODULE_FIRMWARE (FIRMWARE_8168D_1 );MODULE_FIRMWARE (FIRMWARE_8168D_2 );
@@ -1728,11 +1729,13 @@ static bool rtl8169_reset_counters(struct rtl8169_private *tp)static bool rtl8169_update_counters (struct rtl8169_private *tp) { +u8 val =RTL_R8 (tp, ChipCmd); +/* * Some chips are unable to dump tally counters when the receiver -* is disabled. +* is disabled. If 0xff chip may be in a PCI power-save state. */ -if ((RTL_R8 (tp, ChipCmd) & CmdRxEnb) ==0 ) +if (!(val & CmdRxEnb) || val ==0xff )return true;return rtl8169_do_counters (tp, CounterDump);
drivers/net/phy/bcm87xx.c +2 -0
@@ -193,6 +193,7 @@ static struct phy_driver bcm87xx_driver[] = { .phy_id = PHY_ID_BCM8706, .phy_id_mask = 0xffffffff, .name = "Broadcom BCM8706", + .features = PHY_10GBIT_FEC_FEATURES, .flags = PHY_HAS_INTERRUPT, .config_init = bcm87xx_config_init, .config_aneg = bcm87xx_config_aneg,
@@ -205,6 +206,7 @@ static struct phy_driver bcm87xx_driver[] = { .phy_id = PHY_ID_BCM8727, .phy_id_mask = 0xffffffff, .name = "Broadcom BCM8727", + .features = PHY_10GBIT_FEC_FEATURES, .flags = PHY_HAS_INTERRUPT, .config_init = bcm87xx_config_init, .config_aneg = bcm87xx_config_aneg,
drivers/net/phy/cortina.c +1 -0
@@ -88,6 +88,7 @@ static struct phy_driver cortina_driver[] = { .phy_id = PHY_ID_CS4340, .phy_id_mask = 0xffffffff, .name = "Cortina CS4340", + .features = PHY_10GBIT_FEATURES, .config_init = gen10g_config_init, .config_aneg = gen10g_config_aneg, .read_status = cortina_read_status,
drivers/net/phy/meson-gxl.c +1 -0
@@ -233,6 +233,7 @@ static struct phy_driver meson_gxl_phy[] = { .name = "Meson GXL Internal PHY", .features = PHY_BASIC_FEATURES, .flags = PHY_IS_INTERNAL | PHY_HAS_INTERRUPT, + .soft_reset = genphy_soft_reset, .config_init = meson_gxl_config_init, .aneg_done = genphy_aneg_done, .read_status = meson_gxl_read_status,
drivers/net/phy/micrel.c +1 -0
@@ -1105,6 +1105,7 @@ static struct phy_driver ksphy_driver[] = { .phy_id = PHY_ID_KSZ8873MLL, .phy_id_mask = MICREL_PHY_ID_MASK, .name = "Micrel KSZ8873MLL Switch", + .features = PHY_BASIC_FEATURES, .config_init = kszphy_config_init, .config_aneg = ksz8873mll_config_aneg, .read_status = ksz8873mll_read_status,
drivers/net/phy/phy_device.c +12 -0
@@ -61,6 +61,9 @@ EXPORT_SYMBOL_GPL(phy_gbit_all_ports_features);__ETHTOOL_DECLARE_LINK_MODE_MASK (phy_10gbit_features)__ro_after_init ;EXPORT_SYMBOL_GPL (phy_10gbit_features); +__ETHTOOL_DECLARE_LINK_MODE_MASK (phy_10gbit_fec_features)__ro_after_init ; +EXPORT_SYMBOL_GPL (phy_10gbit_fec_features); +static const int phy_basic_ports_array[] = { ETHTOOL_LINK_MODE_Autoneg_BIT,ETHTOOL_LINK_MODE_TP_BIT ,
@@ -102,6 +105,11 @@ static const int phy_10gbit_features_array[] = { ETHTOOL_LINK_MODE_10000baseT_Full_BIT, }; +const int phy_10gbit_fec_features_array[1 ] = { + ETHTOOL_LINK_MODE_10000baseR_FEC_BIT, +}; +EXPORT_SYMBOL_GPL (phy_10gbit_fec_features_array); +__ETHTOOL_DECLARE_LINK_MODE_MASK (phy_10gbit_full_features)__ro_after_init ;EXPORT_SYMBOL_GPL (phy_10gbit_full_features);
@@ -184,6 +192,10 @@ static void features_init(void)linkmode_set_bit_array (phy_10gbit_full_features_array,ARRAY_SIZE (phy_10gbit_full_features_array), phy_10gbit_full_features); +/* 10G FEC only */ +linkmode_set_bit_array (phy_10gbit_fec_features_array, +ARRAY_SIZE (phy_10gbit_fec_features_array), + phy_10gbit_fec_features); }void phy_device_free (struct phy_device *phydev)
drivers/net/phy/teranetics.c +1 -0
@@ -80,6 +80,7 @@ static struct phy_driver teranetics_driver[] = { .phy_id = PHY_ID_TN2020, .phy_id_mask = 0xffffffff, .name = "Teranetics TN2020", + .features = PHY_10GBIT_FEATURES, .soft_reset = gen10g_no_soft_reset, .aneg_done = teranetics_aneg_done, .config_init = gen10g_config_init,
drivers/net/tun.c +7 -4
@@ -852,10 +852,6 @@ static int tun_attach(struct tun_struct *tun, struct file *file, err =0 ; } -rcu_assign_pointer (tfile->tun, tun); -rcu_assign_pointer (tun->tfiles[tun->numqueues], tfile); - tun->numqueues++; -if (tfile->detached) {tun_enable_queue (tfile); }else {
@@ -872,6 +868,13 @@ static int tun_attach(struct tun_struct *tun, struct file *file,* refcnt. */ +/* Publish tfile->tun and tun->tfiles only after we've fully +* initialized tfile; otherwise we risk using half-initialized +* object. +*/ +rcu_assign_pointer (tfile->tun, tun); +rcu_assign_pointer (tun->tfiles[tun->numqueues], tfile); + tun->numqueues++; out:return err; }
drivers/of/property.c +1 -0
@@ -806,6 +806,7 @@ struct device_node *of_graph_get_remote_node(const struct device_node *node,if (!of_device_is_available (remote)) {pr_debug ("not available for remote node\n" ); +of_node_put (remote);return NULL ; }
drivers/remoteproc/remoteproc_virtio.c +7 -2
@@ -153,10 +153,15 @@ static int rproc_virtio_find_vqs(struct virtio_device *vdev, unsigned int nvqs,const bool * ctx, struct irq_affinity *desc) { - int i, ret; + int i, ret, queue_idx = 0;for (i =0 ; i < nvqs; ++i) { - vqs[i] =rp_find_vq (vdev, i, callbacks[i], names[i], +if (!names[i]) { + vqs[i] =NULL ; +continue ; + } + + vqs[i] =rp_find_vq (vdev, queue_idx++, callbacks[i], names[i], ctx ? ctx[i] : false);if (IS_ERR (vqs[i])) { ret =PTR_ERR (vqs[i]);
drivers/s390/virtio/virtio_ccw.c +9 -3
@@ -635,7 +635,7 @@ static int virtio_ccw_find_vqs(struct virtio_device *vdev, unsigned nvqs, {struct virtio_ccw_device *vcdev =to_vc_device (vdev);unsigned long *indicatorp =NULL ; -int ret, i; +int ret, i, queue_idx =0 ;struct ccw1 *ccw; ccw =kzalloc (sizeof (*ccw),GFP_DMA |GFP_KERNEL );
@@ -643,8 +643,14 @@ static int virtio_ccw_find_vqs(struct virtio_device *vdev, unsigned nvqs,return -ENOMEM ;for (i =0 ; i < nvqs; ++i) { - vqs[i] =virtio_ccw_setup_vq (vdev, i, callbacks[i], names[i], - ctx ? ctx[i] : false, ccw); +if (!names[i]) { + vqs[i] =NULL ; +continue ; + } + + vqs[i] =virtio_ccw_setup_vq (vdev, queue_idx++, callbacks[i], + names[i], ctx ? ctx[i] : false, + ccw);if (IS_ERR (vqs[i])) { ret =PTR_ERR (vqs[i]); vqs[i] =NULL ;
drivers/scsi/scsi_pm.c +15 -11
@@ -80,8 +80,22 @@ static int scsi_dev_type_resume(struct device *dev,if (err ==0 ) {pm_runtime_disable (dev); -pm_runtime_set_active (dev); + err =pm_runtime_set_active (dev);pm_runtime_enable (dev); + +/* +* Forcibly set runtime PM status of request queue to "active" +* to make sure we can again get requests from the queue +* (see also blk_pm_peek_request()). +* +* The resume hook will correct runtime PM status of the disk. +*/ +if (!err &&scsi_is_sdev_device (dev)) { +struct scsi_device *sdev =to_scsi_device (dev); + +if (sdev->request_queue->dev) +blk_set_runtime_active (sdev->request_queue); + } }return err;
@@ -140,16 +154,6 @@ static int scsi_bus_resume_common(struct device *dev,else fn =NULL ; -/* -* Forcibly set runtime PM status of request queue to "active" to -* make sure we can again get requests from the queue (see also -* blk_pm_peek_request()). -* -* The resume hook will correct runtime PM status of the disk. -*/ -if (scsi_is_sdev_device (dev) &&pm_runtime_suspended (dev)) -blk_set_runtime_active (to_scsi_device (dev)->request_queue); -if (fn) {async_schedule_domain (fn, dev, &scsi_sd_pm_domain);
drivers/scsi/sd.c +6 -0
@@ -206,6 +206,12 @@ cache_type_store(struct device *dev, struct device_attribute *attr, sp = buffer_data[0 ] &0x80 ?1 :0 ; buffer_data[0 ] &= ~0x80 ; +/* +* Ensure WP, DPOFUA, and RESERVED fields are cleared in +* received mode parameter buffer before doing MODE SELECT. +*/ + data.device_specific =0 ; +if (scsi_mode_select (sdp,1 , sp,8 , buffer_data, len,SD_TIMEOUT ,SD_MAX_RETRIES , &data, &sshdr)) {if (scsi_sense_valid (&sshdr))
drivers/tty/tty_io.c +15 -7
@@ -1256,7 +1256,8 @@ static void tty_driver_remove_tty(struct tty_driver *driver, struct tty_struct *static int tty_reopen (struct tty_struct *tty) {struct tty_driver *driver = tty->driver; -int retval; +struct tty_ldisc *ld; +int retval =0 ;if (driver->type ==TTY_DRIVER_TYPE_PTY && driver->subtype ==PTY_TYPE_MASTER )
@@ -1268,14 +1269,21 @@ static int tty_reopen(struct tty_struct *tty)if (test_bit (TTY_EXCLUSIVE , &tty->flags) && !capable (CAP_SYS_ADMIN ))return -EBUSY ; - tty->count++; + ld =tty_ldisc_ref_wait (tty); +if (ld) { +tty_ldisc_deref (ld); + }else { + retval =tty_ldisc_lock (tty,5 *HZ ); +if (retval) +return retval; -if (tty->ldisc) -return 0 ; +if (!tty->ldisc) + retval =tty_ldisc_reinit (tty, tty->termios.c_line); +tty_ldisc_unlock (tty); + } - retval =tty_ldisc_reinit (tty, tty->termios.c_line); -if (retval) - tty->count--; +if (retval ==0 ) + tty->count++;return retval; }
drivers/tty/tty_ldsem.c +10 -0
@@ -293,6 +293,16 @@ down_write_failed(struct ld_semaphore *sem, long count, long timeout)if (!locked)atomic_long_add_return (-LDSEM_WAIT_BIAS , &sem->count);list_del (&waiter.list); + +/* +* In case of timeout, wake up every reader who gave the right of way +* to writer. Prevent separation readers into two groups: +* one that helds semaphore and another that sleeps. +* (in case of no contention with a writer) +*/ +if (!locked &&list_empty (&sem->write_wait)) +__ldsem_wake_readers (sem); +raw_spin_unlock_irq (&sem->wait_lock);__set_current_state (TASK_RUNNING );
drivers/video/fbdev/offb.c +9 -9
@@ -318,28 +318,28 @@ static void __iomem *offb_map_reg(struct device_node *np, int index, }static void offb_init_palette_hacks (struct fb_info *info,struct device_node *dp, -const char *name,unsigned long address) +unsigned long address) {struct offb_par *par = (struct offb_par *) info->par; -if (dp && !strncmp (name,"ATY,Rage128" ,11 )) { +if (of_node_name_prefix (dp,"ATY,Rage128" )) { par->cmap_adr =offb_map_reg (dp,2 ,0 ,0x1fff );if (par->cmap_adr) par->cmap_type = cmap_r128; - }else if (dp && (!strncmp (name,"ATY,RageM3pA" ,12 ) - || !strncmp (name,"ATY,RageM3p12A" ,14 ))) { + }else if (of_node_name_prefix (dp,"ATY,RageM3pA" ) || +of_node_name_prefix (dp,"ATY,RageM3p12A" )) { par->cmap_adr =offb_map_reg (dp,2 ,0 ,0x1fff );if (par->cmap_adr) par->cmap_type = cmap_M3A; - }else if (dp && !strncmp (name,"ATY,RageM3pB" ,12 )) { + }else if (of_node_name_prefix (dp,"ATY,RageM3pB" )) { par->cmap_adr =offb_map_reg (dp,2 ,0 ,0x1fff );if (par->cmap_adr) par->cmap_type = cmap_M3B; - }else if (dp && !strncmp (name,"ATY,Rage6" ,9 )) { + }else if (of_node_name_prefix (dp,"ATY,Rage6" )) { par->cmap_adr =offb_map_reg (dp,1 ,0 ,0x1fff );if (par->cmap_adr) par->cmap_type = cmap_radeon; - }else if (!strncmp (name,"ATY," ,4 )) { + }else if (of_node_name_prefix (dp,"ATY," )) {unsigned long base = address &0xff000000UL ; par->cmap_adr =ioremap (base +0x7ff000 ,0x1000 ) +0xcc0 ;
@@ -350,7 +350,7 @@ static void offb_init_palette_hacks(struct fb_info *info, struct device_node *dp par->cmap_adr =offb_map_reg (dp,0 ,0x6000 ,0x1000 );if (par->cmap_adr) par->cmap_type = cmap_gxt2000; - }else if (dp && !strncmp (name,"vga,Display-" ,12 )) { + }else if (of_node_name_prefix (dp,"vga,Display-" )) {/* Look for AVIVO initialized by SLOF */ struct device_node *pciparent =of_get_parent (dp);const u32 *vid, *did;
@@ -438,7 +438,7 @@ static void __init offb_init_fb(const char *name, par->cmap_type = cmap_unknown;if (depth ==8 ) -offb_init_palette_hacks (info, dp, name, address); +offb_init_palette_hacks (info, dp, address);else fix->visual =FB_VISUAL_TRUECOLOR ;
drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c +2 -0
@@ -609,6 +609,8 @@ int omapfb_ioctl(struct fb_info *fbi, unsigned int cmd, unsigned long arg)int r =0 ; +memset (&p,0 ,sizeof (p)); +switch (cmd) {case OMAPFB_SYNC_GFX :DBG ("ioctl SYNC_GFX\n" );
drivers/virtio/virtio_balloon.c +65 -33
166 lines not on this page · raw message
drivers/virtio/virtio_mmio.c +7 -2
@@ -468,7 +468,7 @@ static int vm_find_vqs(struct virtio_device *vdev, unsigned nvqs, {struct virtio_mmio_device *vm_dev =to_virtio_mmio_device (vdev);unsigned int irq =platform_get_irq (vm_dev->pdev,0 ); -int i, err; +int i, err, queue_idx =0 ; err =request_irq (irq, vm_interrupt,IRQF_SHARED ,dev_name (&vdev->dev), vm_dev);
@@ -476,7 +476,12 @@ static int vm_find_vqs(struct virtio_device *vdev, unsigned nvqs,return err;for (i =0 ; i < nvqs; ++i) { - vqs[i] =vm_setup_vq (vdev, i, callbacks[i], names[i], +if (!names[i]) { + vqs[i] =NULL ; +continue ; + } + + vqs[i] =vm_setup_vq (vdev, queue_idx++, callbacks[i], names[i], ctx ? ctx[i] : false);if (IS_ERR (vqs[i])) {vm_del_vqs (vdev);
drivers/xen/events/events_base.c +1 -1
@@ -1650,7 +1650,7 @@ void xen_callback_vector(void) xen_have_vector_callback =0 ;return ; } -pr_info ("Xen HVM callback vector for event delivery is enabled\n" ); +pr_info_once ("Xen HVM callback vector for event delivery is enabled\n" );alloc_intr_gate (HYPERVISOR_CALLBACK_VECTOR , xen_hvm_callback_vector); }
fs/block_dev.c +18 -10
@@ -104,6 +104,20 @@ void invalidate_bdev(struct block_device *bdev) }EXPORT_SYMBOL (invalidate_bdev); +static void set_init_blocksize (struct block_device *bdev) +{ +unsigned bsize =bdev_logical_block_size (bdev); +loff_t size =i_size_read (bdev->bd_inode); + +while (bsize <PAGE_SIZE ) { +if (size & bsize) +break ; + bsize <<=1 ; + } + bdev->bd_block_size = bsize; + bdev->bd_inode->i_blkbits =blksize_bits (bsize); +} +int set_blocksize (struct block_device *bdev,int size) {/* Size must be a power of two, and between 512 and PAGE_SIZE */
@@ -1408,18 +1422,9 @@ EXPORT_SYMBOL(check_disk_change);void bd_set_size (struct block_device *bdev,loff_t size) { -unsigned bsize =bdev_logical_block_size (bdev); -inode_lock (bdev->bd_inode);i_size_write (bdev->bd_inode, size);inode_unlock (bdev->bd_inode); -while (bsize <PAGE_SIZE ) { -if (size & bsize) -break ; - bsize <<=1 ; - } - bdev->bd_block_size = bsize; - bdev->bd_inode->i_blkbits =blksize_bits (bsize); }EXPORT_SYMBOL (bd_set_size);
@@ -1496,8 +1501,10 @@ static int __blkdev_get(struct block_device *bdev, fmode_t mode, int for_part) } } -if (!ret) +if (!ret) {bd_set_size (bdev,(loff_t )get_capacity (disk)<<9 ); +set_init_blocksize (bdev); + }/* * If the device is invalidated, rescan partition
@@ -1532,6 +1539,7 @@ static int __blkdev_get(struct block_device *bdev, fmode_t mode, int for_part) goto out_clear; }bd_set_size (bdev, (loff_t )bdev->bd_part->nr_sects <<9 ); +set_init_blocksize (bdev); }if (bdev->bd_bdi == &noop_backing_dev_info)
fs/btrfs/disk-io.c +8 -0
@@ -4155,6 +4155,14 @@ static void btrfs_destroy_all_ordered_extents(struct btrfs_fs_info *fs_info)spin_lock (&fs_info->ordered_root_lock); }spin_unlock (&fs_info->ordered_root_lock); + +/* +* We need this here because if we've been flipped read-only we won't +* get sync() from the umount, so we need to make sure any ordered +* extents that haven't had their dirty pages IO start writeout yet +* actually get run and error out properly. +*/ +btrfs_wait_ordered_roots (fs_info,U64_MAX ,0 , (u64)-1 ); } static int btrfs_destroy_delayed_refs(struct btrfs_transaction *trans,
fs/btrfs/inode.c +0 -3
@@ -3147,9 +3147,6 @@ static int btrfs_finish_ordered_io(struct btrfs_ordered_extent *ordered_extent)/* once for the tree */ btrfs_put_ordered_extent (ordered_extent); -/* Try to release some metadata so we don't get an OOM but don't wait */ -btrfs_btree_balance_dirty_nodelay (fs_info); -return ret; }
fs/pstore/ram.c +3 -6
@@ -723,18 +723,15 @@ static int ramoops_probe(struct platform_device *pdev) {struct device *dev = &pdev->dev;struct ramoops_platform_data *pdata = dev->platform_data; +struct ramoops_platform_data pdata_local;struct ramoops_context *cxt = &oops_cxt;size_t dump_mem_sz;phys_addr_t paddr;int err = -EINVAL ;if (dev_of_node (dev) && !pdata) { - pdata =devm_kzalloc (&pdev->dev,sizeof (*pdata),GFP_KERNEL ); -if (!pdata) { -pr_err ("cannot allocate platform data buffer\n" ); - err = -ENOMEM ; - goto fail_out; - } + pdata = &pdata_local; +memset (pdata,0 ,sizeof (*pdata)); err =ramoops_parse_dt (pdev, pdata);if (err <0 )
include/linux/bcma/bcma_soc.h +1 -0
@@ -6,6 +6,7 @@struct bcma_soc {struct bcma_bus bus; +struct device *dev; };int __init bcma_host_soc_register (struct bcma_soc *soc);
include/linux/genhd.h +1 -1
@@ -129,7 +129,7 @@ struct hd_struct {struct disk_stats dkstats;#endif struct percpu_ref ref; -struct rcu_head rcu_head; +struct rcu_work rcu_work; };#define GENHD_FL_REMOVABLE 1
include/linux/phy.h +2 -0
@@ -48,6 +48,7 @@ extern __ETHTOOL_DECLARE_LINK_MODE_MASK(phy_gbit_features) __ro_after_init;extern __ETHTOOL_DECLARE_LINK_MODE_MASK (phy_gbit_fibre_features)__ro_after_init ;extern __ETHTOOL_DECLARE_LINK_MODE_MASK (phy_gbit_all_ports_features)__ro_after_init ;extern __ETHTOOL_DECLARE_LINK_MODE_MASK (phy_10gbit_features)__ro_after_init ; +extern __ETHTOOL_DECLARE_LINK_MODE_MASK (phy_10gbit_fec_features)__ro_after_init ;extern __ETHTOOL_DECLARE_LINK_MODE_MASK (phy_10gbit_full_features)__ro_after_init ;#define PHY_BASIC_FEATURES ((unsigned long *)&phy_basic_features)
@@ -56,6 +57,7 @@ extern __ETHTOOL_DECLARE_LINK_MODE_MASK(phy_10gbit_full_features) __ro_after_ini#define PHY_GBIT_FIBRE_FEATURES ((unsigned long *)&phy_gbit_fibre_features)#define PHY_GBIT_ALL_PORTS_FEATURES ((unsigned long *)&phy_gbit_all_ports_features)#define PHY_10GBIT_FEATURES ((unsigned long *)&phy_10gbit_features) +#define PHY_10GBIT_FEC_FEATURES ((unsigned long *)&phy_10gbit_fec_features)#define PHY_10GBIT_FULL_FEATURES ((unsigned long *)&phy_10gbit_full_features)/*
include/net/netfilter/nf_conntrack_count.h +3 -16
@@ -5,17 +5,10 @@struct nf_conncount_data ; -enum nf_conncount_list_add { -NF_CONNCOUNT_ADDED ,/* list add was ok */ -NF_CONNCOUNT_ERR ,/* -ENOMEM, must drop skb */ -NF_CONNCOUNT_SKIP ,/* list is already reclaimed by gc */ -}; -struct nf_conncount_list {spinlock_t list_lock;struct list_head head;/* connections with the same filtering key */ unsigned int count;/* length of list */ -bool dead; }; struct nf_conncount_data *nf_conncount_init(struct net *net, unsigned int family,
@@ -29,18 +22,12 @@ unsigned int nf_conncount_count(struct net *net,const struct nf_conntrack_tuple *tuple, const struct nf_conntrack_zone *zone); -void nf_conncount_lookup (struct net *net,struct nf_conncount_list *list, -const struct nf_conntrack_tuple *tuple, -const struct nf_conntrack_zone *zone, -bool *addit); +int nf_conncount_add (struct net *net,struct nf_conncount_list *list, +const struct nf_conntrack_tuple *tuple, +const struct nf_conntrack_zone *zone);void nf_conncount_list_init (struct nf_conncount_list *list); -enum nf_conncount_list_add -nf_conncount_add (struct nf_conncount_list *list, -const struct nf_conntrack_tuple *tuple, -const struct nf_conntrack_zone *zone); -bool nf_conncount_gc_list (struct net *net,struct nf_conncount_list *list);
include/uapi/linux/in.h +1 -1
@@ -268,7 +268,7 @@ struct sockaddr_in {#define IN_MULTICAST (a) IN_CLASSD(a)#define IN_MULTICAST_NET 0xe0000000 -#define IN_BADCLASS (a) ((((long int) (a) ) == 0xffffffff) +#define IN_BADCLASS (a) (((long int) (a) ) == (long int)0xffffffff)#define IN_EXPERIMENTAL (a) IN_BADCLASS((a))#define IN_CLASSE (a) ((((long int) (a)) & 0xf0000000) == 0xf0000000)
include/uapi/rdma/vmw_pvrdma-abi.h +1 -0
@@ -78,6 +78,7 @@ enum pvrdma_wr_opcode {PVRDMA_WR_MASKED_ATOMIC_FETCH_AND_ADD ,PVRDMA_WR_BIND_MW ,PVRDMA_WR_REG_SIG_MR , + PVRDMA_WR_ERROR, }; enum pvrdma_wc_status {
init/Kconfig +1 -0
@@ -1130,6 +1130,7 @@ config LD_DEAD_CODE_DATA_ELIMINATION bool "Dead code and data elimination (EXPERIMENTAL)" depends on HAVE_LD_DEAD_CODE_DATA_ELIMINATION depends on EXPERT + depends on !(FUNCTION_TRACER && CC_IS_GCC && GCC_VERSION < 40800) depends on $(cc-option,-ffunction-sections -fdata-sections) depends on $(ld-option,--gc-sections) help
lib/int_sqrt.c +1 -1
@@ -52,7 +52,7 @@ u32 int_sqrt64(u64 x)if (x <=ULONG_MAX )return int_sqrt ((unsigned long ) x); - m =1ULL << (fls64 (x) & ~1ULL ); + m =1ULL << ((fls64 (x) -1 ) & ~1ULL );while (m !=0 ) { b = y + m; y >>=1 ;
net/bridge/br_netfilter_hooks.c +1 -1
@@ -278,7 +278,7 @@ int br_nf_pre_routing_finish_bridge(struct net *net, struct sock *sk, struct sk_struct nf_bridge_info *nf_bridge =nf_bridge_info_get (skb);int ret; -if (neigh->hh.hh_len) { +if ((neigh->nud_state &NUD_CONNECTED ) && neigh->hh.hh_len) {neigh_hh_bridge (&neigh->hh, skb); skb->dev = nf_bridge->physindev; ret =br_handle_frame_finish (net, sk, skb);
net/bridge/netfilter/ebtables.c +4 -2
@@ -1137,14 +1137,16 @@ static int do_replace(struct net *net, const void __user *user, tmp.name[sizeof (tmp.name) -1 ] =0 ; countersize =COUNTER_OFFSET (tmp.nentries) * nr_cpu_ids; - newinfo =vmalloc (sizeof (*newinfo) + countersize); + newinfo =__vmalloc (sizeof (*newinfo) + countersize,GFP_KERNEL_ACCOUNT , +PAGE_KERNEL );if (!newinfo)return -ENOMEM ;if (countersize)memset (newinfo->counters,0 , countersize); - newinfo->entries =vmalloc (tmp.entries_size); + newinfo->entries =__vmalloc (tmp.entries_size,GFP_KERNEL_ACCOUNT , +PAGE_KERNEL );if (!newinfo->entries) { ret = -ENOMEM ; goto free_newinfo;
net/can/gw.c +27 -3
@@ -416,13 +416,29 @@ static void can_can_gw_rcv(struct sk_buff *skb, void *data)while (modidx <MAX_MODFUNCTIONS && gwj->mod.modfunc[modidx]) (*gwj->mod.modfunc[modidx++])(cf, &gwj->mod); -/* check for checksum updates when the CAN frame has been modified */ +/* Has the CAN frame been modified? */ if (modidx) { -if (gwj->mod.csumfunc.crc8) +/* get available space for the processed CAN frame type */ +int max_len = nskb->len - offsetof(struct can_frame , data); + +/* dlc may have changed, make sure it fits to the CAN frame */ +if (cf->can_dlc > max_len) + goto out_delete; + +/* check for checksum updates in classic CAN length only */ +if (gwj->mod.csumfunc.crc8) { +if (cf->can_dlc >8 ) + goto out_delete; + (*gwj->mod.csumfunc.crc8)(cf, &gwj->mod.csum.crc8); + } + +if (gwj->mod.csumfunc.xor) { +if (cf->can_dlc >8 ) + goto out_delete; -if (gwj->mod.csumfunc.xor) (*gwj->mod.csumfunc.xor)(cf, &gwj->mod.csum.xor); + } }/* clear the skb timestamp if not configured the other way */
@@ -434,6 +450,14 @@ static void can_can_gw_rcv(struct sk_buff *skb, void *data) gwj->dropped_frames++; else gwj->handled_frames++; + +return ; + + out_delete: +/* delete frame due to misconfiguration */ + gwj->deleted_frames++; +kfree_skb (nskb); +return ; }static inline int cgw_register_filter (struct net *net,struct cgw_job *gwj)
net/core/filter.c +11 -10
@@ -2023,18 +2023,19 @@ static inline int __bpf_tx_skb(struct net_device *dev, struct sk_buff *skb)static int __bpf_redirect_no_mac (struct sk_buff *skb,struct net_device *dev,u32 flags) { -/* skb->mac_len is not set on normal egress */ -unsigned int mlen = skb->network_header - skb->mac_header; +unsigned int mlen =skb_network_offset (skb); -__skb_pull (skb, mlen); +if (mlen) { +__skb_pull (skb, mlen); -/* At ingress, the mac header has already been pulled once. -* At egress, skb_pospull_rcsum has to be done in case that -* the skb is originated from ingress (i.e. a forwarded skb) -* to ensure that rcsum starts at net header. -*/ -if (!skb_at_tc_ingress (skb)) -skb_postpull_rcsum (skb,skb_mac_header (skb), mlen); +/* At ingress, the mac header has already been pulled once. +* At egress, skb_pospull_rcsum has to be done in case that +* the skb is originated from ingress (i.e. a forwarded skb) +* to ensure that rcsum starts at net header. +*/ +if (!skb_at_tc_ingress (skb)) +skb_postpull_rcsum (skb,skb_mac_header (skb), mlen); + }skb_pop_mac_header (skb);skb_reset_mac_len (skb); return flags & BPF_F_INGRESS ?
net/core/lwt_bpf.c +1 -0
@@ -63,6 +63,7 @@ static int run_lwt_bpf(struct sk_buff *skb, struct bpf_lwt_prog *lwt, lwt->name ? : "<unknown>"); ret =BPF_OK ; }else { +skb_reset_mac_header (skb); ret =skb_do_redirect (skb);if (ret ==0 ) ret =BPF_REDIRECT ;
net/ipv4/ip_sockglue.c +5 -7
@@ -148,19 +148,17 @@ static void ip_cmsg_recv_security(struct msghdr *msg, struct sk_buff *skb)static void ip_cmsg_recv_dstaddr (struct msghdr *msg,struct sk_buff *skb) { +__be16 _ports[2 ], *ports;struct sockaddr_in sin; -__be16 *ports; -int end; - - end =skb_transport_offset (skb) +4 ; -if (end >0 && !pskb_may_pull (skb, end)) -return ;/* All current transport protocols have the port numbers in the * first four bytes of the transport header and this function is * written with this assumption in mind. */ - ports = (__be16 *)skb_transport_header (skb); + ports =skb_header_pointer (skb,skb_transport_offset (skb), +sizeof (_ports), &_ports); +if (!ports) +return ; sin.sin_family =AF_INET ; sin.sin_addr.s_addr =ip_hdr (skb)->daddr;
net/ipv4/tcp_timer.c +1 -1
@@ -226,7 +226,7 @@ static int tcp_write_timeout(struct sock *sk)if ((1 << sk->sk_state) & (TCPF_SYN_SENT |TCPF_SYN_RECV )) {if (icsk->icsk_retransmits) {dst_negative_advice (sk); - }else if (!tp->syn_data && !tp->syn_fastopen) { + }else {sk_rethink_txhash (sk); } retry_until = icsk->icsk_syn_retries ? : net->ipv4.sysctl_tcp_syn_retries;
net/ipv6/datagram.c +5 -6
@@ -341,6 +341,7 @@ void ipv6_local_error(struct sock *sk, int err, struct flowi6 *fl6, u32 info)skb_reset_network_header (skb); iph =ipv6_hdr (skb); iph->daddr = fl6->daddr; +ip6_flow_hdr (iph,0 ,0 ); serr =SKB_EXT_ERR (skb); serr->ee.ee_errno = err;
@@ -700,17 +701,15 @@ void ip6_datagram_recv_specific_ctl(struct sock *sk, struct msghdr *msg, }if (np->rxopt.bits.rxorigdstaddr) {struct sockaddr_in6 sin6; -__be16 *ports; -int end; +__be16 _ports[2 ], *ports; - end =skb_transport_offset (skb) +4 ; -if (end <=0 ||pskb_may_pull (skb, end)) { + ports =skb_header_pointer (skb,skb_transport_offset (skb), +sizeof (_ports), &_ports); +if (ports) {/* All current transport protocols have the port numbers in the * first four bytes of the transport header and this function is * written with this assumption in mind. */ - ports = (__be16 *)skb_transport_header (skb); - sin6.sin6_family =AF_INET6 ; sin6.sin6_addr =ipv6_hdr (skb)->daddr; sin6.sin6_port = ports[1 ];
net/ipv6/icmp.c +6 -2
@@ -421,10 +421,10 @@ static int icmp6_iif(const struct sk_buff *skb)static void icmp6_send (struct sk_buff *skb,u8 type,u8 code,__u32 info,const struct in6_addr *force_saddr) { -struct net *net =dev_net (skb->dev);struct inet6_dev *idev =NULL ;struct ipv6hdr *hdr =ipv6_hdr (skb);struct sock *sk; +struct net *net;struct ipv6_pinfo *np;const struct in6_addr *saddr =NULL ;struct dst_entry *dst;
@@ -435,12 +435,16 @@ static void icmp6_send(struct sk_buff *skb, u8 type, u8 code, __u32 info,int iif =0 ;int addr_type =0 ;int len; -u32 mark =IP6_REPLY_MARK (net, skb->mark); +u32 mark;if ((u8 *)hdr < skb->head || (skb_network_header (skb) +sizeof (*hdr)) >skb_tail_pointer (skb))return ; +if (!skb->dev) +return ; + net =dev_net (skb->dev); + mark =IP6_REPLY_MARK (net, skb->mark);/* * Make sure we respect the rules * i.e. RFC 1885 2.4(e)
net/netfilter/nf_conncount.c +128 -162
114 lines not on this page · raw message
net/tipc/netlink_compat.c +49 -1
50 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.