Linux 4.19.141
Greg Kroah-Hartman
maintainerI'm announcing the release of the 4.19.141 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/devicetree/bindings/iio/multiplexer/io-channel-mux.txt | 2 Makefile | 2 arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts | 6 arch/mips/kernel/topology.c | 2 arch/openrisc/kernel/stacktrace.c | 18 ++ arch/powerpc/include/asm/percpu.h | 4 arch/powerpc/mm/fault.c | 7 arch/powerpc/platforms/pseries/hotplug-memory.c | 2 arch/sh/boards/mach-landisk/setup.c | 3 arch/x86/kernel/apic/vector.c | 4 arch/xtensa/kernel/perf_event.c | 2 drivers/base/dd.c | 4 drivers/clk/sirf/clk-atlas6.c | 2 drivers/gpu/drm/amd/powerplay/smumgr/ci_smumgr.c | 5 drivers/gpu/drm/drm_panel_orientation_quirks.c | 6 drivers/gpu/drm/imx/imx-ldb.c | 7 drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 8 - drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c | 5 drivers/gpu/ipu-v3/ipu-image-convert.c | 58 ++----- drivers/i2c/busses/i2c-rcar.c | 15 +- drivers/iio/dac/ad5592r-base.c | 4 drivers/infiniband/ulp/ipoib/ipoib.h | 2 drivers/infiniband/ulp/ipoib/ipoib_ib.c | 67 +++------ drivers/infiniband/ulp/ipoib/ipoib_main.c | 2 drivers/input/mouse/sentelic.c | 2 drivers/iommu/omap-iommu-debug.c | 3 drivers/irqchip/irq-gic-v3-its.c | 5 drivers/md/bcache/bcache.h | 2 drivers/md/bcache/bset.c | 2 drivers/md/bcache/btree.c | 2 drivers/md/bcache/journal.c | 4 drivers/md/bcache/super.c | 2 drivers/md/bcache/writeback.c | 14 + drivers/md/bcache/writeback.h | 19 ++ drivers/md/dm-rq.c | 3 drivers/md/raid5.c | 3 drivers/media/platform/rockchip/rga/rga-hw.c | 29 ++- drivers/media/platform/rockchip/rga/rga-hw.h | 5 drivers/media/platform/vsp1/vsp1_dl.c | 2 drivers/mfd/arizona-core.c | 18 ++ drivers/mfd/dln2.c | 4 drivers/mmc/host/renesas_sdhi_internal_dmac.c | 18 +- drivers/net/ethernet/qualcomm/emac/emac.c | 17 +- drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c | 1 drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c | 3 drivers/pci/bus.c | 6 drivers/pci/controller/dwc/pcie-qcom.c | 41 +++++ drivers/pci/hotplug/acpiphp_glue.c | 14 + drivers/pci/probe.c | 52 +++++++ drivers/pci/quirks.c | 5 drivers/pci/setup-bus.c | 45 ------ drivers/pwm/pwm-bcm-iproc.c | 9 - drivers/remoteproc/qcom_q6v5.c | 2 drivers/scsi/lpfc/lpfc_nvmet.c | 2 drivers/usb/serial/ftdi_sio.c | 37 ++--- drivers/watchdog/f71808e_wdt.c | 13 + drivers/watchdog/watchdog_dev.c | 18 +- fs/btrfs/disk-io.c | 13 + fs/btrfs/free-space-cache.c | 4 fs/btrfs/inode.c | 4 fs/btrfs/ref-verify.c | 2 fs/btrfs/super.c | 35 ++-- fs/btrfs/tree-log.c | 8 - fs/btrfs/volumes.c | 21 ++ fs/cifs/smb2misc.c | 73 +++++++--- fs/cifs/smb2pdu.c | 2 fs/ext2/ialloc.c | 3 fs/minix/inode.c | 12 - fs/minix/itree_v1.c | 12 - fs/minix/itree_v2.c | 13 - fs/minix/minix.h | 1 fs/nfs/nfs4proc.c | 2 fs/nfs/nfs4xdr.c | 6 fs/ocfs2/ocfs2.h | 4 fs/ocfs2/suballoc.c | 4 fs/ocfs2/super.c | 4 fs/ufs/super.c | 2 include/linux/intel-iommu.h | 4 include/linux/irq.h | 13 + include/linux/pci.h | 3 include/net/sock.h | 4 kernel/irq/manage.c | 6 kernel/kprobes.c | 7 kernel/module.c | 22 ++- kernel/trace/ftrace.c | 15 +- kernel/trace/trace_events.c | 4 kernel/trace/trace_hwlat.c | 5 lib/test_kmod.c | 2 mm/khugepaged.c | 22 +-- mm/page_counter.c | 6 net/compat.c | 1 net/core/sock.c | 21 ++ net/mac80211/sta_info.c | 2 sound/pci/echoaudio/echoaudio.c | 2 tools/build/Makefile.feature | 2 tools/build/feature/Makefile | 2 tools/perf/bench/mem-functions.c | 21 +- tools/perf/util/intel-pt-decoder/intel-pt-decoder.c | 21 -- tools/testing/selftests/powerpc/ptrace/ptrace-pkey.c | 55 +++---- 99 files changed, 698 insertions(+), 406 deletions(-)
Adrian Hunter (1):
perf intel-pt: Fix FUP packet state
Ahmad Fatoum (3):
watchdog: f71808e_wdt: indicate WDIOF_CARDRESET support in watchdog_info.options
watchdog: f71808e_wdt: remove use of wrong watchdog_info option
watchdog: f71808e_wdt: clear watchdog timeout occurred flag
Alexandru Ardelean (1):
iio: dac: ad5592r: fix unbalanced mutex unlocks in ad5592r_read_raw()
Anand Jain (1):
btrfs: don't traverse into the seed devices in show_devname
Andy Shevchenko (1):
mfd: dln2: Run event handler loop under spinlock
Aneesh Kumar K.V (3):
selftests/powerpc: ptrace-pkey: Rename variables to make it easier to follow code selftests/powerpc: ptrace-pkey: Update the test to mark an invalid pkey correctly selftests/powerpc: ptrace-pkey: Don't update expected UAMOR value
Ansuel Smith (2):
PCI: qcom: Define some PARF params needed for ipq8064 SoC
PCI: qcom: Add support for tx term offset for rev 2.1.0
Anton Blanchard (1):
pseries: Fix 64 bit logical memory block panic
Bjorn Helgaas (1):
PCI: Probe bridge window attributes once at enumeration-time
ChangSyun Peng (1):
md/raid5: Fix Force reconstruct-write io stuck in degraded raid5
Charles Keepax (1):
mfd: arizona: Ensure 32k clock is put on driver unbind and error
Chengming Zhou (1):
ftrace: Setup correct FTRACE_FL_REGS flags for module
Christian Eggers (1):
dt-bindings: iio: io-channel-mux: Fix compatible string in example code
Colin Ian King (3):
iommu/omap: Check for failure of a call to omap_iommu_dump_ctx
Input: sentelic - fix error return when fsp_reg_write fails fs/ufs: avoid potential u32 multiplication overflow
Coly Li (2):
bcache: allocate meta data pages as compound pages
bcache: fix overflow in offset_to_stripe()
Dan Carpenter (2):
drm/vmwgfx: Use correct vmw_legacy_display_unit pointer drm/vmwgfx: Fix two list_for_each loop exit tests
Daniel Díaz (1):
tools build feature: Quote CC and CXX for their arguments
David Sterba (1):
btrfs: fix messages after changing compression level by remount
Dinghao Liu (1):
ALSA: echoaudio: Fix potential Oops in snd_echo_resume()
Eric Biggers (3):
fs/minix: set s_maxbytes correctly
fs/minix: fix block limit check for V1 filesystems fs/minix: remove expected error message in block_to_path()
Eugeniu Rosca (1):
media: vsp1: dl: Fix NULL pointer dereference on unbind
Ewan D. Milne (1):
scsi: lpfc: nvmet: Avoid hang / use-after-free again when destroying targetport
Filipe Manana (1):
btrfs: fix memory leaks after failure to lookup checksums during inode logging
Geert Uytterhoeven (1):
sh: landisk: Add missing initialization of sh_io_port_base
Greg Kroah-Hartman (1):
Linux 4.19.141
Huacai Chen (1):
MIPS: CPU#0 is not hotpluggable
Hugh Dickins (1):
khugepaged: retract_page_tables() remember to test exit
Jason Gunthorpe (1):
RDMA/ipoib: Fix ABBA deadlock with ipoib_reap_ah()
Jeffrey Mitchell (1):
nfs: Fix getxattr kernel panic and memory overflow
Johan Hovold (2):
USB: serial: ftdi_sio: make process-packet buffer unsigned
USB: serial: ftdi_sio: clean up receive processing
Johannes Berg (1):
mac80211: fix misplaced while instead of if
Jonathan McDowell (2):
net: ethernet: stmmac: Disable hardware multicast filter
net: stmmac: dwmac1000: provide multicast filter fallback
Josef Bacik (2):
btrfs: open device without device_list_mutex
btrfs: only search for left_info if there is no right_info in try_merge_free_space
Junxiao Bi (1):
ocfs2: change slot number type s16 to u16
Kai-Heng Feng (1):
PCI: Mark AMD Navi10 GPU rev 0x00 ATS as broken
Kamal Heib (1):
RDMA/ipoib: Return void from ipoib_ib_dev_stop()
Kees Cook (2):
net/compat: Add missing sock updates for SCM_RIGHTS
module: Correctly truncate sysfs sections output
Kevin Hao (1):
tracing/hwlat: Honor the tracing_cpumask
Krzysztof Sobota (1):
watchdog: initialize device before misc_register
Liu Yi L (1):
iommu/vt-d: Enforce PASID devTLB field mask
Liu Ying (1):
drm/imx: imx-ldb: Disable both channels for split mode in enc->disable()
Lukas Wunner (1):
driver core: Avoid binding drivers to dead devices
Marius Iacob (1):
drm: Added orientation quirk for ASUS tablet model T103HAF
Max Filippov (1):
xtensa: fix xtensa_pmu_setup prototype
Michael Ellerman (2):
powerpc: Allow 4224 bytes of stack expansion for the signal frame
powerpc: Fix circular dependency between percpu.h and mmu.h
Michal Koutný (1):
mm/page_counter.c: fix protection usage propagation
Mikulas Patocka (1):
ext2: fix missing percpu_counter_inc
Ming Lei (1):
dm rq: don't call blk_mq_queue_stopped() in dm_stop_queue()
Muchun Song (1):
kprobes: Fix NULL pointer dereference at kprobe_ftrace_handler
Paul Aurich (1):
cifs: Fix leak when handling lease break for cached root fid
Paul Kocialkowski (2):
media: rockchip: rga: Introduce color fmt macros and refactor CSC mode logic
media: rockchip: rga: Only set output CSC mode for RGB input
Pavel Machek (1):
btrfs: fix return value mixup in btrfs_get_extent
Qu Wenruo (2):
btrfs: free anon block device right after subvolume deletion
btrfs: don't allocate anonymous block device for user invisible roots
Rafael J. Wysocki (1):
PCI: hotplug: ACPI: Fix context refcounting in acpiphp_grab_context()
Rajat Jain (1):
PCI: Add device even if driver attach failed
Rayagonda Kokatanur (1):
pwm: bcm-iproc: handle clk_get_rate() return
Sandeep Raghuraman (1):
drm/amdgpu: Fix bug where DPM is not enabled after hibernate and resume
Sibi Sankar (1):
remoteproc: qcom: q6v5: Update running state before requesting stop
Stafford Horne (1):
openrisc: Fix oops caused when dumping stack
Steve French (1):
smb3: warn on confusing error scenario with sec=krb5
Steve Longerbeam (1):
gpu: ipu-v3: image-convert: Combine rotate/no-rotate irq handlers
Steven Rostedt (VMware) (1):
tracing: Use trace_sched_process_free() instead of exit() for pid tracing
Thomas Gleixner (1):
genirq/affinity: Make affinity setting if activated opt-in
Thomas Hebb (1):
tools build feature: Use CC and CXX from parent
Tiezhu Yang (1):
test_kmod: avoid potential double free in trigger_config_run_type()
Tom Rix (1):
btrfs: ref-verify: fix memory leak in add_block_entry
Tomasz Maciej Nowak (1):
arm64: dts: marvell: espressobin: add ethernet alias
Vincent Whitchurch (1):
perf bench mem: Always memset source before memcpy
Wang Hai (1):
net: qcom/emac: add missed clk_disable_unprepare in error path of emac_clks_phase1_init
Wolfram Sang (2):
i2c: rcar: slave: only send STOP event when we have been addressed
i2c: rcar: avoid race when unregistering slave
Xu Wang (1):
clk: clk-atlas6: fix return value check in atlas6_clk_init()
Yoshihiro Shimoda (1):
mmc: renesas_sdhi_internal_dmac: clean up the code for dma complete
Greg Kroah-Hartman
maintainerDocumentation/devicetree/bindings/iio/multiplexer/io-channel-mux.txt +1 -1
@@ -21,7 +21,7 @@ controller state. The mux controller state is described in Example: mux: mux-controller { - compatible = "mux-gpio"; + compatible = "gpio-mux"; #mux-control-cells = <0>; mux-gpios = <&pioA 0 GPIO_ACTIVE_HIGH>,
Makefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 4 PATCHLEVEL = 19 -SUBLEVEL = 140 +SUBLEVEL = 141 EXTRAVERSION = NAME = "People's Front"
arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts +6 -0
@@ -19,6 +19,12 @@ model = "Globalscale Marvell ESPRESSOBin Board"; compatible = "globalscale,espressobin", "marvell,armada3720", "marvell,armada3710"; + aliases { + ethernet0 = ð0; + serial0 = &uart0; + serial1 = &uart1; + }; + chosen { stdout-path = "serial0:115200n8"; };
arch/mips/kernel/topology.c +1 -1
@@ -20,7 +20,7 @@ static int __init topology_init(void)for_each_present_cpu (i) {struct cpu *c = &per_cpu (cpu_devices, i); - c->hotpluggable =1 ; + c->hotpluggable = !!i; ret =register_cpu (c, i);if (ret) printk(KERN_WARNING "topology_init: register_cpu %d "
arch/openrisc/kernel/stacktrace.c +16 -2
@@ -13,6 +13,7 @@#include <linux/export.h> #include <linux/sched.h> #include <linux/sched/debug.h> +#include <linux/sched/task_stack.h> #include <linux/stacktrace.h> #include <asm/processor.h>
@@ -68,12 +69,25 @@ void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace) {unsigned long *sp =NULL ; +if (!try_get_task_stack (tsk)) +return ; +if (tsk == current) sp = (unsigned long *) &sp; -else - sp = (unsigned long *)KSTK_ESP (tsk); +else { +unsigned long ksp; + +/* Locate stack from kernel context */ + ksp =task_thread_info (tsk)->ksp; + ksp +=STACK_FRAME_OVERHEAD ;/* redzone */ + ksp +=sizeof (struct pt_regs ); + + sp = (unsigned long *) ksp; + }unwind_stack (trace, sp, save_stack_address_nosched); + +put_task_stack (tsk); }EXPORT_SYMBOL_GPL (save_stack_trace_tsk);
arch/powerpc/include/asm/percpu.h +2 -2
@@ -10,8 +10,6 @@#ifdef CONFIG_SMP -#include <asm/paca.h> -#define __my_cpu_offset local_paca->data_offset#endif /* CONFIG_SMP */
@@ -19,4 +17,6 @@#include <asm-generic/percpu.h> +#include <asm/paca.h> +#endif /* _ASM_POWERPC_PERCPU_H_ */
arch/powerpc/mm/fault.c +5 -2
@@ -233,6 +233,9 @@ static bool bad_kernel_fault(bool is_exec, unsigned long error_code,return is_exec || (address >=TASK_SIZE ); } +// This comes from 64-bit struct rt_sigframe + __SIGNAL_FRAMESIZE +#define SIGFRAME_MAX_SIZE (4096 + 128) +static bool bad_stack_expansion (struct pt_regs *regs,unsigned long address,struct vm_area_struct *vma,unsigned int flags,bool *must_retry)
@@ -240,7 +243,7 @@ static bool bad_stack_expansion(struct pt_regs *regs, unsigned long address,/* * N.B. The POWER/Open ABI allows programs to access up to * 288 bytes below the stack pointer. -* The kernel signal delivery code writes up to about 1.5kB +* The kernel signal delivery code writes a bit over 4KB * below the stack pointer (r1) before decrementing it. * The exec code can write slightly over 640kB to the stack * before setting the user r1. Thus we allow the stack to
@@ -265,7 +268,7 @@ static bool bad_stack_expansion(struct pt_regs *regs, unsigned long address,* between the last mapped region and the stack will * expand the stack rather than segfaulting. */ -if (address +2048 >= uregs->gpr[1 ]) +if (address +SIGFRAME_MAX_SIZE >= uregs->gpr[1 ])return false; if ((flags & FAULT_FLAG_WRITE) && (flags & FAULT_FLAG_USER) &&
arch/powerpc/platforms/pseries/hotplug-memory.c +1 -1
@@ -31,7 +31,7 @@ static bool rtas_hp_event;unsigned long pseries_memory_block_size (void ) {struct device_node *np; -unsigned int memblock_size =MIN_MEMORY_BLOCK_SIZE ; +u64 memblock_size =MIN_MEMORY_BLOCK_SIZE ;struct resource r; np =of_find_node_by_path ("/ibm,dynamic-reconfiguration-memory" );
arch/sh/boards/mach-landisk/setup.c +3 -0
@@ -85,6 +85,9 @@ device_initcall(landisk_devices_setup);static void __init landisk_setup (char **cmdline_p) { +/* I/O port identity mapping */ +__set_io_port_base (0 ); +/* LED ON */ __raw_writeb (__raw_readb (PA_LED ) |0x03 ,PA_LED );
arch/x86/kernel/apic/vector.c +4 -0
@@ -556,6 +556,10 @@ static int x86_vector_alloc_irqs(struct irq_domain *domain, unsigned int virq, irqd->chip_data = apicd; irqd->hwirq = virq + i;irqd_set_single_target (irqd); + +/* Don't invoke affinity setter on deactivated interrupts */ +irqd_set_affinity_on_activate (irqd); +/* * Legacy vectors are already assigned when the IOAPIC * takes them over. They stay on the same vector. This is
arch/xtensa/kernel/perf_event.c +1 -1
@@ -404,7 +404,7 @@ static struct pmu xtensa_pmu = { .read = xtensa_pmu_read, }; -static int xtensa_pmu_setup (int cpu) +static int xtensa_pmu_setup (unsigned int cpu) {unsigned i;
drivers/base/dd.c +3 -1
@@ -792,7 +792,9 @@ static int __device_attach(struct device *dev, bool allow_async)int ret =0 ;device_lock (dev); -if (dev->driver) { +if (dev->p->dead) { + goto out_unlock; + }else if (dev->driver) {if (device_is_bound (dev)) { ret =1 ; goto out_unlock;
drivers/clk/sirf/clk-atlas6.c +1 -1
@@ -136,7 +136,7 @@ static void __init atlas6_clk_init(struct device_node *np)for (i = pll1; i < maxclk; i++) { atlas6_clks[i] =clk_register (NULL , atlas6_clk_hw_array[i]); -BUG_ON (!atlas6_clks[i]); +BUG_ON (IS_ERR (atlas6_clks[i])); }clk_register_clkdev (atlas6_clks[cpu],NULL ,"cpu" );clk_register_clkdev (atlas6_clks[io],NULL ,"io" );
drivers/gpu/drm/amd/powerplay/smumgr/ci_smumgr.c +4 -1
@@ -2723,7 +2723,10 @@ static int ci_initialize_mc_reg_table(struct pp_hwmgr *hwmgr)static bool ci_is_dpm_running (struct pp_hwmgr *hwmgr) { -return ci_is_smc_ram_running (hwmgr); +return (1 ==PHM_READ_INDIRECT_FIELD (hwmgr->device, +CGS_IND_REG__SMC ,FEATURE_STATUS , +VOLTAGE_CONTROLLER_ON )) + ? true : false; }static int ci_smu_init (struct pp_hwmgr *hwmgr)
drivers/gpu/drm/drm_panel_orientation_quirks.c +6 -0
@@ -107,6 +107,12 @@ static const struct dmi_system_id orientation_data[] = { DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "T101HA"), }, .driver_data = (void *)&lcd800x1280_rightside_up, + }, { /* Asus T103HAF */ + .matches = { +DMI_EXACT_MATCH (DMI_SYS_VENDOR ,"ASUSTeK COMPUTER INC." ), + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "T103HAF"), + }, + .driver_data = (void *)&lcd800x1280_rightside_up, }, { /* GPD MicroPC (generic strings, also match on bios date) */ .matches = { DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Default string"),
drivers/gpu/drm/imx/imx-ldb.c +4 -3
@@ -311,18 +311,19 @@ static void imx_ldb_encoder_disable(struct drm_encoder *encoder) {struct imx_ldb_channel *imx_ldb_ch =enc_to_imx_ldb_ch (encoder);struct imx_ldb *ldb = imx_ldb_ch->ldb; +int dual = ldb->ldb_ctrl &LDB_SPLIT_MODE_EN ;int mux, ret;drm_panel_disable (imx_ldb_ch->panel); -if (imx_ldb_ch == &ldb->channel[0 ]) +if (imx_ldb_ch == &ldb->channel[0 ] || dual) ldb->ldb_ctrl &= ~LDB_CH0_MODE_EN_MASK ; -else if (imx_ldb_ch == &ldb->channel[1 ]) +if (imx_ldb_ch == &ldb->channel[1 ] || dual) ldb->ldb_ctrl &= ~LDB_CH1_MODE_EN_MASK ;regmap_write (ldb->regmap,IOMUXC_GPR2 , ldb->ldb_ctrl); -if (ldb->ldb_ctrl &LDB_SPLIT_MODE_EN ) { +if (dual) {clk_disable_unprepare (ldb->clk[0 ]);clk_disable_unprepare (ldb->clk[1 ]); }
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +4 -4
@@ -2861,7 +2861,7 @@ int vmw_kms_fbdev_init_data(struct vmw_private *dev_priv, ++i; } -if (i != unit) { +if (&con->head == &dev_priv->dev->mode_config.connector_list) {DRM_ERROR ("Could not find initial display unit.\n" ); ret = -EINVAL ; goto out_unlock;
@@ -2885,13 +2885,13 @@ int vmw_kms_fbdev_init_data(struct vmw_private *dev_priv,break ; } -if (mode->type &DRM_MODE_TYPE_PREFERRED ) - *p_mode = mode; -else { +if (&mode->head == &con->modes) {WARN_ONCE (true,"Could not find initial preferred mode.\n" ); *p_mode =list_first_entry (&con->modes, struct drm_display_mode, head); + }else { + *p_mode = mode; } out_unlock:
drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c +2 -3
@@ -79,7 +79,7 @@ static int vmw_ldu_commit_list(struct vmw_private *dev_priv)struct vmw_legacy_display_unit *entry;struct drm_framebuffer *fb =NULL ;struct drm_crtc *crtc =NULL ; -int i =0 ; +int i;/* If there is no display topology the host just assumes * that the guest will set the same layout as the host.
@@ -90,12 +90,11 @@ static int vmw_ldu_commit_list(struct vmw_private *dev_priv) crtc = &entry->base.crtc; w =max (w, crtc->x + crtc->mode.hdisplay); h =max (h, crtc->y + crtc->mode.vdisplay); - i++; }if (crtc ==NULL )return 0 ; - fb = entry->base.crtc.primary->state->fb; + fb = crtc->primary->state->fb; return vmw_kms_write_svga(dev_priv, w, h, fb->pitches[0], fb->format->cpp[0] * 8,
drivers/gpu/ipu-v3/ipu-image-convert.c +20 -38
88 lines not on this page · raw message
drivers/i2c/busses/i2c-rcar.c +9 -6
@@ -587,13 +587,14 @@ static bool rcar_i2c_slave_irq(struct rcar_i2c_priv *priv)rcar_i2c_write (priv,ICSIER ,SDR |SSR |SAR ); } -rcar_i2c_write (priv,ICSSR , ~SAR &0xff ); +/* Clear SSR, too, because of old STOPs to other clients than us */ +rcar_i2c_write (priv,ICSSR , ~(SAR |SSR ) &0xff ); }/* master sent stop */ if (ssr_filtered &SSR ) {i2c_slave_event (priv->slave,I2C_SLAVE_STOP , &value); -rcar_i2c_write (priv,ICSIER ,SAR |SSR ); +rcar_i2c_write (priv,ICSIER ,SAR );rcar_i2c_write (priv,ICSSR , ~SSR &0xff ); }
@@ -848,7 +849,7 @@ static int rcar_reg_slave(struct i2c_client *slave) priv->slave = slave;rcar_i2c_write (priv,ICSAR , slave->addr);rcar_i2c_write (priv,ICSSR ,0 ); -rcar_i2c_write (priv,ICSIER ,SAR |SSR ); +rcar_i2c_write (priv,ICSIER ,SAR );rcar_i2c_write (priv,ICSCR ,SIE |SDBS );return 0 ;
@@ -860,12 +861,14 @@ static int rcar_unreg_slave(struct i2c_client *slave)WARN_ON (!priv->slave); -/* disable irqs and ensure none is running before clearing ptr */ +/* ensure no irq is running before clearing ptr */ +disable_irq (priv->irq);rcar_i2c_write (priv,ICSIER ,0 ); -rcar_i2c_write (priv,ICSCR ,0 ); +rcar_i2c_write (priv,ICSSR ,0 ); +enable_irq (priv->irq); +rcar_i2c_write (priv,ICSCR ,SDBS );rcar_i2c_write (priv,ICSAR ,0 );/* Gen2: must be 0 if not using slave */ -synchronize_irq (priv->irq); priv->slave =NULL ;pm_runtime_put (rcar_i2c_priv_to_dev (priv));
drivers/iio/dac/ad5592r-base.c +2 -2
@@ -417,7 +417,7 @@ static int ad5592r_read_raw(struct iio_dev *iio_dev,s64 tmp = *val * (3767897513LL /25LL ); *val =div_s64_rem (tmp,1000000000LL , val2); - ret =IIO_VAL_INT_PLUS_MICRO ; +return IIO_VAL_INT_PLUS_MICRO ; }else {int mult;
@@ -448,7 +448,7 @@ static int ad5592r_read_raw(struct iio_dev *iio_dev, ret =IIO_VAL_INT ;break ;default : - ret = -EINVAL ; +return -EINVAL ; } unlock:
drivers/infiniband/ulp/ipoib/ipoib.h +1 -1
@@ -513,7 +513,7 @@ void ipoib_ib_dev_cleanup(struct net_device *dev);int ipoib_ib_dev_open_default (struct net_device *dev);int ipoib_ib_dev_open (struct net_device *dev); -int ipoib_ib_dev_stop (struct net_device *dev); +void ipoib_ib_dev_stop (struct net_device *dev);void ipoib_ib_dev_up (struct net_device *dev);void ipoib_ib_dev_down (struct net_device *dev);int ipoib_ib_dev_stop_default (struct net_device *dev);
drivers/infiniband/ulp/ipoib/ipoib_ib.c +29 -38
135 lines not on this page · raw message
drivers/infiniband/ulp/ipoib/ipoib_main.c +2 -0
@@ -1979,6 +1979,8 @@ static void ipoib_ndo_uninit(struct net_device *dev)/* no more works over the priv->wq */ if (priv->wq) { +/* See ipoib_mcast_carrier_on_task() */ +WARN_ON (test_bit (IPOIB_FLAG_OPER_UP , &priv->flags));flush_workqueue (priv->wq);destroy_workqueue (priv->wq); priv->wq =NULL ;
drivers/input/mouse/sentelic.c +1 -1
@@ -454,7 +454,7 @@ static ssize_t fsp_attr_set_setreg(struct psmouse *psmouse, void *data,fsp_reg_write_enable (psmouse, false); -return count; +return retval; }PSMOUSE_DEFINE_WO_ATTR (setreg,S_IWUSR ,NULL , fsp_attr_set_setreg);
drivers/iommu/omap-iommu-debug.c +3 -0
@@ -101,8 +101,11 @@ static ssize_t debug_read_regs(struct file *file, char __user *userbuf,mutex_lock (&iommu_debug_lock); bytes =omap_iommu_dump_ctx (obj, p, count); +if (bytes <0 ) + goto err; bytes =simple_read_from_buffer (userbuf, count, ppos, buf, bytes); +err:mutex_unlock (&iommu_debug_lock);kfree (buf);
drivers/irqchip/irq-gic-v3-its.c +4 -1
@@ -2458,6 +2458,7 @@ static int its_irq_domain_alloc(struct irq_domain *domain, unsigned int virq, {msi_alloc_info_t *info = args;struct its_device *its_dev = info->scratchpad[0 ].ptr; +struct irq_data *irqd;irq_hw_number_t hwirq;int err;int i;
@@ -2473,7 +2474,9 @@ static int its_irq_domain_alloc(struct irq_domain *domain, unsigned int virq,irq_domain_set_hwirq_and_chip (domain, virq + i, hwirq + i, &its_irq_chip, its_dev); -irqd_set_single_target (irq_desc_get_irq_data (irq_to_desc (virq + i))); + irqd =irq_get_irq_data (virq + i); +irqd_set_single_target (irqd); +irqd_set_affinity_on_activate (irqd);pr_debug ("ID:%d pID:%d vID:%d\n" , (int )(hwirq + i - its_dev->event_map.lpi_base), (int )(hwirq + i), virq + i);
drivers/md/bcache/bcache.h +1 -1
@@ -264,7 +264,7 @@ struct bcache_device {#define BCACHE_DEV_UNLINK_DONE 2#define BCACHE_DEV_WB_RUNNING 3#define BCACHE_DEV_RATE_DW_RUNNING 4 -unsigned int nr_stripes; +int nr_stripes;unsigned int stripe_size;atomic_t *stripe_sectors_dirty;unsigned long *full_dirty_stripes;
drivers/md/bcache/bset.c +1 -1
@@ -321,7 +321,7 @@ int bch_btree_keys_alloc(struct btree_keys *b, b->page_order = page_order; - t->data = (void *)__get_free_pages (gfp, b->page_order); + t->data = (void *)__get_free_pages (__GFP_COMP|gfp, b->page_order);if (!t->data) goto err;
drivers/md/bcache/btree.c +1 -1
@@ -830,7 +830,7 @@ int bch_btree_cache_alloc(struct cache_set *c)mutex_init (&c->verify_lock); c->verify_ondisk = (void *) -__get_free_pages (GFP_KERNEL ,ilog2 (bucket_pages (c))); +__get_free_pages (GFP_KERNEL |__GFP_COMP,ilog2 (bucket_pages (c))); c->verify_data =mca_bucket_alloc (c, &ZERO_KEY ,GFP_KERNEL );
drivers/md/bcache/journal.c +2 -2
@@ -864,8 +864,8 @@ int bch_journal_alloc(struct cache_set *c) j->w[1 ].c = c;if (!(init_fifo (&j->pin,JOURNAL_PIN ,GFP_KERNEL )) || - !(j->w[0 ].data = (void *)__get_free_pages (GFP_KERNEL ,JSET_BITS )) || - !(j->w[1 ].data = (void *)__get_free_pages (GFP_KERNEL ,JSET_BITS ))) + !(j->w[0 ].data = (void *)__get_free_pages (GFP_KERNEL |__GFP_COMP,JSET_BITS )) || + !(j->w[1 ].data = (void *)__get_free_pages (GFP_KERNEL |__GFP_COMP,JSET_BITS )))return -ENOMEM ;return 0 ;
drivers/md/bcache/super.c +1 -1
@@ -1693,7 +1693,7 @@ void bch_cache_set_unregister(struct cache_set *c) }#define alloc_bucket_pages (gfp, c) \ - ((void *) __get_free_pages(__GFP_ZERO|gfp, ilog2(bucket_pages(c)))) + ((void *) __get_free_pages(__GFP_ZERO|__GFP_COMP|gfp, ilog2(bucket_pages(c))))struct cache_set *bch_cache_set_alloc (struct cache_sb *sb) {
drivers/md/bcache/writeback.c +9 -5
@@ -506,15 +506,19 @@ void bcache_dev_sectors_dirty_add(struct cache_set *c, unsigned int inode, uint64_t offset, int nr_sectors) {struct bcache_device *d = c->devices[inode]; -unsigned int stripe_offset, stripe, sectors_dirty; +unsigned int stripe_offset, sectors_dirty; +int stripe;if (!d)return ; + stripe =offset_to_stripe (d, offset); +if (stripe <0 ) +return ; +if (UUID_FLASH_ONLY (&c->uuids[inode]))atomic_long_add (nr_sectors, &c->flash_dev_dirty_sectors); - stripe =offset_to_stripe (d, offset); stripe_offset = offset & (d->stripe_size -1 );while (nr_sectors) {
@@ -554,12 +558,12 @@ static bool dirty_pred(struct keybuf *buf, struct bkey *k)static void refill_full_stripes (struct cached_dev *dc) {struct keybuf *buf = &dc->writeback_keys; -unsigned int start_stripe, stripe, next_stripe; +unsigned int start_stripe, next_stripe; +int stripe;bool wrapped = false; stripe =offset_to_stripe (&dc->disk,KEY_OFFSET (&buf->last_scanned)); - -if (stripe >= dc->disk.nr_stripes) +if (stripe <0 ) stripe =0 ; start_stripe = stripe;
drivers/md/bcache/writeback.h +17 -2
@@ -28,10 +28,22 @@ static inline uint64_t bcache_dev_sectors_dirty(struct bcache_device *d)return ret; } -static inline unsigned int offset_to_stripe (struct bcache_device *d, +static inline int offset_to_stripe (struct bcache_device *d,uint64_t offset) {do_div (offset, d->stripe_size); + +/* d->nr_stripes is in range [1, INT_MAX] */ +if (unlikely (offset >= d->nr_stripes)) { +pr_err ("Invalid stripe %llu (>= nr_stripes %d).\n" , + offset, d->nr_stripes); +return -EINVAL ; + } + +/* +* Here offset is definitly smaller than INT_MAX, +* return it as int will never overflow. +*/ return offset; }
@@ -39,7 +51,10 @@ static inline bool bcache_dev_stripe_dirty(struct cached_dev *dc,uint64_t offset, unsigned int nr_sectors) { - unsigned int stripe = offset_to_stripe(&dc->disk, offset); + int stripe = offset_to_stripe(&dc->disk, offset); + +if (stripe <0 ) +return false;while (1 ) {if (atomic_read (dc->disk.stripe_sectors_dirty + stripe))
drivers/md/dm-rq.c +0 -3
@@ -95,9 +95,6 @@ static void dm_old_stop_queue(struct request_queue *q)static void dm_mq_stop_queue (struct request_queue *q) { -if (blk_mq_queue_stopped (q)) -return ; -blk_mq_quiesce_queue (q); }
drivers/md/raid5.c +2 -1
@@ -3596,6 +3596,7 @@ static int need_this_block(struct stripe_head *sh, struct stripe_head_state *s,* is missing/faulty, then we need to read everything we can. */ if (sh->raid_conf->level !=6 && + sh->raid_conf->rmw_level !=PARITY_DISABLE_RMW && sh->sector < sh->raid_conf->mddev->recovery_cp)/* reconstruct-write isn't being forced */ return 0 ;
@@ -4832,7 +4833,7 @@ static void handle_stripe(struct stripe_head *sh)* or to load a block that is being partially written. */ if (s.to_read || s.non_overwrite - || (conf->level ==6 && s.to_write && s.failed) + || (s.to_write && s.failed) || (s.syncing && (s.uptodate + s.compute < disks)) || s.replacing || s.expanding)
drivers/media/platform/rockchip/rga/rga-hw.c +16 -13
@@ -208,22 +208,25 @@ static void rga_cmd_set_trans_info(struct rga_ctx *ctx) dst_info.data.format = ctx->out.fmt->hw_format; dst_info.data.swap = ctx->out.fmt->color_swap; -if (ctx->in.fmt->hw_format >=RGA_COLOR_FMT_YUV422SP ) { -if (ctx->out.fmt->hw_format <RGA_COLOR_FMT_YUV422SP ) { -switch (ctx->in.colorspace) { -case V4L2_COLORSPACE_REC709 : - src_info.data.csc_mode = -RGA_SRC_CSC_MODE_BT709_R0 ; -break ; -default : - src_info.data.csc_mode = -RGA_SRC_CSC_MODE_BT601_R0 ; -break ; - } +/* +* CSC mode must only be set when the colorspace families differ between +* input and output. It must remain unset (zeroed) if both are the same. +*/ + +if (RGA_COLOR_FMT_IS_YUV (ctx->in.fmt->hw_format) && +RGA_COLOR_FMT_IS_RGB (ctx->out.fmt->hw_format)) { +switch (ctx->in.colorspace) { +case V4L2_COLORSPACE_REC709 : + src_info.data.csc_mode =RGA_SRC_CSC_MODE_BT709_R0 ; +break ; +default : + src_info.data.csc_mode =RGA_SRC_CSC_MODE_BT601_R0 ; +break ; } } -if (ctx->out.fmt->hw_format >=RGA_COLOR_FMT_YUV422SP ) { +if (RGA_COLOR_FMT_IS_RGB (ctx->in.fmt->hw_format) && +RGA_COLOR_FMT_IS_YUV (ctx->out.fmt->hw_format)) {switch (ctx->out.colorspace) {case V4L2_COLORSPACE_REC709 : dst_info.data.csc_mode =RGA_SRC_CSC_MODE_BT709_R0 ;
drivers/media/platform/rockchip/rga/rga-hw.h +5 -0
@@ -103,6 +103,11 @@#define RGA_COLOR_FMT_CP_8BPP 15#define RGA_COLOR_FMT_MASK 15 +#define RGA_COLOR_FMT_IS_YUV (fmt) \ + (((fmt) >= RGA_COLOR_FMT_YUV422SP) && ((fmt) < RGA_COLOR_FMT_CP_1BPP)) +#define RGA_COLOR_FMT_IS_RGB (fmt) \ + ((fmt) < RGA_COLOR_FMT_YUV422SP) +#define RGA_COLOR_NONE_SWAP 0#define RGA_COLOR_RB_SWAP 1#define RGA_COLOR_ALPHA_SWAP 2
drivers/media/platform/vsp1/vsp1_dl.c +2 -0
@@ -431,6 +431,8 @@ vsp1_dl_cmd_pool_create(struct vsp1_device *vsp1, enum vsp1_extcmd_type type,if (!pool)return NULL ; + pool->vsp1 = vsp1; +spin_lock_init (&pool->lock);INIT_LIST_HEAD (&pool->free);
drivers/mfd/arizona-core.c +18 -0
@@ -1433,6 +1433,15 @@ int arizona_dev_init(struct arizona *arizona)arizona_irq_exit (arizona); err_pm:pm_runtime_disable (arizona->dev); + +switch (arizona->pdata.clk32k_src) { +case ARIZONA_32KZ_MCLK1 : +case ARIZONA_32KZ_MCLK2 : +arizona_clk32k_disable (arizona); +break ; +default : +break ; + } err_reset:arizona_enable_reset (arizona);regulator_disable (arizona->dcvdd);
@@ -1455,6 +1464,15 @@ int arizona_dev_exit(struct arizona *arizona)regulator_disable (arizona->dcvdd);regulator_put (arizona->dcvdd); +switch (arizona->pdata.clk32k_src) { +case ARIZONA_32KZ_MCLK1 : +case ARIZONA_32KZ_MCLK2 : +arizona_clk32k_disable (arizona); +break ; +default : +break ; + } +mfd_remove_devices (arizona->dev);arizona_free_irq (arizona,ARIZONA_IRQ_UNDERCLOCKED , arizona);arizona_free_irq (arizona,ARIZONA_IRQ_OVERCLOCKED , arizona);
drivers/mfd/dln2.c +4 -0
@@ -290,7 +290,11 @@ static void dln2_rx(struct urb *urb) len = urb->actual_length -sizeof (struct dln2_header );if (handle ==DLN2_HANDLE_EVENT ) { +unsigned long flags; + +spin_lock_irqsave (&dln2->event_cb_lock, flags);dln2_run_event_callbacks (dln2, id, echo, data, len); +spin_unlock_irqrestore (&dln2->event_cb_lock, flags); }else {/* URB will be re-submitted in _dln2_transfer (free_rx_slot) */ if (dln2_transfer_complete (dln2, urb, handle, echo))
drivers/mmc/host/renesas_sdhi_internal_dmac.c +13 -5
@@ -222,15 +222,12 @@ static void renesas_sdhi_internal_dmac_issue_tasklet_fn(unsigned long arg) DTRAN_CTRL_DM_START); } -static void renesas_sdhi_internal_dmac_complete_tasklet_fn (unsigned long arg) +static bool renesas_sdhi_internal_dmac_complete (struct tmio_mmc_host *host) { -struct tmio_mmc_host *host = (struct tmio_mmc_host *)arg;enum dma_data_direction dir; -spin_lock_irq (&host->lock); -if (!host->data) - goto out; +return false;if (host->data->flags &MMC_DATA_READ ) dir =DMA_FROM_DEVICE ;
@@ -243,6 +240,17 @@ static void renesas_sdhi_internal_dmac_complete_tasklet_fn(unsigned long arg)if (dir ==DMA_FROM_DEVICE )clear_bit (SDHI_INTERNAL_DMAC_RX_IN_USE , &global_flags); +return true; +} + +static void renesas_sdhi_internal_dmac_complete_tasklet_fn (unsigned long arg) +{ +struct tmio_mmc_host *host = (struct tmio_mmc_host *)arg; + +spin_lock_irq (&host->lock); +if (!renesas_sdhi_internal_dmac_complete (host)) + goto out; +tmio_mmc_do_data_irq (host); out:spin_unlock_irq (&host->lock);
drivers/net/ethernet/qualcomm/emac/emac.c +14 -3
@@ -493,13 +493,24 @@ static int emac_clks_phase1_init(struct platform_device *pdev, ret =clk_prepare_enable (adpt->clk[EMAC_CLK_CFG_AHB ]);if (ret) -return ret; + goto disable_clk_axi; ret =clk_set_rate (adpt->clk[EMAC_CLK_HIGH_SPEED ],19200000 );if (ret) -return ret; + goto disable_clk_cfg_ahb; + + ret =clk_prepare_enable (adpt->clk[EMAC_CLK_HIGH_SPEED ]); +if (ret) + goto disable_clk_cfg_ahb; -return clk_prepare_enable (adpt->clk[EMAC_CLK_HIGH_SPEED ]); +return 0 ; + +disable_clk_cfg_ahb: +clk_disable_unprepare (adpt->clk[EMAC_CLK_CFG_AHB ]); +disable_clk_axi: +clk_disable_unprepare (adpt->clk[EMAC_CLK_AXI ]); + +return ret; }/* Enable clocks; needs emac_clks_phase1_init to be called before */
drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c +1 -0
@@ -350,6 +350,7 @@ static int ipq806x_gmac_probe(struct platform_device *pdev) plat_dat->has_gmac = true; plat_dat->bsp_priv = gmac; plat_dat->fix_mac_speed = ipq806x_gmac_fix_mac_speed; + plat_dat->multicast_filter_bins =0 ; err =stmmac_dvr_probe (&pdev->dev, plat_dat, &stmmac_res);if (err)
drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c +3 -0
@@ -176,6 +176,9 @@ static void dwmac1000_set_filter(struct mac_device_info *hw, value =GMAC_FRAME_FILTER_PR ; }else if (dev->flags &IFF_ALLMULTI ) { value =GMAC_FRAME_FILTER_PM ;/* pass all multi */ + }else if (!netdev_mc_empty (dev) && (mcbitslog2 ==0 )) { +/* Fall back to all multicast if we've no filter */ + value =GMAC_FRAME_FILTER_PM ; }else if (!netdev_mc_empty (dev)) {struct netdev_hw_addr *ha;
drivers/pci/bus.c +1 -5
@@ -323,12 +323,8 @@ void pci_bus_add_device(struct pci_dev *dev) dev->match_driver = true; retval =device_attach (&dev->dev); -if (retval <0 && retval != -EPROBE_DEFER ) { +if (retval <0 && retval != -EPROBE_DEFER )pci_warn (dev,"device attach failed (%d)\n" , retval); -pci_proc_detach_device (dev); -pci_remove_sysfs_dev_files (dev); -return ; - }pci_dev_assign_added (dev, true); }
drivers/pci/controller/dwc/pcie-qcom.c +40 -1
68 lines not on this page · raw message
drivers/pci/hotplug/acpiphp_glue.c +11 -3
@@ -122,13 +122,21 @@ static struct acpiphp_context *acpiphp_grab_context(struct acpi_device *adev)struct acpiphp_context *context;acpi_lock_hp_context (); + context =acpiphp_get_context (adev); -if (!context || context->func.parent->is_going_away) { -acpi_unlock_hp_context (); -return NULL ; +if (!context) + goto unlock; + +if (context->func.parent->is_going_away) { +acpiphp_put_context (context); + context =NULL ; + goto unlock; } +get_bridge (context->func.parent);acpiphp_put_context (context); + +unlock:acpi_unlock_hp_context ();return context; }
drivers/pci/probe.c +52 -0
64 lines not on this page · raw message
drivers/pci/quirks.c +4 -1
@@ -5068,7 +5068,8 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_SERVERWORKS, 0x0422, quirk_no_ext_tags);*/ static void quirk_amd_harvest_no_ats (struct pci_dev *pdev) { -if (pdev->device ==0x7340 && pdev->revision !=0xc5 ) +if ((pdev->device ==0x7312 && pdev->revision !=0x00 ) || + (pdev->device ==0x7340 && pdev->revision !=0xc5 ))return ;pci_info (pdev,"disabling ATS\n" );
@@ -5079,6 +5080,8 @@ static void quirk_amd_harvest_no_ats(struct pci_dev *pdev)DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_ATI ,0x98e4 , quirk_amd_harvest_no_ats);/* AMD Iceland dGPU */ DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_ATI ,0x6900 , quirk_amd_harvest_no_ats); +/* AMD Navi10 dGPU */ +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_ATI ,0x7312 , quirk_amd_harvest_no_ats);/* AMD Navi14 dGPU */ DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_ATI ,0x7340 , quirk_amd_harvest_no_ats);#endif /* CONFIG_PCI_ATS */
drivers/pci/setup-bus.c +4 -41
62 lines not on this page · raw message
drivers/pwm/pwm-bcm-iproc.c +7 -2
@@ -85,8 +85,6 @@ static void iproc_pwmc_get_state(struct pwm_chip *chip, struct pwm_device *pwm,u64 tmp, multi, rate;u32 value, prescale; - rate =clk_get_rate (ip->clk); - value =readl (ip->base +IPROC_PWM_CTRL_OFFSET );if (value &BIT (IPROC_PWM_CTRL_EN_SHIFT (pwm->hwpwm)))
@@ -99,6 +97,13 @@ static void iproc_pwmc_get_state(struct pwm_chip *chip, struct pwm_device *pwm,else state->polarity =PWM_POLARITY_INVERSED ; + rate =clk_get_rate (ip->clk); +if (rate ==0 ) { + state->period =0 ; + state->duty_cycle =0 ; +return ; + } + value =readl (ip->base +IPROC_PWM_PRESCALE_OFFSET ); prescale = value >>IPROC_PWM_PRESCALE_SHIFT (pwm->hwpwm); prescale &=IPROC_PWM_PRESCALE_MAX ;
drivers/remoteproc/qcom_q6v5.c +2 -0
@@ -151,6 +151,8 @@ int qcom_q6v5_request_stop(struct qcom_q6v5 *q6v5) {int ret; + q6v5->running = false; +qcom_smem_state_update_bits (q6v5->state,BIT (q6v5->stop_bit),BIT (q6v5->stop_bit));
drivers/scsi/lpfc/lpfc_nvmet.c +1 -1
@@ -1712,7 +1712,7 @@ lpfc_nvmet_destroy_targetport(struct lpfc_hba *phba) } tgtp->tport_unreg_cmp = &tport_unreg_cmp;nvmet_fc_unregister_targetport (phba->targetport); -if (!wait_for_completion_timeout (tgtp->tport_unreg_cmp, +if (!wait_for_completion_timeout (&tport_unreg_cmp,msecs_to_jiffies (LPFC_NVMET_WAIT_TMO )))lpfc_printf_log (phba,KERN_ERR ,LOG_NVME , "6179 Unreg targetport %p timeout "
drivers/usb/serial/ftdi_sio.c +18 -19
@@ -2037,12 +2037,11 @@ static int ftdi_prepare_write_buffer(struct usb_serial_port *port,#define FTDI_RS_ERR_MASK (FTDI_RS_BI | FTDI_RS_PE | FTDI_RS_FE | FTDI_RS_OE)static int ftdi_process_packet (struct usb_serial_port *port, -struct ftdi_private *priv,char *packet,int len) +struct ftdi_private *priv,unsigned char *buf,int len) { +unsigned char status;int i; -char status;char flag; -char *ch;if (len <2 ) {dev_dbg (&port->dev,"malformed packet\n" );
@@ -2052,7 +2051,7 @@ static int ftdi_process_packet(struct usb_serial_port *port,/* Compare new line status to the old one, signal if different/ N.B. packet may be processed more than once, but differences are only processed once. */ - status = packet[0 ] &FTDI_STATUS_B0_MASK ; + status = buf[0 ] &FTDI_STATUS_B0_MASK ;if (status != priv->prev_status) {char diff_status = status ^ priv->prev_status;
@@ -2078,13 +2077,12 @@ static int ftdi_process_packet(struct usb_serial_port *port, }/* save if the transmitter is empty or not */ -if (packet[1 ] &FTDI_RS_TEMT ) +if (buf[1 ] &FTDI_RS_TEMT ) priv->transmit_empty =1 ;else priv->transmit_empty =0 ; - len -=2 ; -if (!len) +if (len ==2 )return 0 ;/* status only */ /*
@@ -2092,40 +2090,41 @@ static int ftdi_process_packet(struct usb_serial_port *port,* data payload to avoid over-reporting. */ flag =TTY_NORMAL ; -if (packet[1 ] &FTDI_RS_ERR_MASK ) { +if (buf[1 ] &FTDI_RS_ERR_MASK ) {/* Break takes precedence over parity, which takes precedence * over framing errors */ -if (packet[1 ] &FTDI_RS_BI ) { +if (buf[1 ] &FTDI_RS_BI ) { flag =TTY_BREAK ; port->icount.brk++;usb_serial_handle_break (port); - }else if (packet[1 ] &FTDI_RS_PE ) { + }else if (buf[1 ] &FTDI_RS_PE ) { flag =TTY_PARITY ; port->icount.parity++; - }else if (packet[1 ] &FTDI_RS_FE ) { + }else if (buf[1 ] &FTDI_RS_FE ) { flag =TTY_FRAME ; port->icount.frame++; }/* Overrun is special, not associated with a char */ -if (packet[1 ] &FTDI_RS_OE ) { +if (buf[1 ] &FTDI_RS_OE ) { port->icount.overrun++;tty_insert_flip_char (&port->port,0 ,TTY_OVERRUN ); } } - port->icount.rx += len; - ch = packet +2 ; + port->icount.rx += len -2 ;if (port->port.console && port->sysrq) { -for (i =0 ; i < len; i++, ch++) { -if (!usb_serial_handle_sysrq_char (port, *ch)) -tty_insert_flip_char (&port->port, *ch, flag); +for (i =2 ; i < len; i++) { +if (usb_serial_handle_sysrq_char (port, buf[i])) +continue ; +tty_insert_flip_char (&port->port, buf[i], flag); } }else { -tty_insert_flip_string_fixed_flag (&port->port, ch, flag, len); +tty_insert_flip_string_fixed_flag (&port->port, buf +2 , flag, + len -2 ); } -return len; +return len -2 ; }static void ftdi_process_read_urb (struct urb *urb)
drivers/watchdog/f71808e_wdt.c +10 -3
@@ -688,9 +688,9 @@ static int __init watchdog_init(int sioaddr)* into the module have been registered yet. */ watchdog.sioaddr = sioaddr; - watchdog.ident.options =WDIOC_SETTIMEOUT - |WDIOF_MAGICCLOSE - |WDIOF_KEEPALIVEPING ; + watchdog.ident.options =WDIOF_MAGICCLOSE + |WDIOF_KEEPALIVEPING + |WDIOF_CARDRESET ; snprintf(watchdog.ident.identity, sizeof(watchdog.ident.identity), "%s watchdog",
@@ -704,6 +704,13 @@ static int __init watchdog_init(int sioaddr) wdt_conf =superio_inb (sioaddr,F71808FG_REG_WDT_CONF ); watchdog.caused_reboot = wdt_conf &BIT (F71808FG_FLAG_WDTMOUT_STS ); +/* +* We don't want WDTMOUT_STS to stick around till regular reboot. +* Write 1 to the bit to clear it to zero. +*/ +superio_outb (sioaddr,F71808FG_REG_WDT_CONF , + wdt_conf |BIT (F71808FG_FLAG_WDTMOUT_STS )); +superio_exit (sioaddr); err =watchdog_set_timeout (timeout);
drivers/watchdog/watchdog_dev.c +9 -9
@@ -947,6 +947,15 @@ static int watchdog_cdev_register(struct watchdog_device *wdd)if (IS_ERR_OR_NULL (watchdog_kworker))return -ENODEV ; +device_initialize (&wd_data->dev); + wd_data->dev.devt =MKDEV (MAJOR (watchdog_devt), wdd->id); + wd_data->dev.class = &watchdog_class; + wd_data->dev.parent = wdd->parent; + wd_data->dev.groups = wdd->groups; + wd_data->dev.release = watchdog_core_data_release; +dev_set_drvdata (&wd_data->dev, wdd); +dev_set_name (&wd_data->dev,"watchdog%d" , wdd->id); +kthread_init_work (&wd_data->work, watchdog_ping_work);hrtimer_init (&wd_data->timer,CLOCK_MONOTONIC ,HRTIMER_MODE_REL ); wd_data->timer.function = watchdog_timer_expired;
@@ -967,15 +976,6 @@ static int watchdog_cdev_register(struct watchdog_device *wdd) } } -device_initialize (&wd_data->dev); - wd_data->dev.devt =MKDEV (MAJOR (watchdog_devt), wdd->id); - wd_data->dev.class = &watchdog_class; - wd_data->dev.parent = wdd->parent; - wd_data->dev.groups = wdd->groups; - wd_data->dev.release = watchdog_core_data_release; -dev_set_drvdata (&wd_data->dev, wdd); -dev_set_name (&wd_data->dev,"watchdog%d" , wdd->id); -/* Fill in the data structures */ cdev_init (&wd_data->cdev, &watchdog_fops);
fs/btrfs/disk-io.c +10 -3
@@ -1500,9 +1500,16 @@ int btrfs_init_fs_root(struct btrfs_root *root)spin_lock_init (&root->ino_cache_lock);init_waitqueue_head (&root->ino_cache_wait); - ret =get_anon_bdev (&root->anon_dev); -if (ret) - goto fail; +/* +* Don't assign anonymous block device to roots that are not exposed to +* userspace, the id pool is limited to 1M +*/ +if (is_fstree (root->root_key.objectid) && +btrfs_root_refs (&root->root_item) >0 ) { + ret =get_anon_bdev (&root->anon_dev); +if (ret) + goto fail; + }mutex_lock (&root->objectid_mutex); ret = btrfs_find_highest_objectid(root,
fs/btrfs/free-space-cache.c +2 -2
@@ -2169,7 +2169,7 @@ static int insert_into_bitmap(struct btrfs_free_space_ctl *ctl,static bool try_merge_free_space (struct btrfs_free_space_ctl *ctl,struct btrfs_free_space *info,bool update_stat) { -struct btrfs_free_space *left_info; +struct btrfs_free_space *left_info =NULL ;struct btrfs_free_space *right_info;bool merged = false;u64 offset = info->offset;
@@ -2184,7 +2184,7 @@ static bool try_merge_free_space(struct btrfs_free_space_ctl *ctl,if (right_info &&rb_prev (&right_info->offset_index)) left_info =rb_entry (rb_prev (&right_info->offset_index), struct btrfs_free_space, offset_index); -else +else if (!right_info) left_info =tree_search_offset (ctl, offset -1 ,0 ,0 );if (right_info && !right_info->bitmap) {
fs/btrfs/inode.c +3 -1
@@ -4458,6 +4458,8 @@ int btrfs_delete_subvolume(struct inode *dir, struct dentry *dentry) } } +free_anon_bdev (dest->anon_dev); + dest->anon_dev =0 ; out_end_trans: trans->block_rsv =NULL ; trans->bytes_reserved =0 ;
@@ -7012,7 +7014,7 @@ struct extent_map *btrfs_get_extent(struct btrfs_inode *inode, found_type == BTRFS_FILE_EXTENT_PREALLOC) {/* Only regular file could have regular/prealloc extent */ if (!S_ISREG (inode->vfs_inode.i_mode)) { - ret = -EUCLEAN ; + err = -EUCLEAN ;btrfs_crit (fs_info,"regular/prealloc extent found for non-regular inode %llu" ,btrfs_ino (inode));
fs/btrfs/ref-verify.c +2 -0
@@ -297,6 +297,8 @@ static struct block_entry *add_block_entry(struct btrfs_fs_info *fs_info, exist_re =insert_root_entry (&exist->roots, re);if (exist_re)kfree (re); + }else { +kfree (re); }kfree (be);return exist;
fs/btrfs/super.c +16 -19
@@ -432,6 +432,7 @@ int btrfs_parse_options(struct btrfs_fs_info *info, char *options,char *compress_type;bool compress_force = false;enum btrfs_compression_type saved_compress_type; +int saved_compress_level;bool saved_compress_force;int no_compress =0 ;
@@ -514,6 +515,7 @@ int btrfs_parse_options(struct btrfs_fs_info *info, char *options, info->compress_type : BTRFS_COMPRESS_NONE; saved_compress_force =btrfs_test_opt (info,FORCE_COMPRESS ); + saved_compress_level = info->compress_level;if (token == Opt_compress || token == Opt_compress_force ||strncmp (args[0 ].from,"zlib" ,4 ) ==0 ) {
@@ -552,6 +554,8 @@ int btrfs_parse_options(struct btrfs_fs_info *info, char *options, no_compress =0 ; }else if (strncmp (args[0 ].from,"no" ,2 ) ==0 ) { compress_type ="no" ; + info->compress_level =0 ; + info->compress_type =0 ;btrfs_clear_opt (info->mount_opt,COMPRESS );btrfs_clear_opt (info->mount_opt,FORCE_COMPRESS ); compress_force = false;
@@ -572,11 +576,11 @@ int btrfs_parse_options(struct btrfs_fs_info *info, char *options,*/ btrfs_clear_opt (info->mount_opt,FORCE_COMPRESS ); } -if ((btrfs_test_opt (info,COMPRESS ) && - (info->compress_type != saved_compress_type || - compress_force != saved_compress_force)) || - (!btrfs_test_opt (info,COMPRESS ) && - no_compress ==1 )) { +if (no_compress ==1 ) { +btrfs_info (info,"use no compression" ); + }else if ((info->compress_type != saved_compress_type) || + (compress_force != saved_compress_force) || + (info->compress_level != saved_compress_level)) {btrfs_info (info,"%s %s compression, level %d" , (compress_force) ?"force" :"use" , compress_type, info->compress_level);
@@ -2314,9 +2318,7 @@ static int btrfs_unfreeze(struct super_block *sb)static int btrfs_show_devname (struct seq_file *m,struct dentry *root) {struct btrfs_fs_info *fs_info =btrfs_sb (root->d_sb); -struct btrfs_fs_devices *cur_devices;struct btrfs_device *dev, *first_dev =NULL ; -struct list_head *head;/* * Lightweight locking of the devices. We should not need
@@ -2326,18 +2328,13 @@ static int btrfs_show_devname(struct seq_file *m, struct dentry *root)* least until until the rcu_read_unlock. */ rcu_read_lock (); - cur_devices = fs_info->fs_devices; -while (cur_devices) { - head = &cur_devices->devices; -list_for_each_entry_rcu (dev, head, dev_list) { -if (test_bit (BTRFS_DEV_STATE_MISSING , &dev->dev_state)) -continue ; -if (!dev->name) -continue ; -if (!first_dev || dev->devid < first_dev->devid) - first_dev = dev; - } - cur_devices = cur_devices->seed; +list_for_each_entry_rcu (dev, &fs_info->fs_devices->devices, dev_list) { +if (test_bit (BTRFS_DEV_STATE_MISSING , &dev->dev_state)) +continue ; +if (!dev->name) +continue ; +if (!first_dev || dev->devid < first_dev->devid) + first_dev = dev; }if (first_dev)
fs/btrfs/tree-log.c +2 -6
@@ -3988,11 +3988,8 @@ static noinline int copy_items(struct btrfs_trans_handle *trans, fs_info->csum_root, ds + cs, ds + cs + cl -1 , &ordered_sums, 0); -if (ret) { -btrfs_release_path (dst_path); -kfree (ins_data); -return ret; - } +if (ret) +break ; } } }
@@ -4005,7 +4002,6 @@ static noinline int copy_items(struct btrfs_trans_handle *trans,* we have to do this after the loop above to avoid changing the * log tree while trying to change the log tree. */ - ret =0 ;while (!list_empty (&ordered_sums)) { struct btrfs_ordered_sum *sums = list_entry(ordered_sums.next, struct btrfs_ordered_sum,
fs/btrfs/volumes.c +18 -3
@@ -155,7 +155,9 @@ static int __btrfs_map_block(struct btrfs_fs_info *fs_info,* * global::fs_devs - add, remove, updates to the global list * -* does not protect: manipulation of the fs_devices::devices list! +* does not protect: manipulation of the fs_devices::devices list in general +* but in mount context it could be used to exclude list modifications by eg. +* scan ioctl * * btrfs_device::name - renames (write side), read is RCU *
@@ -168,6 +170,9 @@ static int __btrfs_map_block(struct btrfs_fs_info *fs_info,* may be used to exclude some operations from running concurrently without any * modifications to the list (see write_all_supers) * +* Is not required at mount and close times, because our device list is +* protected by the uuid_mutex at that point. +* * balance_mutex * ------------- * protects balance structures (status, state) and context accessed from
@@ -656,6 +661,11 @@ static void btrfs_free_stale_devices(const char *path, } } +/* +* This is only used on mount, and we are protected from competing things +* messing with our fs_devices by the uuid_mutex, thus we do not need the +* fs_devices->device_list_mutex here. +*/ static int btrfs_open_one_device (struct btrfs_fs_devices *fs_devices,struct btrfs_device *device,fmode_t flags,void *holder)
@@ -1153,8 +1163,14 @@ int btrfs_open_devices(struct btrfs_fs_devices *fs_devices,int ret;lockdep_assert_held (&uuid_mutex); +/* +* The device_list_mutex cannot be taken here in case opening the +* underlying device takes further locks like bd_mutex. +* +* We also don't need the lock here as this is called during mount and +* exclusion is provided by uuid_mutex +*/ -mutex_lock (&fs_devices->device_list_mutex);if (fs_devices->opened) { fs_devices->opened++; ret =0 ;
@@ -1162,7 +1178,6 @@ int btrfs_open_devices(struct btrfs_fs_devices *fs_devices,list_sort (NULL , &fs_devices->devices, devid_cmp); ret =open_fs_devices (fs_devices, flags, holder); } -mutex_unlock (&fs_devices->device_list_mutex);return ret; }
fs/cifs/smb2misc.c +52 -21
121 lines not on this page · raw message
fs/cifs/smb2pdu.c +2 -0
@@ -1132,6 +1132,8 @@ SMB2_auth_kerberos(struct SMB2_sess_data *sess_data) spnego_key =cifs_get_spnego_key (ses);if (IS_ERR (spnego_key)) { rc =PTR_ERR (spnego_key); +if (rc == -ENOKEY ) +cifs_dbg (VFS ,"Verify user has a krb5 ticket and keyutils is installed\n" ); spnego_key =NULL ; goto out; }
fs/ext2/ialloc.c +2 -1
@@ -80,6 +80,7 @@ static void ext2_release_inode(struct super_block *sb, int group, int dir)if (dir)le16_add_cpu (&desc->bg_used_dirs_count,-1 );spin_unlock (sb_bgl_lock (EXT2_SB (sb), group)); +percpu_counter_inc (&EXT2_SB (sb)->s_freeinodes_counter);if (dir)percpu_counter_dec (&EXT2_SB (sb)->s_dirs_counter);mark_buffer_dirty (bh);
@@ -531,7 +532,7 @@ struct inode *ext2_new_inode(struct inode *dir, umode_t mode, goto fail; } -percpu_counter_add (&sbi->s_freeinodes_counter,-1 ); +percpu_counter_dec (&sbi->s_freeinodes_counter);if (S_ISDIR (mode))percpu_counter_inc (&sbi->s_dirs_counter);
fs/minix/inode.c +7 -5
@@ -155,8 +155,10 @@ static int minix_remount (struct super_block * sb, int * flags, char * data)return 0 ; } -static bool minix_check_superblock (struct minix_sb_info *sbi) +static bool minix_check_superblock (struct super_block *sb) { +struct minix_sb_info *sbi =minix_sb (sb); +if (sbi->s_imap_blocks ==0 || sbi->s_zmap_blocks ==0 )return false;
@@ -166,7 +168,7 @@ static bool minix_check_superblock(struct minix_sb_info *sbi)* of indirect blocks which places the limit well above U32_MAX. */ if (sbi->s_version ==MINIX_V1 && - sbi->s_max_size > (7 +512 +512 *512 ) *BLOCK_SIZE ) + sb->s_maxbytes > (7 +512 +512 *512 ) *BLOCK_SIZE )return false;return true;
@@ -207,7 +209,7 @@ static int minix_fill_super(struct super_block *s, void *data, int silent) sbi->s_zmap_blocks = ms->s_zmap_blocks; sbi->s_firstdatazone = ms->s_firstdatazone; sbi->s_log_zone_size = ms->s_log_zone_size; - sbi->s_max_size = ms->s_max_size; + s->s_maxbytes = ms->s_max_size; s->s_magic = ms->s_magic;if (s->s_magic ==MINIX_SUPER_MAGIC ) { sbi->s_version =MINIX_V1 ;
@@ -238,7 +240,7 @@ static int minix_fill_super(struct super_block *s, void *data, int silent) sbi->s_zmap_blocks = m3s->s_zmap_blocks; sbi->s_firstdatazone = m3s->s_firstdatazone; sbi->s_log_zone_size = m3s->s_log_zone_size; - sbi->s_max_size = m3s->s_max_size; + s->s_maxbytes = m3s->s_max_size; sbi->s_ninodes = m3s->s_ninodes; sbi->s_nzones = m3s->s_zones; sbi->s_dirsize =64 ;
@@ -250,7 +252,7 @@ static int minix_fill_super(struct super_block *s, void *data, int silent) }else goto out_no_fs; -if (!minix_check_superblock (sbi)) +if (!minix_check_superblock (s)) goto out_illegal_sb;/*
fs/minix/itree_v1.c +6 -6
@@ -29,12 +29,12 @@ static int block_to_path(struct inode * inode, long block, int offsets[DEPTH])if (block <0 ) {printk ("MINIX-fs: block_to_path: block %ld < 0 on dev %pg\n" , block, inode->i_sb->s_bdev); - }else if (block >= (minix_sb (inode->i_sb)->s_max_size/BLOCK_SIZE )) { -if (printk_ratelimit ()) -printk ("MINIX-fs: block_to_path: " -"block %ld too big on dev %pg\n" , - block, inode->i_sb->s_bdev); - }else if (block <7 ) { +return 0 ; + } +if ((u64 )block *BLOCK_SIZE >= inode->i_sb->s_maxbytes) +return 0 ; + +if (block <7 ) { offsets[n++] = block; }else if ((block -=7 ) <512 ) { offsets[n++] =7 ;
fs/minix/itree_v2.c +6 -7
@@ -32,13 +32,12 @@ static int block_to_path(struct inode * inode, long block, int offsets[DEPTH])if (block <0 ) {printk ("MINIX-fs: block_to_path: block %ld < 0 on dev %pg\n" , block, sb->s_bdev); - }else if ((u64 )block * (u64 )sb->s_blocksize >= -minix_sb (sb)->s_max_size) { -if (printk_ratelimit ()) -printk ("MINIX-fs: block_to_path: " -"block %ld too big on dev %pg\n" , - block, sb->s_bdev); - }else if (block <DIRCOUNT ) { +return 0 ; + } +if ((u64 )block * (u64 )sb->s_blocksize >= sb->s_maxbytes) +return 0 ; + +if (block <DIRCOUNT ) { offsets[n++] = block; }else if ((block -=DIRCOUNT ) <INDIRCOUNT (sb)) { offsets[n++] =DIRCOUNT ;
fs/minix/minix.h +0 -1
@@ -32,7 +32,6 @@ struct minix_sb_info {unsigned long s_zmap_blocks;unsigned long s_firstdatazone;unsigned long s_log_zone_size; -unsigned long s_max_size;int s_dirsize;int s_namelen;struct buffer_head ** s_imap;
fs/nfs/nfs4proc.c +0 -2
@@ -5603,8 +5603,6 @@ static int _nfs4_get_security_label(struct inode *inode, void *buf,return ret;if (!(fattr.valid &NFS_ATTR_FATTR_V4_SECURITY_LABEL ))return -ENOENT ; -if (buflen < label.len) -return -ERANGE ;return 0 ; }
fs/nfs/nfs4xdr.c +5 -1
@@ -4280,7 +4280,11 @@ static int decode_attr_security_label(struct xdr_stream *xdr, uint32_t *bitmap, goto out_overflow;if (len <NFS4_MAXLABELLEN ) {if (label) { -memcpy (label->label, p, len); +if (label->len) { +if (label->len < len) +return -ERANGE ; +memcpy (label->label, p, len); + } label->len = len; label->pi = pi; label->lfs = lfs;
fs/ocfs2/ocfs2.h +2 -2
@@ -338,8 +338,8 @@ struct ocfs2_superspinlock_t osb_lock;u32 s_next_generation;unsigned long osb_flags; -s16 s_inode_steal_slot; -s16 s_meta_steal_slot; +u16 s_inode_steal_slot; +u16 s_meta_steal_slot;atomic_t s_num_inodes_stolen;atomic_t s_num_meta_stolen;
fs/ocfs2/suballoc.c +2 -2
@@ -893,9 +893,9 @@ static void __ocfs2_set_steal_slot(struct ocfs2_super *osb, int slot, int type) {spin_lock (&osb->osb_lock);if (type ==INODE_ALLOC_SYSTEM_INODE ) - osb->s_inode_steal_slot = slot; + osb->s_inode_steal_slot = (u16 )slot;else if (type ==EXTENT_ALLOC_SYSTEM_INODE ) - osb->s_meta_steal_slot = slot; + osb->s_meta_steal_slot = (u16 )slot;spin_unlock (&osb->osb_lock); }
fs/ocfs2/super.c +2 -2
@@ -92,7 +92,7 @@ struct mount_optionsunsigned long commit_interval;unsigned long mount_opt;unsigned int atime_quantum; -signed short slot; +unsigned short slot;int localalloc_opt;unsigned int resv_level;int dir_resv_level;
@@ -1384,7 +1384,7 @@ static int ocfs2_parse_options(struct super_block *sb, goto bail; }if (option) - mopt->slot = (s16 )option; + mopt->slot = (u16 )option;break ;case Opt_commit:if (match_int (&args[0 ], &option)) {
fs/ufs/super.c +1 -1
@@ -100,7 +100,7 @@ static struct inode *ufs_nfs_get_inode(struct super_block *sb, u64 ino, u32 genestruct ufs_sb_private_info *uspi =UFS_SB (sb)->s_uspi;struct inode *inode; -if (ino <UFS_ROOTINO || ino > uspi->s_ncg * uspi->s_ipg) +if (ino <UFS_ROOTINO || ino > (u64 )uspi->s_ncg * uspi->s_ipg)return ERR_PTR (-ESTALE ); inode =ufs_iget (sb, ino);
include/linux/intel-iommu.h +2 -2
@@ -308,8 +308,8 @@ enum {#define QI_DEV_EIOTLB_ADDR (a) ((u64)(a) & VTD_PAGE_MASK)#define QI_DEV_EIOTLB_SIZE (((u64)1) << 11) -#define QI_DEV_EIOTLB_GLOB (g) ((u64)g) -#define QI_DEV_EIOTLB_PASID (p) (((u64)p) << 32) +#define QI_DEV_EIOTLB_GLOB (g) ((u64)(g) & 0x1) +#define QI_DEV_EIOTLB_PASID (p) ((u64)((p) & 0xfffff) << 32)#define QI_DEV_EIOTLB_SID (sid) ((u64)((sid) & 0xffff) << 16)#define QI_DEV_EIOTLB_QDEP (qd) ((u64)((qd) & 0x1f) << 4)#define QI_DEV_EIOTLB_PFSID (pfsid) (((u64)(pfsid & 0xf) << 12) | \
include/linux/irq.h +13 -0
@@ -210,6 +210,8 @@ struct irq_data {* IRQD_CAN_RESERVE - Can use reservation mode * IRQD_MSI_NOMASK_QUIRK - Non-maskable MSI quirk for affinity change * required +* IRQD_AFFINITY_ON_ACTIVATE - Affinity is set on activation. Don't call +* irq_chip::irq_set_affinity() when deactivated. */ enum {IRQD_TRIGGER_MASK =0xf ,
@@ -233,6 +235,7 @@ enum {IRQD_DEFAULT_TRIGGER_SET = (1 <<25 ),IRQD_CAN_RESERVE = (1 <<26 ),IRQD_MSI_NOMASK_QUIRK = (1 <<27 ), + IRQD_AFFINITY_ON_ACTIVATE = (1 << 29), };#define __irqd_to_state (d) ACCESS_PRIVATE((d)->common, state_use_accessors)
@@ -407,6 +410,16 @@ static inline bool irqd_msi_nomask_quirk(struct irq_data *d)return __irqd_to_state (d) &IRQD_MSI_NOMASK_QUIRK ; } +static inline void irqd_set_affinity_on_activate (struct irq_data *d) +{ +__irqd_to_state (d) |=IRQD_AFFINITY_ON_ACTIVATE ; +} + +static inline bool irqd_affinity_on_activate (struct irq_data *d) +{ +return __irqd_to_state (d) &IRQD_AFFINITY_ON_ACTIVATE ; +} +#undef __irqd_to_statestatic inline irq_hw_number_t irqd_to_hwirq (struct irq_data *d)
include/linux/pci.h +3 -0
@@ -373,6 +373,9 @@ struct pci_dev {bool match_driver;/* Skip attaching driver */ unsigned int transparent:1; /* Subtractive decode bridge */ + unsigned int io_window:1; /* Bridge has I/O window */ + unsigned int pref_window:1; /* Bridge has pref mem window */ + unsigned int pref_64_window:1; /* Pref mem window is 64-bit */ unsigned int multifunction:1; /* Multi-function device */ unsigned int is_busmaster:1; /* Is busmaster */
include/net/sock.h +4 -0
@@ -845,6 +845,8 @@ static inline int sk_memalloc_socks(void) {return static_branch_unlikely (&memalloc_socks_key); } + +void __receive_sock (struct file *file);#else static inline int sk_memalloc_socks (void )
@@ -852,6 +854,8 @@ static inline int sk_memalloc_socks(void) return 0; } +static inline void __receive_sock (struct file *file) +{ }#endif static inline gfp_t sk_gfp_mask (const struct sock *sk,gfp_t gfp_mask)
kernel/irq/manage.c +5 -1
@@ -280,12 +280,16 @@ static bool irq_set_affinity_deactivated(struct irq_data *data,struct irq_desc *desc =irq_data_to_desc (data);/* +* Handle irq chips which can handle affinity only in activated +* state correctly +* * If the interrupt is not yet activated, just store the affinity * mask and do not call the chip driver at all. On activation the * driver has to make sure anyway that the interrupt is in a * useable state so startup works. */ -if (!IS_ENABLED (CONFIG_IRQ_DOMAIN_HIERARCHY ) ||irqd_is_activated (data)) +if (!IS_ENABLED (CONFIG_IRQ_DOMAIN_HIERARCHY ) || +irqd_is_activated (data) || !irqd_affinity_on_activate (data))return false;cpumask_copy (desc->irq_common_data.affinity, mask);
kernel/kprobes.c +7 -0
@@ -2077,6 +2077,13 @@ static void kill_kprobe(struct kprobe *p)* the original probed function (which will be freed soon) any more. */ arch_remove_kprobe (p); + +/* +* The module is going away. We should disarm the kprobe which +* is using ftrace. +*/ +if (kprobe_ftrace (p)) +disarm_kprobe_ftrace (p); }/* Disable one kprobe */
kernel/module.c +19 -3
@@ -1461,18 +1461,34 @@ struct module_sect_attrs {struct module_sect_attr attrs[0 ]; }; +#define MODULE_SECT_READ_SIZE (3 /* "0x", "\n" */ + (BITS_PER_LONG / 4))static ssize_t module_sect_read (struct file *file,struct kobject *kobj,struct bin_attribute *battr,char *buf,loff_t pos,size_t count) {struct module_sect_attr *sattr = container_of(battr, struct module_sect_attr, battr); +char bounce[MODULE_SECT_READ_SIZE +1 ]; +size_t wrote;if (pos !=0 )return -EINVAL ; -return sprintf (buf,"0x%px\n" , -kallsyms_show_value (file->f_cred) ? (void *)sattr->address :NULL ); +/* +* Since we're a binary read handler, we must account for the +* trailing NUL byte that sprintf will write: if "buf" is +* too small to hold the NUL, or the NUL is exactly the last +* byte, the read will look like it got truncated by one byte. +* Since there is no way to ask sprintf nicely to not write +* the NUL, we have to use a bounce buffer. +*/ + wrote =scnprintf (bounce,sizeof (bounce),"0x%px\n" , +kallsyms_show_value (file->f_cred) + ? (void *)sattr->address :NULL ); + count =min (count, wrote); +memcpy (buf, bounce, count); + +return count; }static void free_sect_attrs (struct module_sect_attrs *sect_attrs)
@@ -1521,7 +1537,7 @@ static void add_sect_attrs(struct module *mod, const struct load_info *info) goto out; sect_attrs->nsections++; sattr->battr.read = module_sect_read; - sattr->battr.size =3 /* "0x", "\n" */ + (BITS_PER_LONG /4 ); + sattr->battr.size =MODULE_SECT_READ_SIZE ; sattr->battr.attr.mode =0400 ; *(gattr++) = &(sattr++)->battr; }
kernel/trace/ftrace.c +9 -6
@@ -5665,8 +5665,11 @@ static int referenced_filters(struct dyn_ftrace *rec)int cnt =0 ;for (ops = ftrace_ops_list; ops != &ftrace_list_end; ops = ops->next) { -if (ops_references_rec (ops, rec)) - cnt++; +if (ops_references_rec (ops, rec)) { + cnt++; +if (ops->flags &FTRACE_OPS_FL_SAVE_REGS ) + rec->flags |=FTRACE_FL_REGS ; + } }return cnt;
@@ -5843,8 +5846,8 @@ void ftrace_module_enable(struct module *mod)if (ftrace_start_up) cnt +=referenced_filters (rec); -/* This clears FTRACE_FL_DISABLED */ - rec->flags = cnt; + rec->flags &= ~FTRACE_FL_DISABLED ; + rec->flags += cnt;if (ftrace_start_up && cnt) {int failed =__ftrace_replace_code (rec,1 );
@@ -6447,12 +6450,12 @@ void ftrace_pid_follow_fork(struct trace_array *tr, bool enable)if (enable) {register_trace_sched_process_fork (ftrace_pid_follow_sched_process_fork, tr); -register_trace_sched_process_exit (ftrace_pid_follow_sched_process_exit, +register_trace_sched_process_free (ftrace_pid_follow_sched_process_exit, tr); }else {unregister_trace_sched_process_fork (ftrace_pid_follow_sched_process_fork, tr); -unregister_trace_sched_process_exit (ftrace_pid_follow_sched_process_exit, +unregister_trace_sched_process_free (ftrace_pid_follow_sched_process_exit, tr); } }
kernel/trace/trace_events.c +2 -2
@@ -534,12 +534,12 @@ void trace_event_follow_fork(struct trace_array *tr, bool enable)if (enable) {register_trace_prio_sched_process_fork (event_filter_pid_sched_process_fork, tr,INT_MIN ); -register_trace_prio_sched_process_exit (event_filter_pid_sched_process_exit, +register_trace_prio_sched_process_free (event_filter_pid_sched_process_exit, tr,INT_MAX ); }else {unregister_trace_sched_process_fork (event_filter_pid_sched_process_fork, tr); -unregister_trace_sched_process_exit (event_filter_pid_sched_process_exit, +unregister_trace_sched_process_free (event_filter_pid_sched_process_exit, tr); } }
kernel/trace/trace_hwlat.c +3 -2
@@ -270,6 +270,7 @@ static bool disable_migrate;static void move_to_next_cpu (void ) {struct cpumask *current_mask = &save_cpumask; +struct trace_array *tr = hwlat_trace;int next_cpu;if (disable_migrate)
@@ -283,7 +284,7 @@ static void move_to_next_cpu(void) goto disable;get_online_cpus (); -cpumask_and (current_mask, cpu_online_mask, tracing_buffer_mask); +cpumask_and (current_mask, cpu_online_mask, tr->tracing_cpumask); next_cpu =cpumask_next (smp_processor_id (), current_mask);put_online_cpus ();
@@ -360,7 +361,7 @@ static int start_kthread(struct trace_array *tr)/* Just pick the first CPU on first iteration */ current_mask = &save_cpumask;get_online_cpus (); -cpumask_and (current_mask, cpu_online_mask, tracing_buffer_mask); +cpumask_and (current_mask, cpu_online_mask, tr->tracing_cpumask);put_online_cpus (); next_cpu =cpumask_first (current_mask);
lib/test_kmod.c +1 -1
@@ -745,7 +745,7 @@ static int trigger_config_run_type(struct kmod_test_device *test_dev,break ;case TEST_KMOD_FS_TYPE :kfree_const (config->test_fs); - config->test_driver =NULL ; + config->test_fs =NULL ; copied =config_copy_test_fs (config, test_str,strlen (test_str));break ;
mm/khugepaged.c +13 -9
@@ -1251,6 +1251,7 @@ static void collect_mm_slot(struct mm_slot *mm_slot)static void retract_page_tables (struct address_space *mapping,pgoff_t pgoff) {struct vm_area_struct *vma; +struct mm_struct *mm;unsigned long addr;pmd_t *pmd, _pmd;
@@ -1264,7 +1265,8 @@ static void retract_page_tables(struct address_space *mapping, pgoff_t pgoff)continue ;if (vma->vm_end < addr +HPAGE_PMD_SIZE )continue ; - pmd =mm_find_pmd (vma->vm_mm, addr); + mm = vma->vm_mm; + pmd =mm_find_pmd (mm, addr);if (!pmd)continue ;/*
@@ -1273,14 +1275,16 @@ static void retract_page_tables(struct address_space *mapping, pgoff_t pgoff)* re-fault. Not ideal, but it's more important to not disturb * the system too much. */ -if (down_write_trylock (&vma->vm_mm->mmap_sem)) { -spinlock_t *ptl =pmd_lock (vma->vm_mm, pmd); -/* assume page table is clear */ - _pmd =pmdp_collapse_flush (vma, addr, pmd); -spin_unlock (ptl); -up_write (&vma->vm_mm->mmap_sem); -mm_dec_nr_ptes (vma->vm_mm); -pte_free (vma->vm_mm,pmd_pgtable (_pmd)); +if (down_write_trylock (&mm->mmap_sem)) { +if (!khugepaged_test_exit (mm)) { +spinlock_t *ptl =pmd_lock (mm, pmd); +/* assume page table is clear */ + _pmd =pmdp_collapse_flush (vma, addr, pmd); +spin_unlock (ptl); +mm_dec_nr_ptes (mm); +pte_free (mm,pmd_pgtable (_pmd)); + } +up_write (&mm->mmap_sem); } }i_mmap_unlock_write (mapping);
mm/page_counter.c +3 -3
@@ -77,7 +77,7 @@ void page_counter_charge(struct page_counter *counter, unsigned long nr_pages)long new; new =atomic_long_add_return (nr_pages, &c->usage); -propagate_protected_usage (counter, new); +propagate_protected_usage (c, new);/* * This is indeed racy, but we can live with some * inaccuracy in the watermark.
@@ -121,7 +121,7 @@ bool page_counter_try_charge(struct page_counter *counter, new =atomic_long_add_return (nr_pages, &c->usage);if (new > c->max) {atomic_long_sub (nr_pages, &c->usage); -propagate_protected_usage (counter, new); +propagate_protected_usage (c, new);/* * This is racy, but we can live with some * inaccuracy in the failcnt.
@@ -130,7 +130,7 @@ bool page_counter_try_charge(struct page_counter *counter, *fail = c; goto failed; } -propagate_protected_usage (counter, new); +propagate_protected_usage (c, new);/* * Just like with failcnt, we can live with some * inaccuracy in the watermark.
net/compat.c +1 -0
@@ -289,6 +289,7 @@ void scm_detach_fds_compat(struct msghdr *kmsg, struct scm_cookie *scm)break ; }/* Bump the usage count and install the file. */ +__receive_sock (fp[i]);fd_install (new_fd,get_file (fp[i])); }
net/core/sock.c +21 -0
@@ -2636,6 +2636,27 @@ int sock_no_mmap(struct file *file, struct socket *sock, struct vm_area_struct * }EXPORT_SYMBOL (sock_no_mmap); +/* +* When a file is received (via SCM_RIGHTS, etc), we must bump the +* various sock-based usage counts. +*/ +void __receive_sock (struct file *file) +{ +struct socket *sock; +int error; + +/* +* The resulting value of "error" is ignored here since we only +* need to take action when the file is a socket and testing +* "sock" for NULL is sufficient. +*/ + sock =sock_from_file (file, &error); +if (sock) { +sock_update_netprioidx (&sock->sk->sk_cgrp_data); +sock_update_classid (&sock->sk->sk_cgrp_data); + } +} +ssize_t sock_no_sendpage (struct socket *sock,struct page *page,int offset,size_t size,int flags) {ssize_t res;
net/mac80211/sta_info.c +1 -1
@@ -979,7 +979,7 @@ static void __sta_info_destroy_part2(struct sta_info *sta)might_sleep ();lockdep_assert_held (&local->sta_mtx); -while (sta->sta_state ==IEEE80211_STA_AUTHORIZED ) { +if (sta->sta_state ==IEEE80211_STA_AUTHORIZED ) { ret =sta_info_move_state (sta,IEEE80211_STA_ASSOC );WARN_ON_ONCE (ret); }
sound/pci/echoaudio/echoaudio.c +0 -2
@@ -2216,7 +2216,6 @@ static int snd_echo_resume(struct device *dev)if (err <0 ) {kfree (commpage_bak);dev_err (dev,"resume init_hw err=%d\n" , err); -snd_echo_free (chip);return err; }
@@ -2243,7 +2242,6 @@ static int snd_echo_resume(struct device *dev)if (request_irq (pci->irq, snd_echo_interrupt,IRQF_SHARED ,KBUILD_MODNAME , chip)) {dev_err (chip->card->dev,"cannot grab irq\n" ); -snd_echo_free (chip);return -EBUSY ; } chip->irq = pci->irq;
tools/build/Makefile.feature +1 -1
@@ -7,7 +7,7 @@ endif feature_check = $(eval $(feature_check_code)) define feature_check_code - feature-$(1) := $(shell $(MAKE) OUTPUT=$(OUTPUT_FEATURES) CFLAGS="$(EXTRA_CFLAGS) $(FEATURE_CHECK_CFLAGS-$(1))" CXXFLAGS="$(EXTRA_CXXFLAGS) $(FEATURE_CHECK_CXXFLAGS-$(1))" LDFLAGS="$(LDFLAGS) $(FEATURE_CHECK_LDFLAGS-$(1))" -C $(feature_dir) $(OUTPUT_FEATURES)test-$1.bin >/dev/null 2>/dev/null && echo 1 || echo 0) + feature-$(1) := $(shell $(MAKE) OUTPUT=$(OUTPUT_FEATURES) CC="$(CC)" CXX="$(CXX)" CFLAGS="$(EXTRA_CFLAGS) $(FEATURE_CHECK_CFLAGS-$(1))" CXXFLAGS="$(EXTRA_CXXFLAGS) $(FEATURE_CHECK_CXXFLAGS-$(1))" LDFLAGS="$(LDFLAGS) $(FEATURE_CHECK_LDFLAGS-$(1))" -C $(feature_dir) $(OUTPUT_FEATURES)test-$1.bin >/dev/null 2>/dev/null && echo 1 || echo 0) endef feature_set = $(eval $(feature_set_code))
tools/build/feature/Makefile +0 -2
@@ -62,8 +62,6 @@ FILES= \ FILES := $(addprefix $(OUTPUT),$(FILES)) -CC ?= $(CROSS_COMPILE)gcc -CXX ?= $(CROSS_COMPILE)g++ PKG_CONFIG ?= $(CROSS_COMPILE)pkg-config LLVM_CONFIG ?= llvm-config
tools/perf/bench/mem-functions.c +11 -10
@@ -222,12 +222,8 @@ static int bench_mem_common(int argc, const char **argv, struct bench_mem_info *return 0 ; } -static u64 do_memcpy_cycles (const struct function *r,size_t size,void *src,void *dst) +static void memcpy_prefault (memcpy_t fn,size_t size,void *src,void *dst) { -u64 cycle_start =0ULL , cycle_end =0ULL ; -memcpy_t fn = r->fn.memcpy; -int i; -/* Make sure to always prefault zero pages even if MMAP_THRESH is crossed: */ memset (src,0 , size);
@@ -236,6 +232,15 @@ static u64 do_memcpy_cycles(const struct function *r, size_t size, void *src, vo* to not measure page fault overhead: */ fn (dst, src, size); +} + +static u64 do_memcpy_cycles (const struct function *r,size_t size,void *src,void *dst) +{ +u64 cycle_start =0ULL , cycle_end =0ULL ; +memcpy_t fn = r->fn.memcpy; +int i; + +memcpy_prefault (fn, size, src, dst); cycle_start =get_cycles ();for (i =0 ; i < nr_loops; ++i)
@@ -251,11 +256,7 @@ static double do_memcpy_gettimeofday(const struct function *r, size_t size, voidmemcpy_t fn = r->fn.memcpy;int i; -/* -* We prefault the freshly allocated memory range here, -* to not measure page fault overhead: -*/ -fn (dst, src, size); +memcpy_prefault (fn, size, src, dst);BUG_ON (gettimeofday (&tv_start,NULL ));for (i =0 ; i < nr_loops; ++i)
tools/perf/util/intel-pt-decoder/intel-pt-decoder.c +7 -14
@@ -1129,6 +1129,7 @@ static int intel_pt_walk_fup(struct intel_pt_decoder *decoder)return 0 ;if (err == -EAGAIN ||intel_pt_fup_with_nlip (decoder, &intel_pt_insn, ip, err)) { + decoder->pkt_state =INTEL_PT_STATE_IN_SYNC ;if (intel_pt_fup_event (decoder))return 0 ;return -EAGAIN ;
@@ -1780,17 +1781,13 @@ static int intel_pt_walk_trace(struct intel_pt_decoder *decoder) }if (decoder->set_fup_mwait) no_tip = true; +if (no_tip) + decoder->pkt_state =INTEL_PT_STATE_FUP_NO_TIP ; +else + decoder->pkt_state =INTEL_PT_STATE_FUP ; err =intel_pt_walk_fup (decoder); -if (err != -EAGAIN ) { -if (err) -return err; -if (no_tip) - decoder->pkt_state = -INTEL_PT_STATE_FUP_NO_TIP ; -else - decoder->pkt_state =INTEL_PT_STATE_FUP ; -return 0 ; - } +if (err != -EAGAIN ) +return err;if (no_tip) { no_tip = false;break ;
@@ -2375,15 +2372,11 @@ const struct intel_pt_state *intel_pt_decode(struct intel_pt_decoder *decoder) err =intel_pt_walk_tip (decoder);break ;case INTEL_PT_STATE_FUP : - decoder->pkt_state =INTEL_PT_STATE_IN_SYNC ; err =intel_pt_walk_fup (decoder);if (err == -EAGAIN ) err =intel_pt_walk_fup_tip (decoder); -else if (!err) - decoder->pkt_state =INTEL_PT_STATE_FUP ;break ;case INTEL_PT_STATE_FUP_NO_TIP : - decoder->pkt_state =INTEL_PT_STATE_IN_SYNC ; err =intel_pt_walk_fup (decoder);if (err == -EAGAIN ) err =intel_pt_walk_trace (decoder);
tools/testing/selftests/powerpc/ptrace/ptrace-pkey.c +27 -28
114 lines not on this page · raw message