Linux 4.19.46
Greg KH
maintainerI'm announcing the release of the 4.19.46 kernel.
All users of the 4.19 kernel series must upgrade.
The updated 4.19.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.19.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Documentation/filesystems/porting | 5 Makefile | 2 arch/mips/kernel/perf_event_mipsxx.c | 21 - arch/parisc/boot/compressed/head.S | 6 arch/parisc/include/asm/assembly.h | 6 arch/parisc/kernel/head.S | 4 arch/parisc/kernel/process.c | 1 arch/parisc/kernel/syscall.S | 2 arch/x86/entry/entry_64.S | 18 + arch/x86/events/intel/core.c | 10 arch/x86/include/asm/text-patching.h | 28 + arch/x86/kernel/ftrace.c | 32 +- arch/x86/kvm/hyperv.c | 11 arch/x86/lib/Makefile | 12 drivers/base/dd.c | 5 drivers/block/brd.c | 7 drivers/clk/hisilicon/clk-hi3660.c | 6 drivers/clk/mediatek/clk-pll.c | 48 ++- drivers/clk/rockchip/clk-rk3328.c | 18 - drivers/clk/sunxi-ng/ccu_nkmp.c | 18 - drivers/clk/tegra/clk-pll.c | 4 drivers/hwtracing/intel_th/msu.c | 35 ++ drivers/hwtracing/stm/core.c | 9 drivers/iommu/tegra-smmu.c | 25 + drivers/md/dm-cache-metadata.c | 9 drivers/md/dm-delay.c | 3 drivers/md/dm-integrity.c | 4 drivers/md/dm-mpath.c | 2 drivers/md/dm-zoned-metadata.c | 5 drivers/md/md.c | 182 ++++------- drivers/md/md.h | 25 - drivers/md/raid5.c | 29 + drivers/media/i2c/ov6650.c | 2 drivers/memory/tegra/mc.c | 2 drivers/net/Makefile | 2 drivers/net/ethernet/mellanox/mlx4/mcg.c | 2 drivers/net/ethernet/mellanox/mlx5/core/Kconfig | 1 drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 18 + drivers/net/ethernet/netronome/nfp/flower/tunnel_conf.c | 17 - drivers/net/ieee802154/mcr20a.c | 6 drivers/net/ppp/ppp_deflate.c | 20 - drivers/net/usb/qmi_wwan.c | 12 drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 28 + drivers/net/wireless/intersil/p54/p54pci.c | 3 drivers/parisc/led.c | 3 drivers/pci/controller/pcie-rcar.c | 21 + drivers/pci/pci.c | 19 + drivers/pci/pci.h | 2 drivers/pci/pcie/aspm.c | 49 ++- drivers/pci/probe.c | 23 - drivers/pci/quirks.c | 19 + drivers/phy/ti/phy-ti-pipe3.c | 2 drivers/power/supply/cpcap-battery.c | 3 drivers/power/supply/power_supply_sysfs.c | 6 drivers/staging/media/imx/imx-media-csi.c | 18 - drivers/staging/media/imx/imx-media-of.c | 15 drivers/video/fbdev/efifb.c | 8 drivers/video/fbdev/sm712.h | 12 drivers/video/fbdev/sm712fb.c | 243 ++++++++++++---- drivers/video/fbdev/udlfb.c | 114 +++++-- fs/ceph/super.c | 7 fs/cifs/smb2ops.c | 14 fs/dcache.c | 24 - fs/fuse/file.c | 13 fs/nfs/filelayout/filelayout.c | 2 fs/nfs/nfs4state.c | 4 fs/nsfs.c | 3 fs/overlayfs/copy_up.c | 6 fs/overlayfs/file.c | 5 fs/overlayfs/overlayfs.h | 2 fs/proc/base.c | 5 fs/ufs/util.h | 2 include/linux/bpf.h | 3 include/linux/dcache.h | 2 include/linux/of.h | 4 include/linux/pci.h | 2 include/linux/skbuff.h | 9 include/net/ip6_fib.h | 3 include/net/xfrm.h | 20 + include/uapi/linux/fuse.h | 2 include/video/udlfb.h | 7 kernel/bpf/hashtab.c | 23 + kernel/bpf/inode.c | 2 kernel/bpf/syscall.c | 5 kernel/sched/cpufreq_schedutil.c | 1 kernel/trace/trace_events.c | 3 lib/Makefile | 11 net/core/dev.c | 2 net/core/rtnetlink.c | 16 - net/ipv4/esp4.c | 20 - net/ipv4/ip_vti.c | 5 net/ipv4/xfrm4_policy.c | 24 - net/ipv6/ip6_fib.c | 12 net/ipv6/route.c | 58 ++- net/ipv6/xfrm6_tunnel.c | 6 net/key/af_key.c | 4 net/mac80211/iface.c | 3 net/tipc/core.c | 14 net/vmw_vsock/virtio_transport.c | 13 net/vmw_vsock/virtio_transport_common.c | 7 net/xfrm/xfrm_interface.c | 17 - net/xfrm/xfrm_policy.c | 2 net/xfrm/xfrm_state.c | 2 net/xfrm/xfrm_user.c | 16 - security/apparmor/apparmorfs.c | 13 security/inode.c | 13 tools/objtool/Makefile | 3 tools/perf/bench/numa.c | 4 tools/perf/util/intel-pt-decoder/intel-pt-decoder.c | 31 +- tools/testing/selftests/bpf/test_verifier.c | 9 virt/kvm/arm/arm.c | 11 111 files changed, 1215 insertions(+), 536 deletions(-)
Adrian Hunter (3):
perf intel-pt: Fix instructions sampling rate perf intel-pt: Fix improved sample timestamp perf intel-pt: Fix sample timestamp wrt non-taken branches
Al Viro (4):
dcache: sort the freeing-without-RCU-delay mess for good.
securityfs: fix use-after-free on symlink traversal
apparmorfs: fix use-after-free on symlink traversal
ufs: fix braino in ufs_get_inode_gid() for solaris UFS flavour
Alexander Shishkin (2):
stm class: Fix channel bitmap on 32-bit systems
intel_th: msu: Fix single mode with IOMMU
Amir Goldstein (1):
ovl: fix missing upper fs freeze protection on copy up for ioctl
Andrew Jones (1):
KVM: arm/arm64: Ensure vcpu target is unset on reset failure
Andrey Smirnov (1):
power: supply: sysfs: prevent endless uevent loop with CONFIG_POWER_SUPPLY_DEBUG
Ard Biesheuvel (1):
fbdev/efifb: Ignore framebuffer memmap entries that lack any memory types
Arnaldo Carvalho de Melo (1):
perf bench numa: Add define for RUSAGE_THREAD if not present
Bhagavathi Perumal S (1):
mac80211: Fix kernel panic due to use of txq after free
Bjørn Mork (1):
qmi_wwan: new Wistron, ZTE and D-Link devices
Chenbo Feng (1):
bpf: relax inode permission check for retrieving bpf program
Christoph Probst (1):
cifs: fix strcat buffer overflow and reduce raciness in smb21_set_oplock_level()
Colin Ian King (1):
phy: ti-pipe3: fix missing bit-wise or operator when assigning val
Cong Wang (1):
xfrm: clean up xfrm protocol checks
Damien Le Moal (1):
dm zoned: Fix zone report handling
Daniel Borkmann (2):
bpf: add map_lookup_elem_sys_only for lookups from syscall side bpf, lru: avoid messing with eviction heuristics upon syscall lookup
Daniele Palmas (1):
net: usb: qmi_wwan: add Telit 0x1260 and 0x1261 compositions
Dmitry Osipenko (3):
clk: tegra: Fix PLLM programming on Tegra124+ when PMC overrides divider iommu/tegra-smmu: Fix invalid ASID bits on Tegra30/114
memory: tegra: Fix integer overflow on tick value calculation
Elazar Leibovich (1):
tracing: Fix partial reading of trace event's id file
Eric Dumazet (2):
ipv6: prevent possible fib6 leaks
net: avoid weird emergency message
Florian Fainelli (2):
net: Always descend into dsa/
MIPS: perf: Fix build with CONFIG_CPU_BMIPS5000 enabled
Gary Hook (1):
x86/mm/mem_encrypt: Disable all instrumentation for early SME setup
Greg Kroah-Hartman (2):
Revert "selftests/bpf: skip verifier tests for unsupported program types" Linux 4.19.46
Helge Deller (4):
parisc: Export running_on_qemu symbol for modules
parisc: Skip registering LED when running in QEMU
parisc: Use PA_ASM_LEVEL in boot code
parisc: Rename LEVEL to PA_ASM_LEVEL to avoid name clash with DRBD code
Hou Tao (1):
brd: re-enable __GFP_HIGHMEM in brd_insert_page()
James Prestwood (1):
PCI: Mark Atheros AR9462 to avoid bus reset
Janusz Krzysztofik (1):
media: ov6650: Fix sensor possibly not detected on probe
Jean-Philippe Brucker (1):
PCI: Init PCIe feature bits for managed host bridge alloc
Jeff Layton (1):
ceph: flush dirty inodes before proceeding with remount
Jeremy Sowden (1):
vti4: ipip tunnel deregistration fixes.
Jernej Skrabec (1):
clk: sunxi-ng: nkmp: Avoid GENMASK(-1, 0)
Jiri Olsa (1):
perf/x86/intel: Fix race in intel_pmu_disable_event()
Jisheng Zhang (1):
PCI/AER: Change pci_aer_init() stub to return void
John Garry (1):
driver core: Postpone DMA tear-down until after devres release for probe failure
Jonas Karlman (1):
clk: rockchip: fix wrong clock definitions for rk3328
Jorge E. Moreira (1):
vsock/virtio: Initialize core virtio vsock before registering the driver
Josh Poimboeuf (1):
x86_64: Add gap to int3 to allow for call emulation
Junwei Hu (2):
tipc: switch order of device registration to fix a crash
tipc: fix modprobe tipc failed after switch order of device registration
Kangjie Lu (1):
net: ieee802154: fix missing checks for regmap_update_bits
Kazufumi Ikeda (1):
PCI: rcar: Add the initialization of PCIe link in resume_noirq()
Kirill Smelkov (1):
fuse: Add FOPEN_STREAM to use stream_open()
Leo Yan (1):
clk: hi3660: Mark clk_gate_ufs_subsys as critical
Liu Bo (1):
fuse: honor RLIMIT_FSIZE in fuse_file_fallocate
Logan Gunthorpe (1):
PCI: Fix issue with "pci=disable_acs_redir" parameter being ignored
Luca Coelho (1):
iwlwifi: mvm: check for length correctness in iwl_mvm_create_skb()
Martin Wilck (1):
dm mpath: always free attached_handler_name in parse_path()
Martin Willi (1):
xfrm: Honor original L3 slave device in xfrmi policy lookup
Miklos Szeredi (1):
fuse: fix writepages on 32bit
Mikulas Patocka (5):
udlfb: delete the unused parameter for dlfb_handle_damage
udlfb: fix sleeping inside spinlock
udlfb: introduce a rendering mutex
dm delay: fix a crash when invalid device is specified dm integrity: correctly calculate the size of metadata area
Nathan Chancellor (1):
objtool: Allow AR to be overridden with HOSTAR
NeilBrown (2):
Revert "MD: fix lock contention for flush bios"
md: batch flush requests.
Nigel Croxon (1):
md/raid: raid5 preserve the writeback action after the parity check
Nikolai Kostrigin (1):
PCI: Mark AMD Stoney Radeon R7 GPU ATS as broken
Nikos Tsironis (1):
dm cache metadata: Fix loading discard bitset
Olga Kornievskaia (1):
PNFS fallback to MDS if no deviceid found
Owen Chen (1):
clk: mediatek: Disable tuner_en before change PLL rate
Pan Bian (1):
p54: drop device reference count if fails to enable device
Paul Moore (1):
proc: prevent changes to overridden credentials
Peter Zijlstra (3):
x86_64: Allow breakpoints to emulate call instructions ftrace/x86_64: Emulate call function while updating in breakpoint handler
bpf: Fix preempt_enable_no_resched() abuse
Phong Tran (1):
of: fix clang -Wunsequenced for be32_to_cpu()
Pieter Jansen van Vuuren (1):
nfp: flower: add rcu locks when accessing netdev for tunnels
Sabrina Dubroca (2):
rtnetlink: always put IFLA_LINK for links with a link-netnsid
esp4: add length check for UDP encapsulation
Saeed Mahameed (2):
net/mlx5: Imply MLXFW in mlx5_core
net/mlx5e: Fix ethtool rxfh commands when CONFIG_MLX5_EN_RXNFC is disabled
Song Liu (1):
Revert "Don't jump to compute_result state from check_result state"
Stefan Mätje (2):
PCI: Factor out pcie_retrain_link() function
PCI: Work around Pericom PCIe-to-PCI bridge Retrain Link erratum
Stefano Garzarella (1):
vsock/virtio: free packets during the socket release
Steffen Klassert (1):
xfrm4: Fix uninitialized memory read in _decode_session4
Steve Longerbeam (2):
media: imx: csi: Allow unknown nearest upstream entities
media: imx: Clear fwnode link struct for each endpoint iteration
Su Yanjun (1):
xfrm6_tunnel: Fix potential panic when unloading xfrm6_tunnel module
Tingwei Zhang (1):
stm class: Fix channel free in stm output free path
Tobin C. Harding (1):
sched/cpufreq: Fix kobject memleak
Tony Lindgren (1):
power: supply: cpcap-battery: Fix division by zero
Vitaly Kuznetsov (1):
x86: kvm: hyper-v: deal with buggy TLB flush requests from WS2012
Wei Wang (1):
ipv6: fix src addr routing with the exception table
Willem de Bruijn (1):
net: test nouarg before dereferencing zerocopy pointers
Yifeng Li (9):
fbdev: sm712fb: fix brightness control on reboot, don't set SR30
fbdev: sm712fb: fix VRAM detection, don't set SR70/71/74/75
fbdev: sm712fb: fix white screen of death on reboot, don't set CR3B-CR3F
fbdev: sm712fb: fix boot screen glitch when sm712fb replaces VGA
fbdev: sm712fb: fix crashes during framebuffer writes by correctly mapping VRAM
fbdev: sm712fb: fix support for 1024x768-16 mode
fbdev: sm712fb: use 1024x768 by default on non-MIPS, fix garbled display
fbdev: sm712fb: fix crashes and garbled display during DPMS modesetting
fbdev: sm712fb: fix memory frequency by avoiding a switch/case fallthrough
YueHaibing (2):
ppp: deflate: Fix possible crash in deflate_init
xfrm: policy: Fix out-of-bound array accesses in __xfrm_policy_unlink
Yufen Yu (1):
md: add mddev->pers to avoid potential NULL pointer dereference
Yunjian Wang (1):
net/mlx4_core: Change the error print to info print
ZhangXiaoxu (1):
NFS4: Fix v4.0 client state corruption when mount
Greg KH
maintainerDocumentation/filesystems/porting +5 -0
@@ -622,3 +622,8 @@ in your dentry operations instead. alloc_file_clone(file, flags, ops) does not affect any caller's references. On success you get a new struct file sharing the mount/dentry with the original, on failure - ERR_PTR(). +-- +[mandatory] + DCACHE_RCUACCESS is gone; having an RCU delay on dentry freeing is the + default. DCACHE_NORCU opts out, and only d_alloc_pseudo() has any + business doing so.
Makefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 4 PATCHLEVEL = 19 -SUBLEVEL = 45 +SUBLEVEL = 46 EXTRAVERSION = NAME = "People's Front"
arch/mips/kernel/perf_event_mipsxx.c +3 -18
@@ -64,17 +64,11 @@ struct mips_perf_event {#define CNTR_EVEN 0x55555555#define CNTR_ODD 0xaaaaaaaa#define CNTR_ALL 0xffffffff -#ifdef CONFIG_MIPS_MT_SMP enum {T =0 ,V =1 ,P =2 , } range; -#else -#define T -#define V -#define P -#endif };static struct mips_perf_event raw_event;
@@ -325,9 +319,7 @@ static void mipsxx_pmu_enable_event(struct hw_perf_event *evt, int idx) { struct perf_event *event = container_of(evt, struct perf_event, hw);struct cpu_hw_events *cpuc =this_cpu_ptr (&cpu_hw_events); -#ifdef CONFIG_MIPS_MT_SMP unsigned int range = evt->event_base >>24 ; -#endif /* CONFIG_MIPS_MT_SMP */ WARN_ON (idx <0 || idx >= mipspmu.num_counters);
@@ -336,21 +328,15 @@ static void mipsxx_pmu_enable_event(struct hw_perf_event *evt, int idx)/* Make sure interrupt enabled. */ MIPS_PERFCTRL_IE ; -#ifdef CONFIG_CPU_BMIPS5000 - { +if (IS_ENABLED (CONFIG_CPU_BMIPS5000 )) {/* enable the counter for the calling thread */ cpuc->saved_ctrl[idx] |= (1 << (12 +vpe_id ())) |BRCM_PERFCTRL_TC ; - } -#else -#ifdef CONFIG_MIPS_MT_SMP -if (range >V ) { + }else if (IS_ENABLED (CONFIG_MIPS_MT_SMP ) && range >V ) {/* The counter is processor wide. Set it up to count all TCs. */ pr_debug ("Enabling perf counter for all TCs\n" ); cpuc->saved_ctrl[idx] |=M_TC_EN_ALL ; - } else -#endif /* CONFIG_MIPS_MT_SMP */ - { + }else {unsigned int cpu, ctrl;/*
@@ -365,7 +351,6 @@ static void mipsxx_pmu_enable_event(struct hw_perf_event *evt, int idx) cpuc->saved_ctrl[idx] |= ctrl;pr_debug ("Enabling perf counter for CPU%d\n" , cpu); } -#endif /* CONFIG_CPU_BMIPS5000 */ /* * We do not actually let the counter run. Leave it until start(). */
arch/parisc/boot/compressed/head.S +3 -3
@@ -22,7 +22,7 @@ __HEAD ENTRY(startup) - .level LEVEL + .level PA_ASM_LEVEL #define PSW_W_SM 0x200 #define PSW_W_BIT 36
@@ -63,7 +63,7 @@ $bss_loop: load32 BOOTADDR(decompress_kernel),%r3 #ifdef CONFIG_64BIT - .level LEVEL + .level PA_ASM_LEVEL ssm PSW_W_SM, %r0 /* set W-bit */ depdi 0, 31, 32, %r3 #endif
@@ -72,7 +72,7 @@ $bss_loop: startup_continue: #ifdef CONFIG_64BIT - .level LEVEL + .level PA_ASM_LEVEL rsm PSW_W_SM, %r0 /* clear W-bit */ #endif
arch/parisc/include/asm/assembly.h +3 -3
@@ -61,14 +61,14 @@#define LDCW ldcw,co#define BL b,l# ifdef CONFIG_64BIT -# define LEVEL 2.0w +# define PA_ASM_LEVEL 2.0w# else -# define LEVEL 2.0 +# define PA_ASM_LEVEL 2.0# endif #else #define LDCW ldcw#define BL bl -#define LEVEL 1.1 +#define PA_ASM_LEVEL 1.1#endif #ifdef __ASSEMBLY__
arch/parisc/kernel/head.S +2 -2
@@ -22,7 +22,7 @@ #include <linux/linkage.h> #include <linux/init.h> - .level LEVEL + .level PA_ASM_LEVEL __INITDATA ENTRY(boot_args)
@@ -258,7 +258,7 @@ stext_pdc_ret: ldo R%PA(fault_vector_11)(%r10),%r10 $is_pa20: - .level LEVEL /* restore 1.1 || 2.0w */ + .level PA_ASM_LEVEL /* restore 1.1 || 2.0w */ #endif /*!CONFIG_64BIT*/ load32 PA(fault_vector_20),%r10
arch/parisc/kernel/process.c +1 -0
@@ -193,6 +193,7 @@ int dump_task_fpu (struct task_struct *tsk, elf_fpregset_t *r)*/ int running_on_qemu__read_mostly ; +EXPORT_SYMBOL (running_on_qemu); void __cpuidle arch_cpu_idle_dead(void) {
arch/parisc/kernel/syscall.S +1 -1
@@ -48,7 +48,7 @@ registers). */ #define KILL_INSN break 0,0 - .level LEVEL + .level PA_ASM_LEVEL .text
arch/x86/entry/entry_64.S +16 -2
@@ -905,7 +905,7 @@ apicinterrupt IRQ_WORK_VECTOR irq_work_interrupt smp_irq_work_interrupt */ #define CPU_TSS_IST(x) PER_CPU_VAR(cpu_tss_rw) + (TSS_ist + ((x) - 1) * 8) -.macro idtentry sym do_sym has_error_code:req paranoid=0 shift_ist=-1 +.macro idtentry sym do_sym has_error_code:req paranoid=0 shift_ist=-1 create_gap=0 ENTRY(\sym) UNWIND_HINT_IRET_REGS offset=\has_error_code*8
@@ -925,6 +925,20 @@ ENTRY(\sym) jnz .Lfrom_usermode_switch_stack_\@ .endif + .if \create_gap == 1 + /* + * If coming from kernel space, create a 6-word gap to allow the + * int3 handler to emulate a call instruction. + */ + testb $3, CS-ORIG_RAX(%rsp) + jnz .Lfrom_usermode_no_gap_\@ + .rept 6 + pushq 5*8(%rsp) + .endr + UNWIND_HINT_IRET_REGS offset=8 +.Lfrom_usermode_no_gap_\@: + .endif + .if \paranoid call paranoid_entry .else
@@ -1154,7 +1168,7 @@ apicinterrupt3 HYPERV_STIMER0_VECTOR \ #endif /* CONFIG_HYPERV */ idtentry debug do_debug has_error_code=0 paranoid=1 shift_ist=DEBUG_STACK -idtentry int3 do_int3 has_error_code=0 +idtentry int3 do_int3 has_error_code=0 create_gap=1 idtentry stack_segment do_stack_segment has_error_code=1 #ifdef CONFIG_XEN
arch/x86/events/intel/core.c +7 -3
@@ -2074,15 +2074,19 @@ static void intel_pmu_disable_event(struct perf_event *event) cpuc->intel_ctrl_host_mask &= ~(1ull << hwc->idx); cpuc->intel_cp_status &= ~(1ull << hwc->idx); -if (unlikely (event->attr.precise_ip)) -intel_pmu_pebs_disable (event); -if (unlikely (hwc->config_base ==MSR_ARCH_PERFMON_FIXED_CTR_CTRL )) {intel_pmu_disable_fixed (hwc);return ; }x86_pmu_disable_event (event); + +/* +* Needs to be called after x86_pmu_disable_event, +* so we don't trigger the event without PEBS bit set. +*/ +if (unlikely (event->attr.precise_ip)) +intel_pmu_pebs_disable (event); }static void intel_pmu_del_event (struct perf_event *event)
arch/x86/include/asm/text-patching.h +28 -0
@@ -39,4 +39,32 @@ extern int poke_int3_handler(struct pt_regs *regs);extern void *text_poke_bp (void *addr,const void *opcode,size_t len,void *handler);extern int after_bootmem; +static inline void int3_emulate_jmp (struct pt_regs *regs,unsigned long ip) +{ + regs->ip = ip; +} + +#define INT3_INSN_SIZE 1 +#define CALL_INSN_SIZE 5 + +#ifdef CONFIG_X86_64 +static inline void int3_emulate_push (struct pt_regs *regs,unsigned long val) +{ +/* +* The int3 handler in entry_64.S adds a gap between the +* stack where the break point happened, and the saving of +* pt_regs. We can extend the original stack because of +* this gap. See the idtentry macro's create_gap option. +*/ + regs->sp -=sizeof (unsigned long ); + *(unsigned long *)regs->sp = val; +} + +static inline void int3_emulate_call (struct pt_regs *regs,unsigned long func) +{ +int3_emulate_push (regs, regs->ip -INT3_INSN_SIZE +CALL_INSN_SIZE ); +int3_emulate_jmp (regs, func); +} +#endif +#endif /* _ASM_X86_TEXT_PATCHING_H */
arch/x86/kernel/ftrace.c +27 -5
@@ -29,6 +29,7 @@#include <asm/kprobes.h> #include <asm/ftrace.h> #include <asm/nops.h> +#include <asm/text-patching.h> #ifdef CONFIG_DYNAMIC_FTRACE
@@ -228,6 +229,7 @@ int ftrace_modify_call(struct dyn_ftrace *rec, unsigned long old_addr, }static unsigned long ftrace_update_func; +static unsigned long ftrace_update_func_call;static int update_ftrace_func (unsigned long ip,void *new) {
@@ -256,6 +258,8 @@ int ftrace_update_ftrace_func(ftrace_func_t func)unsigned char *new;int ret; + ftrace_update_func_call = (unsigned long )func; + new =ftrace_call_replace (ip, (unsigned long )func); ret =update_ftrace_func (ip, new);
@@ -291,13 +295,28 @@ int ftrace_int3_handler(struct pt_regs *regs)if (WARN_ON_ONCE (!regs))return 0 ; - ip = regs->ip -1 ; -if (!ftrace_location (ip) && !is_ftrace_caller (ip)) -return 0 ; + ip = regs->ip -INT3_INSN_SIZE ; - regs->ip +=MCOUNT_INSN_SIZE -1 ; +#ifdef CONFIG_X86_64 +if (ftrace_location (ip)) { +int3_emulate_call (regs, (unsigned long )ftrace_regs_caller); +return 1 ; + }else if (is_ftrace_caller (ip)) { +if (!ftrace_update_func_call) { +int3_emulate_jmp (regs, ip +CALL_INSN_SIZE ); +return 1 ; + } +int3_emulate_call (regs, ftrace_update_func_call); +return 1 ; + } +#else +if (ftrace_location (ip) ||is_ftrace_caller (ip)) { +int3_emulate_jmp (regs, ip +CALL_INSN_SIZE ); +return 1 ; + } +#endif -return 1 ; +return 0 ; }static int ftrace_write (unsigned long ip,const char *val,int size)
@@ -868,6 +887,8 @@ void arch_ftrace_update_trampoline(struct ftrace_ops *ops) func =ftrace_ops_get_func (ops); + ftrace_update_func_call = (unsigned long )func; +/* Do a safe modify in case the trampoline is executing */ new =ftrace_call_replace (ip, (unsigned long )func); ret =update_ftrace_func (ip, new);
@@ -964,6 +985,7 @@ static int ftrace_mod_jmp(unsigned long ip, void *func) {unsigned char *new; + ftrace_update_func_call =0UL ; new =ftrace_jmp_replace (ip, (unsigned long )func);return update_ftrace_func (ip, new);
arch/x86/kvm/hyperv.c +10 -1
@@ -1291,7 +1291,16 @@ static u64 kvm_hv_flush_tlb(struct kvm_vcpu *current_vcpu, u64 ingpa, flush.address_space, flush.flags); sparse_banks[0 ] = flush.processor_mask; - all_cpus = flush.flags &HV_FLUSH_ALL_PROCESSORS ; + +/* +* Work around possible WS2012 bug: it sends hypercalls +* with processor_mask = 0x0 and HV_FLUSH_ALL_PROCESSORS clear, +* while also expecting us to flush something and crashing if +* we don't. Let's treat processor_mask == 0 same as +* HV_FLUSH_ALL_PROCESSORS. +*/ + all_cpus = (flush.flags &HV_FLUSH_ALL_PROCESSORS ) || + flush.processor_mask ==0 ; }else {if (unlikely (kvm_read_guest (kvm, ingpa, &flush_ex,sizeof (flush_ex))))
arch/x86/lib/Makefile +12 -0
@@ -6,6 +6,18 @@ # Produces uninteresting flaky coverage. KCOV_INSTRUMENT_delay.o := n +# Early boot use of cmdline; don't instrument it +ifdef CONFIG_AMD_MEM_ENCRYPT +KCOV_INSTRUMENT_cmdline.o := n +KASAN_SANITIZE_cmdline.o := n + +ifdef CONFIG_FUNCTION_TRACER +CFLAGS_REMOVE_cmdline.o = -pg +endif + +CFLAGS_cmdline.o := $(call cc-option, -fno-stack-protector) +endif + inat_tables_script = $(srctree)/arch/x86/tools/gen-insn-attr-x86.awk inat_tables_maps = $(srctree)/arch/x86/lib/x86-opcode-map.txt quiet_cmd_inat_tables = GEN $@
drivers/base/dd.c +2 -3
@@ -482,7 +482,7 @@ static int really_probe(struct device *dev, struct device_driver *drv) ret =dma_configure (dev);if (ret) - goto dma_failed; + goto probe_failed;if (driver_sysfs_add (dev)) { printk(KERN_ERR "%s: driver_sysfs_add(%s) failed\n",
@@ -537,14 +537,13 @@ static int really_probe(struct device *dev, struct device_driver *drv) goto done; probe_failed: -dma_deconfigure (dev); -dma_failed:if (dev->bus)blocking_notifier_call_chain (&dev->bus->p->bus_notifier,BUS_NOTIFY_DRIVER_NOT_BOUND , dev); pinctrl_bind_failed:device_links_no_driver (dev);devres_release_all (dev); +dma_deconfigure (dev);driver_sysfs_remove (dev); dev->driver =NULL ;dev_set_drvdata (dev,NULL );
drivers/block/brd.c +1 -6
@@ -96,13 +96,8 @@ static struct page *brd_insert_page(struct brd_device *brd, sector_t sector)/* * Must use NOIO because we don't want to recurse back into the * block or filesystem layers from page reclaim. -* -* Cannot support DAX and highmem, because our ->direct_access -* routine for DAX must return memory that is always addressable. -* If DAX was reworked to use pfns and kmap throughout, this -* restriction might be able to be lifted. */ - gfp_flags =GFP_NOIO | __GFP_ZERO; + gfp_flags =GFP_NOIO | __GFP_ZERO | __GFP_HIGHMEM; page =alloc_page (gfp_flags);if (!page)return NULL ;
drivers/clk/hisilicon/clk-hi3660.c +5 -1
@@ -163,8 +163,12 @@ static const struct hisi_gate_clock hi3660_crgctrl_gate_sep_clks[] = { "clk_isp_snclk_mux", CLK_SET_RATE_PARENT, 0x50, 17, 0, }, {HI3660_CLK_GATE_ISP_SNCLK2 ,"clk_gate_isp_snclk2" , "clk_isp_snclk_mux", CLK_SET_RATE_PARENT, 0x50, 18, 0, }, + /* + * clk_gate_ufs_subsys is a system bus clock, mark it as critical + * clock and keep it on for system suspend and resume. + */ { HI3660_CLK_GATE_UFS_SUBSYS, "clk_gate_ufs_subsys", "clk_div_sysbus", - CLK_SET_RATE_PARENT, 0x50, 21, 0, }, + CLK_SET_RATE_PARENT | CLK_IS_CRITICAL, 0x50, 21, 0, }, { HI3660_PCLK_GATE_DSI0, "pclk_gate_dsi0", "clk_div_cfgbus", CLK_SET_RATE_PARENT, 0x50, 28, 0, }, { HI3660_PCLK_GATE_DSI1, "pclk_gate_dsi1", "clk_div_cfgbus",
drivers/clk/mediatek/clk-pll.c +34 -14
78 lines not on this page · raw message
drivers/clk/rockchip/clk-rk3328.c +9 -9
@@ -458,7 +458,7 @@ static struct rockchip_clk_branch rk3328_clk_branches[] __initdata = { RK3328_CLKSEL_CON(35), 15, 1, MFLAGS, 8, 7, DFLAGS, RK3328_CLKGATE_CON(2), 12, GFLAGS),COMPOSITE (SCLK_CRYPTO ,"clk_crypto" , mux_2plls_p,0 , -RK3328_CLKSEL_CON (20 ),7 ,1 ,MFLAGS ,0 ,7 ,DFLAGS , +RK3328_CLKSEL_CON (20 ),7 ,1 ,MFLAGS ,0 ,5 ,DFLAGS ,RK3328_CLKGATE_CON (2 ),4 ,GFLAGS ), COMPOSITE_NOMUX(SCLK_TSADC, "clk_tsadc", "clk_24m", 0, RK3328_CLKSEL_CON(22), 0, 10, DFLAGS,
@@ -550,15 +550,15 @@ static struct rockchip_clk_branch rk3328_clk_branches[] __initdata = {GATE (0 ,"hclk_rkvenc_niu" ,"hclk_rkvenc" ,0 ,RK3328_CLKGATE_CON (25 ),1 ,GFLAGS ),GATE (ACLK_H265 ,"aclk_h265" ,"aclk_rkvenc" ,0 , -RK3328_CLKGATE_CON (25 ),0 ,GFLAGS ), +RK3328_CLKGATE_CON (25 ),2 ,GFLAGS ),GATE (PCLK_H265 ,"pclk_h265" ,"hclk_rkvenc" ,0 , -RK3328_CLKGATE_CON (25 ),1 ,GFLAGS ), +RK3328_CLKGATE_CON (25 ),3 ,GFLAGS ),GATE (ACLK_H264 ,"aclk_h264" ,"aclk_rkvenc" ,0 , -RK3328_CLKGATE_CON (25 ),0 ,GFLAGS ), +RK3328_CLKGATE_CON (25 ),4 ,GFLAGS ),GATE (HCLK_H264 ,"hclk_h264" ,"hclk_rkvenc" ,0 , -RK3328_CLKGATE_CON (25 ),1 ,GFLAGS ), +RK3328_CLKGATE_CON (25 ),5 ,GFLAGS ),GATE (ACLK_AXISRAM ,"aclk_axisram" ,"aclk_rkvenc" ,CLK_IGNORE_UNUSED , -RK3328_CLKGATE_CON (25 ),0 ,GFLAGS ), +RK3328_CLKGATE_CON (25 ),6 ,GFLAGS ), COMPOSITE(SCLK_VENC_CORE, "sclk_venc_core", mux_4plls_p, 0, RK3328_CLKSEL_CON(51), 14, 2, MFLAGS, 8, 5, DFLAGS,
@@ -663,7 +663,7 @@ static struct rockchip_clk_branch rk3328_clk_branches[] __initdata = {/* PD_GMAC */ COMPOSITE (ACLK_GMAC ,"aclk_gmac" , mux_2plls_hdmiphy_p,0 , -RK3328_CLKSEL_CON (35 ),6 ,2 ,MFLAGS ,0 ,5 ,DFLAGS , +RK3328_CLKSEL_CON (25 ),6 ,2 ,MFLAGS ,0 ,5 ,DFLAGS ,RK3328_CLKGATE_CON (3 ),2 ,GFLAGS ), COMPOSITE_NOMUX(PCLK_GMAC, "pclk_gmac", "aclk_gmac", 0, RK3328_CLKSEL_CON(25), 8, 3, DFLAGS,
@@ -733,7 +733,7 @@ static struct rockchip_clk_branch rk3328_clk_branches[] __initdata = {/* PD_PERI */ GATE (0 ,"aclk_peri_noc" ,"aclk_peri" ,CLK_IGNORE_UNUSED ,RK3328_CLKGATE_CON (19 ),11 ,GFLAGS ), -GATE (ACLK_USB3OTG ,"aclk_usb3otg" ,"aclk_peri" ,0 ,RK3328_CLKGATE_CON (19 ),4 ,GFLAGS ), +GATE (ACLK_USB3OTG ,"aclk_usb3otg" ,"aclk_peri" ,0 ,RK3328_CLKGATE_CON (19 ),14 ,GFLAGS ),GATE (HCLK_SDMMC ,"hclk_sdmmc" ,"hclk_peri" ,0 ,RK3328_CLKGATE_CON (19 ),0 ,GFLAGS ), GATE(HCLK_SDIO, "hclk_sdio", "hclk_peri", 0, RK3328_CLKGATE_CON(19), 1, GFLAGS),
@@ -913,7 +913,7 @@ static void __init rk3328_clk_init(struct device_node *np) &rk3328_cpuclk_data, rk3328_cpuclk_rates, ARRAY_SIZE(rk3328_cpuclk_rates)); -rockchip_register_softrst (np,11 , reg_base +RK3328_SOFTRST_CON (0 ), +rockchip_register_softrst (np,12 , reg_base +RK3328_SOFTRST_CON (0 ),ROCKCHIP_SOFTRST_HIWORD_MASK );rockchip_register_restart_notifier (ctx,RK3328_GLB_SRST_FST ,NULL );
drivers/clk/sunxi-ng/ccu_nkmp.c +13 -5
@@ -160,7 +160,7 @@ static int ccu_nkmp_set_rate(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate) {struct ccu_nkmp *nkmp =hw_to_ccu_nkmp (hw); -u32 n_mask, k_mask, m_mask, p_mask; +u32 n_mask =0 , k_mask =0 , m_mask =0 , p_mask =0 ;struct _ccu_nkmp _nkmp;unsigned long flags;u32 reg;
@@ -179,10 +179,18 @@ static int ccu_nkmp_set_rate(struct clk_hw *hw, unsigned long rate,ccu_nkmp_find_best (parent_rate, rate, &_nkmp); - n_mask =GENMASK (nkmp->n.width + nkmp->n.shift -1 , nkmp->n.shift); - k_mask =GENMASK (nkmp->k.width + nkmp->k.shift -1 , nkmp->k.shift); - m_mask =GENMASK (nkmp->m.width + nkmp->m.shift -1 , nkmp->m.shift); - p_mask =GENMASK (nkmp->p.width + nkmp->p.shift -1 , nkmp->p.shift); +if (nkmp->n.width) + n_mask =GENMASK (nkmp->n.width + nkmp->n.shift -1 , + nkmp->n.shift); +if (nkmp->k.width) + k_mask =GENMASK (nkmp->k.width + nkmp->k.shift -1 , + nkmp->k.shift); +if (nkmp->m.width) + m_mask =GENMASK (nkmp->m.width + nkmp->m.shift -1 , + nkmp->m.shift); +if (nkmp->p.width) + p_mask =GENMASK (nkmp->p.width + nkmp->p.shift -1 , + nkmp->p.shift);spin_lock_irqsave (nkmp->common.lock, flags);
drivers/clk/tegra/clk-pll.c +2 -2
@@ -662,8 +662,8 @@ static void _update_pll_mnp(struct tegra_clk_pll *pll,pll_override_writel (val, params->pmc_divp_reg, pll); val =pll_override_readl (params->pmc_divnm_reg, pll); - val &= ~(divm_mask (pll) << div_nmp->override_divm_shift) | - ~(divn_mask (pll) << div_nmp->override_divn_shift); + val &= ~((divm_mask (pll) << div_nmp->override_divm_shift) | + (divn_mask (pll) << div_nmp->override_divn_shift)); val |= (cfg->m << div_nmp->override_divm_shift) | (cfg->n << div_nmp->override_divn_shift);pll_override_writel (val, params->pmc_divnm_reg, pll);
drivers/hwtracing/intel_th/msu.c +32 -3
@@ -84,6 +84,7 @@ struct msc_iter {* @reg_base: register window base address * @thdev: intel_th_device pointer * @win_list: list of windows in multiblock mode +* @single_sgt: single mode buffer * @nr_pages: total number of pages allocated for this buffer * @single_sz: amount of data in single mode * @single_wrap: single mode wrap occurred
@@ -104,6 +105,7 @@ struct msc {struct intel_th_device *thdev;struct list_head win_list; +struct sg_table single_sgt;unsigned long nr_pages;unsigned long single_sz; unsigned int single_wrap : 1;
@@ -617,22 +619,45 @@ static void intel_th_msc_deactivate(struct intel_th_device *thdev)*/ static int msc_buffer_contig_alloc (struct msc *msc,unsigned long size) { +unsigned long nr_pages = size >>PAGE_SHIFT ;unsigned int order =get_order (size);struct page *page; +int ret;if (!size)return 0 ; + ret =sg_alloc_table (&msc->single_sgt,1 ,GFP_KERNEL ); +if (ret) + goto err_out; + + ret = -ENOMEM ; page =alloc_pages (GFP_KERNEL | __GFP_ZERO, order);if (!page) -return -ENOMEM ; + goto err_free_sgt;split_page (page, order); - msc->nr_pages = size >>PAGE_SHIFT ; +sg_set_buf (msc->single_sgt.sgl,page_address (page), size); + + ret =dma_map_sg (msc_dev (msc)->parent->parent, msc->single_sgt.sgl,1 , +DMA_FROM_DEVICE ); +if (ret <0 ) + goto err_free_pages; + + msc->nr_pages = nr_pages; msc->base =page_address (page); - msc->base_addr =page_to_phys (page); + msc->base_addr =sg_dma_address (msc->single_sgt.sgl);return 0 ; + +err_free_pages: +__free_pages (page, order); + +err_free_sgt: +sg_free_table (&msc->single_sgt); + +err_out: +return ret; }/**
@@ -643,6 +668,10 @@ static void msc_buffer_contig_free(struct msc *msc) {unsigned long off; +dma_unmap_sg (msc_dev (msc)->parent->parent, msc->single_sgt.sgl, +1 ,DMA_FROM_DEVICE ); +sg_free_table (&msc->single_sgt); +for (off =0 ; off < msc->nr_pages <<PAGE_SHIFT ; off +=PAGE_SIZE ) {struct page *page =virt_to_page (msc->base + off);
drivers/hwtracing/stm/core.c +4 -5
@@ -166,11 +166,10 @@ stm_master(struct stm_device *stm, unsigned int idx)static int stp_master_alloc (struct stm_device *stm,unsigned int idx) {struct stp_master *master; -size_t size; - size =ALIGN (stm->data->sw_nchannels,8 ) /8 ; - size +=sizeof (struct stp_master ); - master =kzalloc (size,GFP_ATOMIC ); + master =kzalloc (struct_size (master, chan_map, +BITS_TO_LONGS (stm->data->sw_nchannels)), +GFP_ATOMIC );if (!master)return -ENOMEM ;
@@ -218,8 +217,8 @@ stm_output_disclaim(struct stm_device *stm, struct stm_output *output)bitmap_release_region (&master->chan_map[0 ], output->channel,ilog2 (output->nr_chans)); - output->nr_chans =0 ; master->nr_free += output->nr_chans; + output->nr_chans =0 ; }/*
drivers/iommu/tegra-smmu.c +18 -7
@@ -102,7 +102,6 @@ static inline u32 smmu_readl(struct tegra_smmu *smmu, unsigned long offset)#define SMMU_TLB_FLUSH_VA_MATCH_ALL (0 << 0)#define SMMU_TLB_FLUSH_VA_MATCH_SECTION (2 << 0)#define SMMU_TLB_FLUSH_VA_MATCH_GROUP (3 << 0) -#define SMMU_TLB_FLUSH_ASID (x) (((x) & 0x7f) << 24)#define SMMU_TLB_FLUSH_VA_SECTION (addr) ((((addr) & 0xffc00000) >> 12) | \ SMMU_TLB_FLUSH_VA_MATCH_SECTION)#define SMMU_TLB_FLUSH_VA_GROUP (addr) ((((addr) & 0xffffc000) >> 12) | \
@@ -205,8 +204,12 @@ static inline void smmu_flush_tlb_asid(struct tegra_smmu *smmu, {u32 value; - value =SMMU_TLB_FLUSH_ASID_MATCH |SMMU_TLB_FLUSH_ASID (asid) | -SMMU_TLB_FLUSH_VA_MATCH_ALL ; +if (smmu->soc->num_asids ==4 ) + value = (asid &0x3 ) <<29 ; +else + value = (asid &0x7f ) <<24 ; + + value |=SMMU_TLB_FLUSH_ASID_MATCH |SMMU_TLB_FLUSH_VA_MATCH_ALL ;smmu_writel (smmu, value,SMMU_TLB_FLUSH ); }
@@ -216,8 +219,12 @@ static inline void smmu_flush_tlb_section(struct tegra_smmu *smmu, {u32 value; - value =SMMU_TLB_FLUSH_ASID_MATCH |SMMU_TLB_FLUSH_ASID (asid) | -SMMU_TLB_FLUSH_VA_SECTION (iova); +if (smmu->soc->num_asids ==4 ) + value = (asid &0x3 ) <<29 ; +else + value = (asid &0x7f ) <<24 ; + + value |=SMMU_TLB_FLUSH_ASID_MATCH |SMMU_TLB_FLUSH_VA_SECTION (iova);smmu_writel (smmu, value,SMMU_TLB_FLUSH ); }
@@ -227,8 +234,12 @@ static inline void smmu_flush_tlb_group(struct tegra_smmu *smmu, {u32 value; - value =SMMU_TLB_FLUSH_ASID_MATCH |SMMU_TLB_FLUSH_ASID (asid) | -SMMU_TLB_FLUSH_VA_GROUP (iova); +if (smmu->soc->num_asids ==4 ) + value = (asid &0x3 ) <<29 ; +else + value = (asid &0x7f ) <<24 ; + + value |=SMMU_TLB_FLUSH_ASID_MATCH |SMMU_TLB_FLUSH_VA_GROUP (iova);smmu_writel (smmu, value,SMMU_TLB_FLUSH ); }
drivers/md/dm-cache-metadata.c +8 -1
@@ -1167,11 +1167,18 @@ static int __load_discards(struct dm_cache_metadata *cmd,if (r)return r; -for (b =0 ; b <from_dblock (cmd->discard_nr_blocks); b++) { +for (b =0 ; ; b++) { r =fn (context, cmd->discard_block_size,to_dblock (b),dm_bitset_cursor_get_value (&c));if (r)break ; + +if (b >= (from_dblock (cmd->discard_nr_blocks) -1 )) +break ; + + r =dm_bitset_cursor_next (&c); +if (r) +break ; }dm_bitset_cursor_end (&c);
drivers/md/dm-delay.c +2 -1
@@ -121,7 +121,8 @@ static void delay_dtr(struct dm_target *ti) {struct delay_c *dc = ti->private; -destroy_workqueue (dc->kdelayd_wq); +if (dc->kdelayd_wq) +destroy_workqueue (dc->kdelayd_wq);if (dc->read.dev)dm_put_device (ti, dc->read.dev);
drivers/md/dm-integrity.c +2 -2
@@ -2557,7 +2557,7 @@ static int calculate_device_limits(struct dm_integrity_c *ic)if (last_sector < ic->start || last_sector >= ic->meta_device_sectors)return -EINVAL ; }else { -__u64 meta_size = ic->provided_data_sectors * ic->tag_size; +__u64 meta_size = (ic->provided_data_sectors >> ic->sb->log2_sectors_per_block) * ic->tag_size; meta_size = (meta_size + ((1U << (ic->log2_buffer_sectors +SECTOR_SHIFT )) -1 )) >> (ic->log2_buffer_sectors +SECTOR_SHIFT ); meta_size <<= ic->log2_buffer_sectors;
@@ -3428,7 +3428,7 @@ static int dm_integrity_ctr(struct dm_target *ti, unsigned argc, char **argv)DEBUG_print (" journal_sections %u\n" , (unsigned )le32_to_cpu (ic->sb->journal_sections));DEBUG_print (" journal_entries %u\n" , ic->journal_entries);DEBUG_print (" log2_interleave_sectors %d\n" , ic->sb->log2_interleave_sectors); -DEBUG_print (" device_sectors 0x%llx\n" , (unsigned long long )ic->device_sectors); +DEBUG_print (" data_device_sectors 0x%llx\n" , (unsigned long long )ic->data_device_sectors);DEBUG_print (" initial_sectors 0x%x\n" , ic->initial_sectors);DEBUG_print (" metadata_run 0x%x\n" , ic->metadata_run);DEBUG_print (" log2_metadata_run %d\n" , ic->log2_metadata_run);
drivers/md/dm-mpath.c +1 -1
@@ -892,6 +892,7 @@ static struct pgpath *parse_path(struct dm_arg_set *as, struct path_selector *psif (attached_handler_name || m->hw_handler_name) {INIT_DELAYED_WORK (&p->activate_path, activate_path_work); r =setup_scsi_dh (p->path.dev->bdev, m, &attached_handler_name, &ti->error); +kfree (attached_handler_name);if (r) {dm_put_device (ti, p->path.dev); goto bad;
@@ -906,7 +907,6 @@ static struct pgpath *parse_path(struct dm_arg_set *as, struct path_selector *psreturn p; bad: -kfree (attached_handler_name);free_pgpath (p);return ERR_PTR (r); }
drivers/md/dm-zoned-metadata.c +5 -0
@@ -1169,6 +1169,9 @@ static int dmz_init_zones(struct dmz_metadata *zmd) goto out; } +if (!nr_blkz) +break ; +/* Process report */ for (i =0 ; i < nr_blkz; i++) { ret =dmz_init_zone (zmd, zone, &blkz[i]);
@@ -1204,6 +1207,8 @@ static int dmz_update_zone(struct dmz_metadata *zmd, struct dm_zone *zone)/* Get zone information from disk */ ret =blkdev_report_zones (zmd->dev->bdev,dmz_start_sect (zmd, zone), &blkz, &nr_blkz,GFP_NOIO ); +if (!nr_blkz) + ret = -EIO ;if (ret) {dmz_dev_err (zmd->dev,"Get zone %u report failed" ,dmz_id (zmd, zone));
drivers/md/md.c +75 -107
255 lines not on this page · raw message
drivers/md/md.h +10 -15
@@ -252,19 +252,6 @@ enum mddev_sb_flags { MD_SB_NEED_REWRITE, /* metadata write needs to be repeated */ }; -#define NR_FLUSH_INFOS 8 -#define NR_FLUSH_BIOS 64 -struct flush_info { -struct bio *bio; -struct mddev *mddev; -struct work_struct flush_work; -atomic_t flush_pending; -}; -struct flush_bio { -struct flush_info *fi; -struct md_rdev *rdev; -}; -struct mddev {void *private;struct md_personality *pers;
@@ -470,8 +457,16 @@ struct mddev {* metadata and bitmap writes */ -mempool_t *flush_pool; -mempool_t *flush_bio_pool; +/* Generic flush handling. +* The last to finish preflush schedules a worker to submit +* the rest of the request (without the REQ_PREFLUSH flag). +*/ +struct bio *flush_bio; +atomic_t flush_pending; +ktime_t start_flush, last_flush;/* last_flush is when the last completed +* flush was started. +*/ +struct work_struct flush_work;struct work_struct event_work;/* used by dm to report failure event */ void (*sync_super)(struct mddev *mddev,struct md_rdev *rdev);struct md_cluster_info *cluster_info;
drivers/md/raid5.c +24 -5
@@ -4185,7 +4185,7 @@ static void handle_parity_checks6(struct r5conf *conf, struct stripe_head *sh,/* now write out any block on a failed drive, * or P or Q if they were recomputed */ -BUG_ON (s->uptodate < disks -1 );/* We don't need Q to recover */ + dev =NULL ;if (s->failed ==2 ) { dev = &sh->dev[s->failed_num[1 ]]; s->locked++;
@@ -4210,6 +4210,14 @@ static void handle_parity_checks6(struct r5conf *conf, struct stripe_head *sh,set_bit (R5_LOCKED , &dev->flags);set_bit (R5_Wantwrite, &dev->flags); } +if (WARN_ONCE (dev && !test_bit (R5_UPTODATE , &dev->flags), +"%s: disk%td not up to date\n" , +mdname (conf->mddev), + dev - (struct r5dev *) &sh->dev)) { +clear_bit (R5_LOCKED , &dev->flags); +clear_bit (R5_Wantwrite, &dev->flags); + s->locked--; + }clear_bit (STRIPE_DEGRADED , &sh->state);set_bit (STRIPE_INSYNC , &sh->state);
@@ -4221,15 +4229,26 @@ static void handle_parity_checks6(struct r5conf *conf, struct stripe_head *sh,case check_state_check_result: sh->check_state = check_state_idle; -if (s->failed >1 ) -break ;/* handle a successful check operation, if parity is correct * we are done. Otherwise update the mismatch count and repair * parity if !MD_RECOVERY_CHECK */ if (sh->ops.zero_sum_result ==0 ) { -/* Any parity checked was correct */ -set_bit (STRIPE_INSYNC , &sh->state); +/* both parities are correct */ +if (!s->failed) +set_bit (STRIPE_INSYNC , &sh->state); +else { +/* in contrast to the raid5 case we can validate +* parity, but still have a failure to write +* back +*/ + sh->check_state = check_state_compute_result; +/* Returning at this point means that we may go +* off and bring p and/or q uptodate again so +* we make sure to check zero_sum_result again +* to verify if p or q need writeback +*/ + } }else {atomic64_add (STRIPE_SECTORS , &conf->mddev->resync_mismatches);if (test_bit (MD_RECOVERY_CHECK , &conf->mddev->recovery)) {
drivers/media/i2c/ov6650.c +2 -0
@@ -815,6 +815,8 @@ static int ov6650_video_probe(struct i2c_client *client)if (ret <0 )return ret; +msleep (20 ); +/* * check and show product ID and manufacturer ID */
drivers/memory/tegra/mc.c +1 -1
@@ -280,7 +280,7 @@ static int tegra_mc_setup_latency_allowance(struct tegra_mc *mc)u32 value;/* compute the number of MC clock cycles per tick */ - tick = mc->tick *clk_get_rate (mc->clk); + tick = (unsigned long long )mc->tick *clk_get_rate (mc->clk);do_div (tick,NSEC_PER_SEC ); value =readl (mc->regs +MC_EMEM_ARB_CFG );
drivers/net/Makefile +1 -1
@@ -40,7 +40,7 @@ obj-$(CONFIG_ARCNET) += arcnet/ obj-$(CONFIG_DEV_APPLETALK) += appletalk/ obj-$(CONFIG_CAIF) += caif/ obj-$(CONFIG_CAN) += can/ -obj-$(CONFIG_NET_DSA) += dsa/ +obj-y += dsa/ obj-$(CONFIG_ETHERNET) += ethernet/ obj-$(CONFIG_FDDI) += fddi/ obj-$(CONFIG_HIPPI) += hippi/
drivers/net/ethernet/mellanox/mlx4/mcg.c +1 -1
@@ -1492,7 +1492,7 @@ int mlx4_flow_steer_promisc_add(struct mlx4_dev *dev, u8 port, rule.port = port; rule.qpn = qpn;INIT_LIST_HEAD (&rule.list); -mlx4_err (dev,"going promisc on %x\n" , port); +mlx4_info (dev,"going promisc on %x\n" , port);return mlx4_flow_attach (dev, &rule, regid_p); }
drivers/net/ethernet/mellanox/mlx5/core/Kconfig +1 -0
@@ -8,6 +8,7 @@ config MLX5_CORE depends on PCI imply PTP_1588_CLOCK imply VXLAN + imply MLXFW default n ---help--- Core driver for low level functionality of the ConnectX-4 and
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c +17 -1
@@ -1609,6 +1609,22 @@ static int mlx5e_flash_device(struct net_device *dev,return mlx5e_ethtool_flash_device (priv, flash); } +#ifndef CONFIG_MLX5_EN_RXNFC +/* When CONFIG_MLX5_EN_RXNFC=n we only support ETHTOOL_GRXRINGS +* otherwise this function will be defined from en_fs_ethtool.c +*/ +static int mlx5e_get_rxnfc (struct net_device *dev,struct ethtool_rxnfc *info,u32 *rule_locs) +{ +struct mlx5e_priv *priv =netdev_priv (dev); + +if (info->cmd !=ETHTOOL_GRXRINGS ) +return -EOPNOTSUPP ; +/* ring_count is needed by ethtool -x */ + info->data = priv->channels.params.num_channels; +return 0 ; +} +#endif +const struct ethtool_ops mlx5e_ethtool_ops = { .get_drvinfo = mlx5e_get_drvinfo, .get_link = ethtool_op_get_link,
@@ -1627,8 +1643,8 @@ const struct ethtool_ops mlx5e_ethtool_ops = { .get_rxfh_indir_size = mlx5e_get_rxfh_indir_size, .get_rxfh = mlx5e_get_rxfh, .set_rxfh = mlx5e_set_rxfh, -#ifdef CONFIG_MLX5_EN_RXNFC .get_rxnfc = mlx5e_get_rxnfc, +#ifdef CONFIG_MLX5_EN_RXNFC .set_rxnfc = mlx5e_set_rxnfc, #endif .flash_device = mlx5e_flash_device,
drivers/net/ethernet/netronome/nfp/flower/tunnel_conf.c +11 -6
@@ -194,6 +194,7 @@ void nfp_tunnel_keep_alive(struct nfp_app *app, struct sk_buff *skb)return ; } +rcu_read_lock ();for (i =0 ; i < count; i++) { ipv4_addr = payload->tun_info[i].ipv4; port =be32_to_cpu (payload->tun_info[i].egress_port);
@@ -209,6 +210,7 @@ void nfp_tunnel_keep_alive(struct nfp_app *app, struct sk_buff *skb)neigh_event_send (n,NULL );neigh_release (n); } +rcu_read_unlock (); }static bool nfp_tun_is_netdev_to_offload (struct net_device *netdev)
@@ -404,9 +406,10 @@ void nfp_tunnel_request_route(struct nfp_app *app, struct sk_buff *skb) payload =nfp_flower_cmsg_get_data (skb); +rcu_read_lock (); netdev =nfp_app_repr_get (app,be32_to_cpu (payload->ingress_port));if (!netdev) - goto route_fail_warning; + goto fail_rcu_unlock; flow.daddr = payload->ipv4_addr; flow.flowi4_proto =IPPROTO_UDP ;
@@ -416,21 +419,23 @@ void nfp_tunnel_request_route(struct nfp_app *app, struct sk_buff *skb) rt =ip_route_output_key (dev_net (netdev), &flow); err =PTR_ERR_OR_ZERO (rt);if (err) - goto route_fail_warning; + goto fail_rcu_unlock;#else - goto route_fail_warning; + goto fail_rcu_unlock;#endif /* Get the neighbour entry for the lookup */ n =dst_neigh_lookup (&rt->dst, &flow.daddr);ip_rt_put (rt);if (!n) - goto route_fail_warning; -nfp_tun_write_neigh (n->dev, app, &flow, n,GFP_KERNEL ); + goto fail_rcu_unlock; +nfp_tun_write_neigh (n->dev, app, &flow, n,GFP_ATOMIC );neigh_release (n); +rcu_read_unlock ();return ; -route_fail_warning: +fail_rcu_unlock: +rcu_read_unlock ();nfp_flower_cmsg_warn (app,"Requested route not found.\n" ); }
drivers/net/ieee802154/mcr20a.c +6 -0
@@ -539,6 +539,8 @@ mcr20a_start(struct ieee802154_hw *hw)dev_dbg (printdev (lp),"no slotted operation\n" ); ret =regmap_update_bits (lp->regmap_dar,DAR_PHY_CTRL1 ,DAR_PHY_CTRL1_SLOTTED ,0x0 ); +if (ret <0 ) +return ret;/* enable irq */ enable_irq (lp->spi->irq);
@@ -546,11 +548,15 @@ mcr20a_start(struct ieee802154_hw *hw)/* Unmask SEQ interrupt */ ret =regmap_update_bits (lp->regmap_dar,DAR_PHY_CTRL2 ,DAR_PHY_CTRL2_SEQMSK ,0x0 ); +if (ret <0 ) +return ret;/* Start the RX sequence */ dev_dbg (printdev (lp),"start the RX sequence\n" ); ret =regmap_update_bits (lp->regmap_dar,DAR_PHY_CTRL1 ,DAR_PHY_CTRL1_XCVSEQ_MASK ,MCR20A_XCVSEQ_RX ); +if (ret <0 ) +return ret;return 0 ; }
drivers/net/ppp/ppp_deflate.c +14 -6
@@ -610,12 +610,20 @@ static struct compressor ppp_deflate_draft = {static int __init deflate_init (void ) { -int answer =ppp_register_compressor (&ppp_deflate); -if (answer ==0 ) -printk (KERN_INFO -"PPP Deflate Compression module registered\n" ); -ppp_register_compressor (&ppp_deflate_draft); -return answer; +int rc; + + rc =ppp_register_compressor (&ppp_deflate); +if (rc) +return rc; + + rc =ppp_register_compressor (&ppp_deflate_draft); +if (rc) { +ppp_unregister_compressor (&ppp_deflate); +return rc; + } + +pr_info ("PPP Deflate Compression module registered\n" ); +return 0 ; } static void __exit deflate_cleanup(void)
drivers/net/usb/qmi_wwan.c +12 -0
@@ -1122,9 +1122,16 @@ static const struct usb_device_id products[] = { {QMI_FIXED_INTF(0x0846, 0x68d3, 8)}, /* Netgear Aircard 779S */ {QMI_FIXED_INTF(0x12d1, 0x140c, 1)}, /* Huawei E173 */ {QMI_FIXED_INTF(0x12d1, 0x14ac, 1)}, /* Huawei E1820 */ + {QMI_FIXED_INTF(0x1435, 0x0918, 3)}, /* Wistron NeWeb D16Q1 */ + {QMI_FIXED_INTF(0x1435, 0x0918, 4)}, /* Wistron NeWeb D16Q1 */ + {QMI_FIXED_INTF(0x1435, 0x0918, 5)}, /* Wistron NeWeb D16Q1 */ + {QMI_FIXED_INTF(0x1435, 0x3185, 4)}, /* Wistron NeWeb M18Q5 */ + {QMI_FIXED_INTF(0x1435, 0xd111, 4)}, /* M9615A DM11-1 D51QC */ {QMI_FIXED_INTF(0x1435, 0xd181, 3)}, /* Wistron NeWeb D18Q1 */ {QMI_FIXED_INTF(0x1435, 0xd181, 4)}, /* Wistron NeWeb D18Q1 */ {QMI_FIXED_INTF(0x1435, 0xd181, 5)}, /* Wistron NeWeb D18Q1 */ + {QMI_FIXED_INTF(0x1435, 0xd182, 4)}, /* Wistron NeWeb D18 */ + {QMI_FIXED_INTF(0x1435, 0xd182, 5)}, /* Wistron NeWeb D18 */ {QMI_FIXED_INTF(0x1435, 0xd191, 4)}, /* Wistron NeWeb D19Q1 */ {QMI_QUIRK_SET_DTR(0x1508, 0x1001, 4)}, /* Fibocom NL668 series */ {QMI_FIXED_INTF(0x16d8, 0x6003, 0)}, /* CMOTech 6003 */
@@ -1180,6 +1187,7 @@ static const struct usb_device_id products[] = { {QMI_FIXED_INTF(0x19d2, 0x0265, 4)}, /* ONDA MT8205 4G LTE */ {QMI_FIXED_INTF(0x19d2, 0x0284, 4)}, /* ZTE MF880 */ {QMI_FIXED_INTF(0x19d2, 0x0326, 4)}, /* ZTE MF821D */ + {QMI_FIXED_INTF(0x19d2, 0x0396, 3)}, /* ZTE ZM8620 */ {QMI_FIXED_INTF(0x19d2, 0x0412, 4)}, /* Telewell TW-LTE 4G */ {QMI_FIXED_INTF(0x19d2, 0x1008, 4)}, /* ZTE (Vodafone) K3570-Z */ {QMI_FIXED_INTF(0x19d2, 0x1010, 4)}, /* ZTE (Vodafone) K3571-Z */
@@ -1200,7 +1208,9 @@ static const struct usb_device_id products[] = { {QMI_FIXED_INTF(0x19d2, 0x1425, 2)}, {QMI_FIXED_INTF(0x19d2, 0x1426, 2)}, /* ZTE MF91 */ {QMI_FIXED_INTF(0x19d2, 0x1428, 2)}, /* Telewell TW-LTE 4G v2 */ + {QMI_FIXED_INTF(0x19d2, 0x1432, 3)}, /* ZTE ME3620 */ {QMI_FIXED_INTF(0x19d2, 0x2002, 4)}, /* ZTE (Vodafone) K3765-Z */ + {QMI_FIXED_INTF(0x2001, 0x7e16, 3)}, /* D-Link DWM-221 */ {QMI_FIXED_INTF(0x2001, 0x7e19, 4)}, /* D-Link DWM-221 B1 */ {QMI_FIXED_INTF(0x2001, 0x7e35, 4)}, /* D-Link DWM-222 */ {QMI_FIXED_INTF(0x2020, 0x2031, 4)}, /* Olicard 600 */
@@ -1240,6 +1250,8 @@ static const struct usb_device_id products[] = { {QMI_FIXED_INTF(0x1bc7, 0x1101, 3)}, /* Telit ME910 dual modem */ {QMI_FIXED_INTF(0x1bc7, 0x1200, 5)}, /* Telit LE920 */ {QMI_QUIRK_SET_DTR(0x1bc7, 0x1201, 2)}, /* Telit LE920, LE920A4 */ + {QMI_QUIRK_SET_DTR(0x1bc7, 0x1260, 2)}, /* Telit LE910Cx */ + {QMI_QUIRK_SET_DTR(0x1bc7, 0x1261, 2)}, /* Telit LE910Cx */ {QMI_QUIRK_SET_DTR(0x1bc7, 0x1900, 1)}, /* Telit LN940 series */ {QMI_FIXED_INTF(0x1c9e, 0x9801, 3)}, /* Telewell TW-3G HSPA+ */ {QMI_FIXED_INTF(0x1c9e, 0x9803, 4)}, /* Telewell TW-3G HSPA+ */
drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c +24 -4
@@ -143,9 +143,9 @@ static inline int iwl_mvm_check_pn(struct iwl_mvm *mvm, struct sk_buff *skb, }/* iwl_mvm_create_skb Adds the rxb to a new skb */ -static void iwl_mvm_create_skb (struct sk_buff *skb,struct ieee80211_hdr *hdr, -u16 len,u8 crypt_len, -struct iwl_rx_cmd_buffer *rxb) +static int iwl_mvm_create_skb (struct iwl_mvm *mvm,struct sk_buff *skb, +struct ieee80211_hdr *hdr,u16 len,u8 crypt_len, +struct iwl_rx_cmd_buffer *rxb) {struct iwl_rx_packet *pkt =rxb_addr (rxb);struct iwl_rx_mpdu_desc *desc = (void *)pkt->data;
@@ -178,6 +178,20 @@ static void iwl_mvm_create_skb(struct sk_buff *skb, struct ieee80211_hdr *hdr,* present before copying packet data. */ hdrlen += crypt_len; + +if (WARN_ONCE (headlen < hdrlen, +"invalid packet lengths (hdrlen=%d, len=%d, crypt_len=%d)\n" , + hdrlen, len, crypt_len)) { +/* +* We warn and trace because we want to be able to see +* it in trace-cmd as well. +*/ +IWL_DEBUG_RX (mvm, +"invalid packet lengths (hdrlen=%d, len=%d, crypt_len=%d)\n" , + hdrlen, len, crypt_len); +return -EINVAL ; + } +skb_put_data (skb, hdr, hdrlen);skb_put_data (skb, (u8 *)hdr + hdrlen + pad_len, headlen - hdrlen);
@@ -190,6 +204,8 @@ static void iwl_mvm_create_skb(struct sk_buff *skb, struct ieee80211_hdr *hdr,skb_add_rx_frag (skb,0 ,rxb_steal_page (rxb), offset, fraglen, rxb->truesize); } + +return 0 ; }/* iwl_mvm_pass_packet_to_mac80211 - passes the packet for mac80211 */
@@ -1425,7 +1441,11 @@ void iwl_mvm_rx_mpdu_mq(struct iwl_mvm *mvm, struct napi_struct *napi, rx_status->boottime_ns =ktime_get_boot_ns (); } -iwl_mvm_create_skb (skb, hdr, len, crypt_len, rxb); +if (iwl_mvm_create_skb (mvm, skb, hdr, len, crypt_len, rxb)) { +kfree_skb (skb); + goto out; + } +if (!iwl_mvm_reorder (mvm, napi, queue, sta, skb, desc))iwl_mvm_pass_packet_to_mac80211 (mvm, napi, skb, queue, sta); out:
drivers/net/wireless/intersil/p54/p54pci.c +2 -1
@@ -554,7 +554,7 @@ static int p54p_probe(struct pci_dev *pdev, err =pci_enable_device (pdev);if (err) {dev_err (&pdev->dev,"Cannot enable new PCI device\n" ); -return err; + goto err_put; } mem_addr =pci_resource_start (pdev,0 );
@@ -639,6 +639,7 @@ static int p54p_probe(struct pci_dev *pdev,pci_release_regions (pdev); err_disable_dev:pci_disable_device (pdev); +err_put:pci_dev_put (pdev);return err; }
drivers/parisc/led.c +3 -0
@@ -568,6 +568,9 @@ int __init register_led_driver(int model, unsigned long cmd_reg, unsigned long dbreak ;case DISPLAY_MODEL_LASI : +/* Skip to register LED in QEMU */ +if (running_on_qemu) +return 1 ;LED_DATA_REG = data_reg; led_func_ptr = led_LASI_driver;printk (KERN_INFO "LED display at %lx registered\n" ,LED_DATA_REG );
drivers/pci/controller/pcie-rcar.c +21 -0
@@ -46,6 +46,7 @@/* Transfer control */ #define PCIETCTLR 0x02000 +#define DL_DOWN BIT(3)#define CFINIT 1#define PCIETSTR 0x02004#define DATA_LINK_ACTIVE 1
@@ -94,6 +95,7 @@#define MACCTLR 0x011058#define SPEED_CHANGE BIT(24)#define SCRAMBLE_DISABLE BIT(27) +#define PMSR 0x01105c#define MACS2R 0x011078#define MACCGSPSETR 0x011084#define SPCNGRSN BIT(31)
@@ -1130,6 +1132,7 @@ static int rcar_pcie_probe(struct platform_device *pdev) pcie =pci_host_bridge_priv (bridge); pcie->dev = dev; +platform_set_drvdata (pdev, pcie); err =pci_parse_request_of_pci_ranges (dev, &pcie->resources,NULL );if (err)
@@ -1221,10 +1224,28 @@ static int rcar_pcie_probe(struct platform_device *pdev)return err; } +static int rcar_pcie_resume_noirq (struct device *dev) +{ +struct rcar_pcie *pcie =dev_get_drvdata (dev); + +if (rcar_pci_read_reg (pcie,PMSR ) && + !(rcar_pci_read_reg (pcie,PCIETCTLR ) &DL_DOWN )) +return 0 ; + +/* Re-establish the PCIe link */ +rcar_pci_write_reg (pcie,CFINIT ,PCIETCTLR ); +return rcar_pcie_wait_for_dl (pcie); +} + +static const struct dev_pm_ops rcar_pcie_pm_ops = { + .resume_noirq = rcar_pcie_resume_noirq, +}; +static struct platform_driver rcar_pcie_driver = { .driver = { .name ="rcar-pcie" , .of_match_table = rcar_pcie_of_match, + .pm = &rcar_pcie_pm_ops, .suppress_bind_attrs = true, }, .probe = rcar_pcie_probe,
drivers/pci/pci.c +17 -2
@@ -6135,8 +6135,7 @@ static int __init pci_setup(char *str) }else if (!strncmp (str,"pcie_scan_all" ,13 )) {pci_add_flags (PCI_SCAN_ALL_PCIE_DEVS ); }else if (!strncmp (str,"disable_acs_redir=" ,18 )) { - disable_acs_redir_param = -kstrdup (str +18 ,GFP_KERNEL ); + disable_acs_redir_param = str +18 ; }else {printk (KERN_ERR "PCI: Unknown option `%s'\n" , str);
@@ -6147,3 +6146,19 @@ static int __init pci_setup(char *str)return 0 ; }early_param ("pci" , pci_setup); + +/* +* 'disable_acs_redir_param' is initialized in pci_setup(), above, to point +* to data in the __initdata section which will be freed after the init +* sequence is complete. We can't allocate memory in pci_setup() because some +* architectures do not have any memory allocation service available during +* an early_param() call. So we allocate memory and copy the variable here +* before the init section is freed. +*/ +static int __init pci_realloc_setup_params (void ) +{ + disable_acs_redir_param =kstrdup (disable_acs_redir_param,GFP_KERNEL ); + +return 0 ; +} +pure_initcall (pci_realloc_setup_params);
drivers/pci/pci.h +1 -1
@@ -530,7 +530,7 @@ void pci_aer_clear_fatal_status(struct pci_dev *dev);void pci_aer_clear_device_status (struct pci_dev *dev);#else static inline void pci_no_aer (void ) { } -static inline int pci_aer_init (struct pci_dev *d) {return -ENODEV ; } +static inline void pci_aer_init (struct pci_dev *d) { }static inline void pci_aer_exit (struct pci_dev *d) { }static inline void pci_aer_clear_fatal_status (struct pci_dev *dev) { }static inline void pci_aer_clear_device_status (struct pci_dev *dev) { }
drivers/pci/pcie/aspm.c +33 -16
67 lines not on this page · raw message
drivers/pci/probe.c +14 -9
@@ -535,16 +535,9 @@ static void pci_release_host_bridge_dev(struct device *dev)kfree (to_pci_host_bridge (dev)); } -struct pci_host_bridge *pci_alloc_host_bridge (size_t priv) +static void pci_init_host_bridge (struct pci_host_bridge *bridge) { -struct pci_host_bridge *bridge; - - bridge =kzalloc (sizeof (*bridge) + priv,GFP_KERNEL ); -if (!bridge) -return NULL ; -INIT_LIST_HEAD (&bridge->windows); - bridge->dev.release = pci_release_host_bridge_dev;/* * We assume we can manage these PCIe features. Some systems may
@@ -557,6 +550,18 @@ struct pci_host_bridge *pci_alloc_host_bridge(size_t priv) bridge->native_shpc_hotplug =1 ; bridge->native_pme =1 ; bridge->native_ltr =1 ; +} + +struct pci_host_bridge *pci_alloc_host_bridge (size_t priv) +{ +struct pci_host_bridge *bridge; + + bridge =kzalloc (sizeof (*bridge) + priv,GFP_KERNEL ); +if (!bridge) +return NULL ; + +pci_init_host_bridge (bridge); + bridge->dev.release = pci_release_host_bridge_dev;return bridge; }
@@ -571,7 +576,7 @@ struct pci_host_bridge *devm_pci_alloc_host_bridge(struct device *dev,if (!bridge)return NULL ; -INIT_LIST_HEAD (&bridge->windows); +pci_init_host_bridge (bridge); bridge->dev.release = devm_pci_release_host_bridge_dev;return bridge;
drivers/pci/quirks.c +19 -0
@@ -2220,6 +2220,23 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x10f1, quirk_disable_aspm_l0s);DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,0x10f4 , quirk_disable_aspm_l0s);DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,0x1508 , quirk_disable_aspm_l0s); +/* +* Some Pericom PCIe-to-PCI bridges in reverse mode need the PCIe Retrain +* Link bit cleared after starting the link retrain process to allow this +* process to finish. +* +* Affected devices: PI7C9X110, PI7C9X111SL, PI7C9X130. See also the +* Pericom Errata Sheet PI7C9X111SLB_errata_rev1.2_102711.pdf. +*/ +static void quirk_enable_clear_retrain_link (struct pci_dev *dev) +{ + dev->clear_retrain_link =1 ; +pci_info (dev,"Enable PCIe Retrain Link quirk\n" ); +} +DECLARE_PCI_FIXUP_HEADER (0x12d8 ,0xe110 , quirk_enable_clear_retrain_link); +DECLARE_PCI_FIXUP_HEADER (0x12d8 ,0xe111 , quirk_enable_clear_retrain_link); +DECLARE_PCI_FIXUP_HEADER (0x12d8 ,0xe130 , quirk_enable_clear_retrain_link); +static void fixup_rev1_53c810 (struct pci_dev *dev) {u32 class = dev->class;
@@ -3383,6 +3400,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATHEROS, 0x0030, quirk_no_bus_reset);DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_ATHEROS ,0x0032 , quirk_no_bus_reset);DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_ATHEROS ,0x003c , quirk_no_bus_reset);DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_ATHEROS ,0x0033 , quirk_no_bus_reset); +DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_ATHEROS ,0x0034 , quirk_no_bus_reset);/* * Root port on some Cavium CN8xxx chips do not successfully complete a bus
@@ -4878,6 +4896,7 @@ static void quirk_no_ats(struct pci_dev *pdev)/* AMD Stoney platform GPU */ DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_ATI ,0x98e4 , quirk_no_ats); +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_ATI ,0x6900 , quirk_no_ats);#endif /* CONFIG_PCI_ATS */ /* Freescale PCIe doesn't support MSI in RC mode */
drivers/phy/ti/phy-ti-pipe3.c +1 -1
@@ -303,7 +303,7 @@ static void ti_pipe3_calibrate(struct ti_pipe3 *phy) val =ti_pipe3_readl (phy->phy_rx,PCIEPHYRX_ANA_PROGRAMMABILITY ); val &= ~(INTERFACE_MASK |LOSD_MASK |MEM_PLLDIV ); - val = (0x1 <<INTERFACE_SHIFT |0xA <<LOSD_SHIFT ); + val |= (0x1 <<INTERFACE_SHIFT |0xA <<LOSD_SHIFT );ti_pipe3_writel (phy->phy_rx,PCIEPHYRX_ANA_PROGRAMMABILITY , val); val =ti_pipe3_readl (phy->phy_rx,PCIEPHYRX_DIGITAL_MODES );
drivers/power/supply/cpcap-battery.c +3 -0
@@ -221,6 +221,9 @@ static int cpcap_battery_cc_raw_div(struct cpcap_battery_ddata *ddata,int avg_current;u32 cc_lsb; +if (!divider) +return 0 ; + sample &=0xffffff ;/* 24-bits, unsigned */ offset &=0x7ff ;/* 10-bits, signed */
drivers/power/supply/power_supply_sysfs.c +0 -6
@@ -382,15 +382,11 @@ int power_supply_uevent(struct device *dev, struct kobj_uevent_env *env)char *prop_buf;char *attrname; -dev_dbg (dev,"uevent\n" ); -if (!psy || !psy->desc) {dev_dbg (dev,"No power supply yet\n" );return ret; } -dev_dbg (dev,"POWER_SUPPLY_NAME=%s\n" , psy->desc->name); - ret =add_uevent_var (env,"POWER_SUPPLY_NAME=%s" , psy->desc->name);if (ret)return ret;
@@ -426,8 +422,6 @@ int power_supply_uevent(struct device *dev, struct kobj_uevent_env *env) goto out; } -dev_dbg (dev,"prop %s=%s\n" , attrname, prop_buf); - ret =add_uevent_var (env,"POWER_SUPPLY_%s=%s" , attrname, prop_buf);kfree (attrname);if (ret)
drivers/staging/media/imx/imx-media-csi.c +14 -4
@@ -153,9 +153,10 @@ static inline bool requires_passthrough(struct v4l2_fwnode_endpoint *ep,/* * Parses the fwnode endpoint from the source pad of the entity * connected to this CSI. This will either be the entity directly -* upstream from the CSI-2 receiver, or directly upstream from the -* video mux. The endpoint is needed to determine the bus type and -* bus config coming into the CSI. +* upstream from the CSI-2 receiver, directly upstream from the +* video mux, or directly upstream from the CSI itself. The endpoint +* is needed to determine the bus type and bus config coming into +* the CSI. */ static int csi_get_upstream_endpoint (struct csi_priv *priv,struct v4l2_fwnode_endpoint *ep)
@@ -168,7 +169,8 @@ static int csi_get_upstream_endpoint(struct csi_priv *priv,if (!priv->src_sd)return -EPIPE ; - src = &priv->src_sd->entity; + sd = priv->src_sd; + src = &sd->entity;if (src->function ==MEDIA_ENT_F_VID_MUX ) {/*
@@ -182,6 +184,14 @@ static int csi_get_upstream_endpoint(struct csi_priv *priv, src = &sd->entity; } +/* +* If the source is neither the video mux nor the CSI-2 receiver, +* get the source pad directly upstream from CSI itself. +*/ +if (src->function !=MEDIA_ENT_F_VID_MUX && + sd->grp_id !=IMX_MEDIA_GRP_ID_CSI2 ) + src = &priv->sd.entity; +/* get source pad of entity directly upstream from src */ pad =imx_media_find_upstream_pad (priv->md, src,0 );if (IS_ERR (pad))
drivers/staging/media/imx/imx-media-of.c +9 -6
@@ -233,15 +233,18 @@ int imx_media_create_csi_of_links(struct imx_media_dev *imxmd, struct v4l2_subdev *csi) {struct device_node *csi_np = csi->dev->of_node; -struct fwnode_handle *fwnode, *csi_ep; -struct v4l2_fwnode_link link;struct device_node *ep; -int ret; - - link.local_node =of_fwnode_handle (csi_np); - link.local_port =CSI_SINK_PAD ;for_each_child_of_node (csi_np, ep) { +struct fwnode_handle *fwnode, *csi_ep; +struct v4l2_fwnode_link link; +int ret; + +memset (&link,0 ,sizeof (link)); + + link.local_node =of_fwnode_handle (csi_np); + link.local_port =CSI_SINK_PAD ; + csi_ep =of_fwnode_handle (ep); fwnode =fwnode_graph_get_remote_endpoint (csi_ep);
drivers/video/fbdev/efifb.c +6 -2
@@ -476,8 +476,12 @@ static int efifb_probe(struct platform_device *dev)* If the UEFI memory map covers the efifb region, we may only * remap it using the attributes the memory map prescribes. */ - mem_flags |=EFI_MEMORY_WT |EFI_MEMORY_WB ; - mem_flags &= md.attribute; + md.attribute &=EFI_MEMORY_UC |EFI_MEMORY_WC | +EFI_MEMORY_WT |EFI_MEMORY_WB ; +if (md.attribute) { + mem_flags |=EFI_MEMORY_WT |EFI_MEMORY_WB ; + mem_flags &= md.attribute; + } }if (mem_flags &EFI_MEMORY_WC ) info->screen_base = ioremap_wc(efifb_fix.smem_start,
drivers/video/fbdev/sm712.h +4 -8
@@ -15,14 +15,10 @@#define FB_ACCEL_SMI_LYNX 88 -#define SCREEN_X_RES 1024 -#define SCREEN_Y_RES 600 -#define SCREEN_BPP 16 - -/*Assume SM712 graphics chip has 4MB VRAM */ -#define SM712_VIDEOMEMORYSIZE 0x00400000 -/*Assume SM722 graphics chip has 8MB VRAM */ -#define SM722_VIDEOMEMORYSIZE 0x00800000 +#define SCREEN_X_RES 1024 +#define SCREEN_Y_RES_PC 768 +#define SCREEN_Y_RES_NETBOOK 600 +#define SCREEN_BPP 16#define dac_reg (0x3c8)#define dac_val (0x3c9)
drivers/video/fbdev/sm712fb.c +196 -47
353 lines not on this page · raw message
drivers/video/fbdev/udlfb.c +90 -24
215 lines not on this page · raw message
fs/ceph/super.c +7 -0
@@ -819,6 +819,12 @@ static void ceph_umount_begin(struct super_block *sb)return ; } +static int ceph_remount (struct super_block *sb,int *flags,char *data) +{ +sync_filesystem (sb); +return 0 ; +} +static const struct super_operations ceph_super_ops = { .alloc_inode = ceph_alloc_inode, .destroy_inode = ceph_destroy_inode,
@@ -826,6 +832,7 @@ static const struct super_operations ceph_super_ops = { .drop_inode = ceph_drop_inode, .sync_fs = ceph_sync_fs, .put_super = ceph_put_super, + .remount_fs = ceph_remount, .show_options = ceph_show_options, .statfs = ceph_statfs, .umount_begin = ceph_umount_begin,
fs/cifs/smb2ops.c +8 -6
@@ -2348,26 +2348,28 @@ smb21_set_oplock_level(struct cifsInodeInfo *cinode, __u32 oplock, unsigned int epoch, bool *purge_cache) { char message[5] = {0}; +unsigned int new_oplock =0 ; oplock &=0xFF ;if (oplock ==SMB2_OPLOCK_LEVEL_NOCHANGE )return ; - cinode->oplock =0 ;if (oplock &SMB2_LEASE_READ_CACHING_HE ) { - cinode->oplock |=CIFS_CACHE_READ_FLG ; + new_oplock |=CIFS_CACHE_READ_FLG ;strcat (message,"R" ); }if (oplock &SMB2_LEASE_HANDLE_CACHING_HE ) { - cinode->oplock |=CIFS_CACHE_HANDLE_FLG ; + new_oplock |=CIFS_CACHE_HANDLE_FLG ;strcat (message,"H" ); }if (oplock &SMB2_LEASE_WRITE_CACHING_HE ) { - cinode->oplock |=CIFS_CACHE_WRITE_FLG ; + new_oplock |=CIFS_CACHE_WRITE_FLG ;strcat (message,"W" ); } -if (!cinode->oplock) -strcat (message,"None" ); +if (!new_oplock) +strncpy (message,"None" ,sizeof (message)); + + cinode->oplock = new_oplock;cifs_dbg (FYI ,"%s Lease granted on inode %p\n" , message, &cinode->vfs_inode); }
fs/dcache.c +13 -11
@@ -344,7 +344,7 @@ static void dentry_free(struct dentry *dentry) } }/* if dentry was never visible to RCU, immediate free is OK */ -if (!(dentry->d_flags &DCACHE_RCUACCESS )) +if (dentry->d_flags &DCACHE_NORCU )__d_free (&dentry->d_u.d_rcu);else call_rcu (&dentry->d_u.d_rcu, __d_free);
@@ -1694,7 +1694,6 @@ struct dentry *d_alloc(struct dentry * parent, const struct qstr *name)struct dentry *dentry =__d_alloc (parent->d_sb, name);if (!dentry)return NULL ; - dentry->d_flags |=DCACHE_RCUACCESS ;spin_lock (&parent->d_lock);/* * don't need child lock because it is not subject
@@ -1719,7 +1718,7 @@ struct dentry *d_alloc_cursor(struct dentry * parent) {struct dentry *dentry =d_alloc_anon (parent->d_sb);if (dentry) { - dentry->d_flags |=DCACHE_RCUACCESS |DCACHE_DENTRY_CURSOR ; + dentry->d_flags |=DCACHE_DENTRY_CURSOR ; dentry->d_parent =dget (parent); }return dentry;
@@ -1732,10 +1731,17 @@ struct dentry *d_alloc_cursor(struct dentry * parent)* * For a filesystem that just pins its dentries in memory and never * performs lookups at all, return an unhashed IS_ROOT dentry. +* This is used for pipes, sockets et.al. - the stuff that should +* never be anyone's children or parents. Unlike all other +* dentries, these will not have RCU delay between dropping the +* last reference and freeing them. */ struct dentry *d_alloc_pseudo (struct super_block *sb,const struct qstr *name) { -return __d_alloc (sb, name); +struct dentry *dentry =__d_alloc (sb, name); +if (likely (dentry)) + dentry->d_flags |=DCACHE_NORCU ; +return dentry; }EXPORT_SYMBOL (d_alloc_pseudo);
@@ -1899,12 +1905,10 @@ struct dentry *d_make_root(struct inode *root_inode)if (root_inode) { res =d_alloc_anon (root_inode->i_sb); -if (res) { - res->d_flags |=DCACHE_RCUACCESS ; +if (res)d_instantiate (res, root_inode); - }else { +else iput (root_inode); - } }return res; }
@@ -2769,9 +2773,7 @@ static void __d_move(struct dentry *dentry, struct dentry *target,copy_name (dentry, target); target->d_hash.pprev =NULL ; dentry->d_parent->d_lockref.count++; -if (dentry == old_parent) - dentry->d_flags |=DCACHE_RCUACCESS ; -else +if (dentry != old_parent)/* wasn't IS_ROOT */ WARN_ON (!--old_parent->d_lockref.count); }else { target->d_parent = old_parent;
fs/fuse/file.c +11 -2
@@ -179,7 +179,9 @@ void fuse_finish_open(struct inode *inode, struct file *file) file->f_op = &fuse_direct_io_file_operations;if (!(ff->open_flags &FOPEN_KEEP_CACHE ))invalidate_inode_pages2 (inode->i_mapping); -if (ff->open_flags &FOPEN_NONSEEKABLE ) +if (ff->open_flags &FOPEN_STREAM ) +stream_open (inode, file); +else if (ff->open_flags &FOPEN_NONSEEKABLE )nonseekable_open (inode, file);if (fc->atomic_o_trunc && (file->f_flags &O_TRUNC )) {struct fuse_inode *fi =get_fuse_inode (inode);
@@ -1526,7 +1528,7 @@ __acquires(fc->lock) {struct fuse_conn *fc =get_fuse_conn (inode);struct fuse_inode *fi =get_fuse_inode (inode); -size_t crop =i_size_read (inode); +loff_t crop =i_size_read (inode);struct fuse_req *req;while (fi->writectr >=0 && !list_empty (&fi->queued_writes)) {
@@ -2975,6 +2977,13 @@ static long fuse_file_fallocate(struct file *file, int mode, loff_t offset, } } +if (!(mode &FALLOC_FL_KEEP_SIZE ) && + offset + length >i_size_read (inode)) { + err =inode_newsize_ok (inode, offset + length); +if (err) +return err; + } +if (!(mode &FALLOC_FL_KEEP_SIZE ))set_bit (FUSE_I_SIZE_UNSTABLE , &fi->state);
fs/nfs/filelayout/filelayout.c +1 -1
@@ -904,7 +904,7 @@ fl_pnfs_update_layout(struct inode *ino, status =filelayout_check_deviceid (lo, fl, gfp_flags);if (status) {pnfs_put_lseg (lseg); - lseg =ERR_PTR (status); + lseg =NULL ; } out:return lseg;
fs/nfs/nfs4state.c +4 -0
@@ -159,6 +159,10 @@ int nfs40_discover_server_trunking(struct nfs_client *clp,/* Sustain the lease, even if it's empty. If the clientid4 * goes stale it's of no use for trunking discovery. */ nfs4_schedule_state_renewal (*result); + +/* If the client state need to recover, do it. */ +if (clp->cl_state) +nfs4_schedule_state_manager (clp); } out:return status;
fs/nsfs.c +1 -2
@@ -85,13 +85,12 @@ static void *__ns_get_path(struct path *path, struct ns_common *ns) inode->i_fop = &ns_file_operations; inode->i_private = ns; - dentry =d_alloc_pseudo (mnt->mnt_sb, &empty_name); + dentry =d_alloc_anon (mnt->mnt_sb);if (!dentry) {iput (inode);return ERR_PTR (-ENOMEM ); }d_instantiate (dentry, inode); - dentry->d_flags |=DCACHE_RCUACCESS ; dentry->d_fsdata = (void *)ns->ops; d =atomic_long_cmpxchg (&ns->stashed,0 , (unsigned long )dentry);if (d) {
fs/overlayfs/copy_up.c +3 -3
@@ -878,14 +878,14 @@ static bool ovl_open_need_copy_up(struct dentry *dentry, int flags)return true; } -int ovl_open_maybe_copy_up (struct dentry *dentry,unsigned int file_flags) +int ovl_maybe_copy_up (struct dentry *dentry,int flags) {int err =0 ; -if (ovl_open_need_copy_up (dentry, file_flags)) { +if (ovl_open_need_copy_up (dentry, flags)) { err =ovl_want_write (dentry);if (!err) { - err =ovl_copy_up_flags (dentry, file_flags); + err =ovl_copy_up_flags (dentry, flags);ovl_drop_write (dentry); } }
fs/overlayfs/file.c +2 -3
@@ -116,11 +116,10 @@ static int ovl_real_fdget(const struct file *file, struct fd *real)static int ovl_open (struct inode *inode,struct file *file) { -struct dentry *dentry =file_dentry (file);struct file *realfile;int err; - err =ovl_open_maybe_copy_up (dentry, file->f_flags); + err =ovl_maybe_copy_up (file_dentry (file), file->f_flags);if (err)return err;
@@ -390,7 +389,7 @@ static long ovl_ioctl(struct file *file, unsigned int cmd, unsigned long arg)if (ret)return ret; - ret =ovl_copy_up_with_data (file_dentry (file)); + ret =ovl_maybe_copy_up (file_dentry (file),O_WRONLY );if (!ret) { ret =ovl_real_ioctl (file, cmd, arg);
fs/overlayfs/overlayfs.h +1 -1
@@ -411,7 +411,7 @@ extern const struct file_operations ovl_file_operations;int ovl_copy_up (struct dentry *dentry);int ovl_copy_up_with_data (struct dentry *dentry);int ovl_copy_up_flags (struct dentry *dentry,int flags); -int ovl_open_maybe_copy_up (struct dentry *dentry,unsigned int file_flags); +int ovl_maybe_copy_up (struct dentry *dentry,int flags);int ovl_copy_xattr (struct dentry *old,struct dentry *new);int ovl_set_attr (struct dentry *upper,struct kstat *stat);struct ovl_fh *ovl_encode_real_fh (struct dentry *real,bool is_upper);
fs/proc/base.c +5 -0
@@ -2542,6 +2542,11 @@ static ssize_t proc_pid_attr_write(struct file * file, const char __user * buf,rcu_read_unlock ();return -EACCES ; } +/* Prevent changes to overridden credentials. */ +if (current_cred () !=current_real_cred ()) { +rcu_read_unlock (); +return -EBUSY ; + }rcu_read_unlock ();if (count >PAGE_SIZE )
fs/ufs/util.h +1 -1
@@ -229,7 +229,7 @@ ufs_get_inode_gid(struct super_block *sb, struct ufs_inode *inode)case UFS_UID_44BSD :return fs32_to_cpu (sb, inode->ui_u3.ui_44.ui_gid);case UFS_UID_EFT : -if (inode->ui_u1.oldids.ui_suid ==0xFFFF ) +if (inode->ui_u1.oldids.ui_sgid ==0xFFFF )return fs32_to_cpu (sb, inode->ui_u3.ui_sun.ui_gid);/* Fall through */ default :
include/linux/bpf.h +2 -1
@@ -34,6 +34,7 @@ struct bpf_map_ops {void (*map_free)(struct bpf_map *map);int (*map_get_next_key)(struct bpf_map *map,void *key,void *next_key);void (*map_release_uref)(struct bpf_map *map); +void *(*map_lookup_elem_sys_only)(struct bpf_map *map,void *key);/* funcs callable from userspace and from eBPF programs */ void *(*map_lookup_elem)(struct bpf_map *map,void *key);
@@ -400,7 +401,7 @@ int bpf_prog_array_copy(struct bpf_prog_array __rcu *old_array, } \ _out: \rcu_read_unlock (); \ -preempt_enable_no_resched (); \ +preempt_enable (); \ _ret; \ })
include/linux/dcache.h +1 -1
@@ -175,7 +175,6 @@ struct dentry_operations {* typically using d_splice_alias. */ #define DCACHE_REFERENCED 0x00000040/* Recently used, don't discard. */ -#define DCACHE_RCUACCESS 0x00000080/* Entry has ever been RCU-visible */ #define DCACHE_CANT_MOUNT 0x00000100#define DCACHE_GENOCIDE 0x00000200
@@ -216,6 +215,7 @@ struct dentry_operations {#define DCACHE_PAR_LOOKUP 0x10000000/* being looked up (with parent locked shared) */ #define DCACHE_DENTRY_CURSOR 0x20000000 +#define DCACHE_NORCU 0x40000000/* No RCU delay for freeing */ extern seqlock_t rename_lock;
include/linux/of.h +2 -2
@@ -236,8 +236,8 @@ extern struct device_node *of_find_all_nodes(struct device_node *prev);static inline u64 of_read_number (const __be32 *cell,int size) {u64 r =0 ; -while (size--) - r = (r <<32 ) |be32_to_cpu (*(cell++)); +for (; size--; cell++) + r = (r <<32 ) |be32_to_cpu (*cell);return r; }
include/linux/pci.h +2 -0
@@ -346,6 +346,8 @@ struct pci_dev { unsigned int hotplug_user_indicators:1; /* SlotCtl indicatorscontrolled exclusively by user sysfs */ + unsigned int clear_retrain_link:1; /* Need to clear Retrain Link +bit manually */ unsigned int d3_delay;/* D3->D0 transition time in ms */ unsigned int d3cold_delay;/* D3cold->D0 transition time in ms */
include/linux/skbuff.h +6 -3
@@ -1333,10 +1333,12 @@ static inline void skb_zcopy_clear(struct sk_buff *skb, bool zerocopy)struct ubuf_info *uarg =skb_zcopy (skb);if (uarg) { -if (uarg->callback == sock_zerocopy_callback) { +if (skb_zcopy_is_nouarg (skb)) { +/* no notification callback */ + }else if (uarg->callback == sock_zerocopy_callback) { uarg->zerocopy = uarg->zerocopy && zerocopy;sock_zerocopy_put (uarg); - }else if (!skb_zcopy_is_nouarg (skb)) { + }else { uarg->callback (uarg, zerocopy); }
@@ -2587,7 +2589,8 @@ static inline int skb_orphan_frags(struct sk_buff *skb, gfp_t gfp_mask) {if (likely (!skb_zcopy (skb)))return 0 ; -if (skb_uarg (skb)->callback == sock_zerocopy_callback) +if (!skb_zcopy_is_nouarg (skb) && +skb_uarg (skb)->callback == sock_zerocopy_callback)return 0 ;return skb_copy_ubufs (skb, gfp_mask); }
include/net/ip6_fib.h +2 -1
@@ -171,7 +171,8 @@ struct fib6_info { dst_nocount:1, dst_nopolicy:1, dst_host:1, - unused:3; + fib6_destroying:1, + unused:2;struct fib6_nh fib6_nh;struct rcu_head rcu;
include/net/xfrm.h +19 -1
@@ -295,7 +295,8 @@ struct xfrm_replay { };struct xfrm_if_cb { -struct xfrm_if *(*decode_session)(struct sk_buff *skb); +struct xfrm_if *(*decode_session)(struct sk_buff *skb, +unsigned short family); };void xfrm_if_register_cb (const struct xfrm_if_cb *ifcb);
@@ -1430,6 +1431,23 @@ static inline int xfrm_state_kern(const struct xfrm_state *x)return atomic_read (&x->tunnel_users); } +static inline bool xfrm_id_proto_valid (u8 proto) +{ +switch (proto) { +case IPPROTO_AH : +case IPPROTO_ESP : +case IPPROTO_COMP : +#if IS_ENABLED (CONFIG_IPV6 ) +case IPPROTO_ROUTING : +case IPPROTO_DSTOPTS : +#endif +return true; +default : +return false; + } +} + +/* IPSEC_PROTO_ANY only matches 3 IPsec protocols, 0 could match all. */ static inline int xfrm_id_proto_match (u8 proto,u8 userproto) { return (!userproto || proto == userproto ||
include/uapi/linux/fuse.h +2 -0
@@ -219,10 +219,12 @@ struct fuse_file_lock {* FOPEN_DIRECT_IO: bypass page cache for this open file * FOPEN_KEEP_CACHE: don't invalidate the data cache on open * FOPEN_NONSEEKABLE: the file is not seekable +* FOPEN_STREAM: the file is stream-like (no file position at all) */ #define FOPEN_DIRECT_IO (1 << 0)#define FOPEN_KEEP_CACHE (1 << 1)#define FOPEN_NONSEEKABLE (1 << 2) +#define FOPEN_STREAM (1 << 4)/** * INIT request/reply flags
include/video/udlfb.h +7 -0
@@ -48,6 +48,13 @@ struct dlfb_data {int base8;u32 pseudo_palette[256 ];int blank_mode;/*one of FB_BLANK_ */ +struct mutex render_mutex; +int damage_x; +int damage_y; +int damage_x2; +int damage_y2; +spinlock_t damage_lock; +struct work_struct damage_work;struct fb_ops ops;/* blit-only rendering path metrics, exposed through sysfs */ atomic_t bytes_rendered;/* raw pixel-bytes driver asked to render */
kernel/bpf/hashtab.c +18 -5
@@ -518,18 +518,30 @@ static u32 htab_map_gen_lookup(struct bpf_map *map, struct bpf_insn *insn_buf)return insn - insn_buf; } -static void *htab_lru_map_lookup_elem (struct bpf_map *map,void *key) +static __always_inline void *__htab_lru_map_lookup_elem(struct bpf_map *map, +void *key,const bool mark) {struct htab_elem *l =__htab_map_lookup_elem (map, key);if (l) { -bpf_lru_node_set_ref (&l->lru_node); +if (mark) +bpf_lru_node_set_ref (&l->lru_node);return l->key +round_up (map->key_size,8 ); }return NULL ; } +static void *htab_lru_map_lookup_elem (struct bpf_map *map,void *key) +{ +return __htab_lru_map_lookup_elem (map, key, true); +} + +static void *htab_lru_map_lookup_elem_sys (struct bpf_map *map,void *key) +{ +return __htab_lru_map_lookup_elem (map, key, false); +} +static u32 htab_lru_map_gen_lookup (struct bpf_map *map,struct bpf_insn *insn_buf) {
@@ -1206,6 +1218,7 @@ const struct bpf_map_ops htab_lru_map_ops = { .map_free = htab_map_free, .map_get_next_key = htab_map_get_next_key, .map_lookup_elem = htab_lru_map_lookup_elem, + .map_lookup_elem_sys_only = htab_lru_map_lookup_elem_sys, .map_update_elem = htab_lru_map_update_elem, .map_delete_elem = htab_lru_map_delete_elem, .map_gen_lookup = htab_lru_map_gen_lookup,
@@ -1237,7 +1250,6 @@ static void *htab_lru_percpu_map_lookup_elem(struct bpf_map *map, void *key)int bpf_percpu_hash_copy (struct bpf_map *map,void *key,void *value) { - struct bpf_htab *htab = container_of(map, struct bpf_htab, map);struct htab_elem *l;void __percpu *pptr;int ret = -ENOENT ;
@@ -1253,8 +1265,9 @@ int bpf_percpu_hash_copy(struct bpf_map *map, void *key, void *value) l =__htab_map_lookup_elem (map, key);if (!l) goto out; -if (htab_is_lru (htab)) -bpf_lru_node_set_ref (&l->lru_node); +/* We do not mark LRU map element here in order to not mess up +* eviction heuristics when user space does a map walk. +*/ pptr =htab_elem_get_ptr (l, map->key_size);for_each_possible_cpu (cpu) { bpf_long_memcpy(value + off,
kernel/bpf/inode.c +1 -1
@@ -518,7 +518,7 @@ int bpf_obj_get_user(const char __user *pathname, int flags)static struct bpf_prog *__get_prog_inode (struct inode *inode,enum bpf_prog_type type) {struct bpf_prog *prog; -int ret =inode_permission (inode,MAY_READ |MAY_WRITE ); +int ret =inode_permission (inode,MAY_READ );if (ret)return ERR_PTR (ret);
kernel/bpf/syscall.c +4 -1
@@ -721,7 +721,10 @@ static int map_lookup_elem(union bpf_attr *attr) err =bpf_fd_reuseport_array_lookup_elem (map, key, value); }else {rcu_read_lock (); - ptr = map->ops->map_lookup_elem (map, key); +if (map->ops->map_lookup_elem_sys_only) + ptr = map->ops->map_lookup_elem_sys_only (map, key); +else + ptr = map->ops->map_lookup_elem (map, key);if (ptr)memcpy (value, ptr, value_size);rcu_read_unlock ();
kernel/sched/cpufreq_schedutil.c +1 -0
@@ -751,6 +751,7 @@ static int sugov_init(struct cpufreq_policy *policy)return 0 ; fail: +kobject_put (&tunables->attr_set.kobj); policy->governor_data =NULL ;sugov_tunables_free (tunables);
kernel/trace/trace_events.c +0 -3
@@ -1318,9 +1318,6 @@ event_id_read(struct file *filp, char __user *ubuf, size_t cnt, loff_t *ppos)char buf[32 ];int len; -if (*ppos) -return 0 ; -if (unlikely (!id))return -ENODEV ;
lib/Makefile +11 -0
@@ -17,6 +17,17 @@ KCOV_INSTRUMENT_list_debug.o := n KCOV_INSTRUMENT_debugobjects.o := n KCOV_INSTRUMENT_dynamic_debug.o := n +# Early boot use of cmdline, don't instrument it +ifdef CONFIG_AMD_MEM_ENCRYPT +KASAN_SANITIZE_string.o := n + +ifdef CONFIG_FUNCTION_TRACER +CFLAGS_REMOVE_string.o = -pg +endif + +CFLAGS_string.o := $(call cc-option, -fno-stack-protector) +endif + lib-y := ctype.o string.o vsprintf.o cmdline.o \ rbtree.o radix-tree.o timerqueue.o\ idr.o int_sqrt.o extable.o \
net/core/dev.c +1 -1
@@ -8716,7 +8716,7 @@ static void netdev_wait_allrefs(struct net_device *dev) refcnt =netdev_refcnt_read (dev); -if (time_after (jiffies, warning_time +10 *HZ )) { +if (refcnt &&time_after (jiffies, warning_time +10 *HZ )) {pr_emerg ("unregister_netdevice: waiting for %s to become free. Usage count = %d\n" , dev->name, refcnt); warning_time = jiffies;
net/core/rtnetlink.c +10 -6
@@ -1496,14 +1496,15 @@ static int put_master_ifindex(struct sk_buff *skb, struct net_device *dev)return ret; } -static int nla_put_iflink (struct sk_buff *skb,const struct net_device *dev) +static int nla_put_iflink (struct sk_buff *skb,const struct net_device *dev, +bool force) {int ifindex =dev_get_iflink (dev); -if (dev->ifindex == ifindex) -return 0 ; +if (force || dev->ifindex != ifindex) +return nla_put_u32 (skb,IFLA_LINK , ifindex); -return nla_put_u32 (skb,IFLA_LINK , ifindex); +return 0 ; } static noinline_for_stack int nla_put_ifalias(struct sk_buff *skb,
@@ -1520,6 +1521,8 @@ static int rtnl_fill_link_netnsid(struct sk_buff *skb,const struct net_device *dev, struct net *src_net) { + bool put_iflink = false; +if (dev->rtnl_link_ops && dev->rtnl_link_ops->get_link_net) {struct net *link_net = dev->rtnl_link_ops->get_link_net (dev);
@@ -1528,10 +1531,12 @@ static int rtnl_fill_link_netnsid(struct sk_buff *skb,if (nla_put_s32 (skb,IFLA_LINK_NETNSID , id))return -EMSGSIZE ; + + put_iflink = true; } } -return 0 ; +return nla_put_iflink (skb, dev, put_iflink); } static int rtnl_fill_link_af(struct sk_buff *skb,
@@ -1617,7 +1622,6 @@ static int rtnl_fill_ifinfo(struct sk_buff *skb,#ifdef CONFIG_RPS nla_put_u32 (skb,IFLA_NUM_RX_QUEUES , dev->num_rx_queues) || #endif -nla_put_iflink (skb, dev) ||put_master_ifindex (skb, dev) || nla_put_u8(skb, IFLA_CARRIER, netif_carrier_ok(dev)) || (dev->qdisc &&
net/ipv4/esp4.c +15 -5
@@ -223,7 +223,7 @@ static void esp_output_fill_trailer(u8 *tail, int tfclen, int plen, __u8 proto) tail[plen -1 ] = proto; } -static void esp_output_udp_encap (struct xfrm_state *x,struct sk_buff *skb,struct esp_info *esp) +static int esp_output_udp_encap (struct xfrm_state *x,struct sk_buff *skb,struct esp_info *esp) {int encap_type;struct udphdr *uh;
@@ -231,6 +231,7 @@ static void esp_output_udp_encap(struct xfrm_state *x, struct sk_buff *skb, stru__be16 sport, dport;struct xfrm_encap_tmpl *encap = x->encap;struct ip_esp_hdr *esph = esp->esph; +unsigned int len;spin_lock_bh (&x->lock); sport = encap->encap_sport;
@@ -238,11 +239,14 @@ static void esp_output_udp_encap(struct xfrm_state *x, struct sk_buff *skb, stru encap_type = encap->encap_type;spin_unlock_bh (&x->lock); + len = skb->len + esp->tailen -skb_transport_offset (skb); +if (len +sizeof (struct iphdr ) >=IP_MAX_MTU ) +return -EMSGSIZE ; + uh = (struct udphdr *)esph; uh->source = sport; uh->dest = dport; - uh->len =htons (skb->len + esp->tailen - -skb_transport_offset (skb)); + uh->len =htons (len); uh->check =0 ;switch (encap_type) {
@@ -259,6 +263,8 @@ static void esp_output_udp_encap(struct xfrm_state *x, struct sk_buff *skb, stru *skb_mac_header (skb) =IPPROTO_UDP ; esp->esph = esph; + +return 0 ; }int esp_output_head (struct xfrm_state *x,struct sk_buff *skb,struct esp_info *esp)
@@ -272,8 +278,12 @@ int esp_output_head(struct xfrm_state *x, struct sk_buff *skb, struct esp_info *int tailen = esp->tailen;/* this is non-NULL only with UDP Encapsulation */ -if (x->encap) -esp_output_udp_encap (x, skb, esp); +if (x->encap) { +int err =esp_output_udp_encap (x, skb, esp); + +if (err <0 ) +return err; + }if (!skb_cloned (skb)) {if (tailen <=skb_tailroom (skb)) {
net/ipv4/ip_vti.c +3 -2
@@ -659,9 +659,9 @@ static int __init vti_init(void)return err; rtnl_link_failed: -xfrm4_protocol_deregister (&vti_ipcomp4_protocol,IPPROTO_COMP ); -xfrm_tunnel_failed:xfrm4_tunnel_deregister (&ipip_handler,AF_INET ); +xfrm_tunnel_failed: +xfrm4_protocol_deregister (&vti_ipcomp4_protocol,IPPROTO_COMP ); xfrm_proto_comp_failed:xfrm4_protocol_deregister (&vti_ah4_protocol,IPPROTO_AH ); xfrm_proto_ah_failed:
@@ -676,6 +676,7 @@ static int __init vti_init(void) static void __exit vti_fini(void) {rtnl_link_unregister (&vti_link_ops); +xfrm4_tunnel_deregister (&ipip_handler,AF_INET );xfrm4_protocol_deregister (&vti_ipcomp4_protocol,IPPROTO_COMP );xfrm4_protocol_deregister (&vti_ah4_protocol,IPPROTO_AH );xfrm4_protocol_deregister (&vti_esp4_protocol,IPPROTO_ESP );
net/ipv4/xfrm4_policy.c +13 -11
@@ -111,7 +111,8 @@ static void _decode_session4(struct sk_buff *skb, struct flowi *fl, int reverse) { const struct iphdr *iph = ip_hdr(skb); -u8 *xprth =skb_network_header (skb) + iph->ihl *4 ; +int ihl = iph->ihl; +u8 *xprth =skb_network_header (skb) + ihl *4 ;struct flowi4 *fl4 = &fl->u.ip4;int oif =0 ;
@@ -122,6 +123,11 @@ _decode_session4(struct sk_buff *skb, struct flowi *fl, int reverse) fl4->flowi4_mark = skb->mark; fl4->flowi4_oif = reverse ? skb->skb_iif : oif; + fl4->flowi4_proto = iph->protocol; + fl4->daddr = reverse ? iph->saddr : iph->daddr; + fl4->saddr = reverse ? iph->daddr : iph->saddr; + fl4->flowi4_tos = iph->tos; +if (!ip_is_fragment (iph)) {switch (iph->protocol) {case IPPROTO_UDP :
@@ -133,7 +139,7 @@ _decode_session4(struct sk_buff *skb, struct flowi *fl, int reverse) pskb_may_pull(skb, xprth + 4 - skb->data)) {__be16 *ports; - xprth =skb_network_header (skb) + iph->ihl *4 ; + xprth =skb_network_header (skb) + ihl *4 ; ports = (__be16 *)xprth; fl4->fl4_sport = ports[!!reverse];
@@ -146,7 +152,7 @@ _decode_session4(struct sk_buff *skb, struct flowi *fl, int reverse) pskb_may_pull(skb, xprth + 2 - skb->data)) {u8 *icmp; - xprth =skb_network_header (skb) + iph->ihl *4 ; + xprth =skb_network_header (skb) + ihl *4 ; icmp = xprth; fl4->fl4_icmp_type = icmp[0 ];
@@ -159,7 +165,7 @@ _decode_session4(struct sk_buff *skb, struct flowi *fl, int reverse) pskb_may_pull(skb, xprth + 4 - skb->data)) {__be32 *ehdr; - xprth =skb_network_header (skb) + iph->ihl *4 ; + xprth =skb_network_header (skb) + ihl *4 ;
Lines of this file are not shown. View the raw message.
net/ipv6/route.c +34 -24
58 lines not on this page · raw message
net/vmw_vsock/virtio_transport_common.c +7 -0
Lines of this file are not shown. View the raw message.
tools/perf/util/intel-pt-decoder/intel-pt-decoder.c +24 -7
Lines of this file are not shown. View the raw message.
tools/testing/selftests/bpf/test_verifier.c +1 -8
Lines of this file are not shown. View the 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.