Linux 5.4.249
Greg Kroah-Hartman
maintainerI'm announcing the release of the 5.4.249 kernel.
All users of the 5.4 kernel series must upgrade.
The updated 5.4.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.4.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
------------
Makefile | 2 arch/arm/boot/dts/am57xx-cl-som-am57x.dts | 2 arch/arm/boot/dts/at91sam9261ek.dts | 2 arch/arm/boot/dts/imx7d-pico-hobbit.dts | 2 arch/arm/boot/dts/imx7d-sdb.dts | 2 arch/arm/boot/dts/omap3-cm-t3x.dtsi | 2 arch/arm/boot/dts/omap3-devkit8000-lcd-common.dtsi | 2 arch/arm/boot/dts/omap3-lilly-a83x.dtsi | 2 arch/arm/boot/dts/omap3-overo-common-lcd35.dtsi | 2 arch/arm/boot/dts/omap3-overo-common-lcd43.dtsi | 2 arch/arm/boot/dts/omap3-pandora-common.dtsi | 2 arch/arm/boot/dts/omap5-cm-t54.dts | 2 arch/arm64/include/asm/sysreg.h | 6 arch/x86/kernel/apic/x2apic_phys.c | 5 arch/x86/mm/kaslr.c | 8 arch/x86/purgatory/Makefile | 5 drivers/gpu/drm/exynos/exynos_drm_g2d.c | 2 drivers/gpu/drm/exynos/exynos_drm_vidi.c | 2 drivers/gpu/drm/radeon/radeon_gem.c | 4 drivers/hid/wacom_sys.c | 7 drivers/hv/channel_mgmt.c | 18 drivers/i2c/busses/i2c-imx-lpi2c.c | 4 drivers/media/cec/cec-adap.c | 3 drivers/media/dvb-core/dvbdev.c | 88 ++ drivers/mmc/host/meson-gx-mmc.c | 10 drivers/mmc/host/mtk-sd.c | 2 drivers/mmc/host/mvsdio.c | 8 drivers/mmc/host/omap.c | 2 drivers/mmc/host/omap_hsmmc.c | 6 drivers/mmc/host/sdhci-acpi.c | 2 drivers/mmc/host/sh_mmcif.c | 2 drivers/mmc/host/usdhi6rol0.c | 6 drivers/net/dsa/mt7530.c | 2 drivers/net/ethernet/emulex/benet/be_main.c | 4 drivers/net/ethernet/qualcomm/qca_spi.c | 3 drivers/net/ieee802154/mac802154_hwsim.c | 6 drivers/net/phy/dp83867.c | 2 drivers/nfc/nfcsim.c | 4 drivers/pci/controller/pci-hyperv.c | 18 drivers/s390/cio/device.c | 5 drivers/target/iscsi/iscsi_target_nego.c | 4 drivers/usb/gadget/udc/amd5536udc_pci.c | 3 fs/cifs/dfs_cache.c | 701 +++++++++++---------- fs/eventpoll.c | 6 fs/nilfs2/page.c | 10 fs/nilfs2/segbuf.c | 6 fs/nilfs2/segment.c | 7 fs/nilfs2/super.c | 23 fs/nilfs2/the_nilfs.c | 44 + fs/xfs/xfs_log_recover.c | 10 include/linux/list.h | 20 include/linux/rcupdate.h | 18 include/media/dvbdev.h | 15 include/net/ip_tunnels.h | 12 include/trace/events/writeback.h | 2 kernel/cgroup/cgroup.c | 20 kernel/sched/wait.c | 2 kernel/time/tick-common.c | 13 kernel/time/tick-sched.c | 13 kernel/trace/trace.c | 11 kernel/trace/trace.h | 1 kernel/trace/trace_events.c | 2 mm/filemap.c | 135 ++-- mm/page-writeback.c | 8 net/ipv4/esp4_offload.c | 3 net/ipv6/esp6_offload.c | 3 net/netfilter/ipvs/ip_vs_xmit.c | 2 net/netfilter/nf_tables_api.c | 7 net/netfilter/nfnetlink_osf.c | 1 net/netfilter/xt_osf.c | 1 net/sched/sch_netem.c | 8 sound/soc/codecs/nau8824.c | 24 72 files changed, 892 insertions(+), 501 deletions(-)
Arınç ÜNAL (1):
net: dsa: mt7530: fix trapping frames on non-MT7621 SoC MT7530 switch
Benjamin Segall (1):
epoll: ep_autoremove_wake_function should use list_del_init_careful
Chen Aotian (1):
ieee802154: hwsim: Fix possible memory leaks
Clark Wang (1):
i2c: imx-lpi2c: fix type char overflow issue when calculating the clock cycle
Dan Carpenter (1):
usb: gadget: udc: fix NULL dereference in remove()
Darrick J. Wong (1):
xfs: verify buffer contents when we skip log replay
Denis Arefev (1):
HID: wacom: Add error check to wacom_parse_and_register()
Dexuan Cui (1):
PCI: hv: Fix a race condition bug in hv_pci_query_relations()
Dheeraj Kumar Srivastava (1):
x86/apic: Fix kernel panic when booting with intremap=off and x2apic_phys
Dinghao Liu (1):
media: dvbdev: Fix memleak in dvb_register_device
Edson Juliano Drosdeck (1):
ASoC: nau8824: Add quirk to active-high jack-detect
Eric Dumazet (1):
sch_netem: acquire qdisc lock in netem_change()
Francesco Dolcini (1):
Revert "net: phy: dp83867: perform soft reset and retain established link"
Greg Kroah-Hartman (1):
Linux 5.4.249
Hans Verkuil (1):
media: cec: core: don't set last_initiator if tx in progress
Hugh Dickins (1):
mm: fix VM_BUG_ON(PageTail) and BUG_ON(PageWriteback)
Hyunwoo Kim (1):
media: dvb-core: Fix use-after-free due to race at dvb_register_device()
Inki Dae (1):
drm/exynos: vidi: fix a wrong error return
Lee Jones (1):
x86/mm: Avoid using set_pgd() outside of real PGD pages
Linus Torvalds (3):
mm: rewrite wait_on_page_bit_common() logic
list: add "list_del_init_careful()" to go with "list_empty_careful()"
mm: make wait_on_page_writeback() wait for multiple pending writebacks
Linus Walleij (1):
ARM: dts: Fix erroneous ADS touchscreen polarities
Marc Zyngier (1):
arm64: Add missing Set/Way CMO encodings
Martin Hundebøll (1):
mmc: meson-gx: remove redundant mmc_request_done() call from irq context
Matthias May (1):
ip_tunnels: allow VXLAN/GENEVE to inherit TOS/TTL from VLAN
Maurizio Lombardi (1):
scsi: target: iscsi: Prevent login threads from racing between each other
Mauro Carvalho Chehab (1):
media: dvbdev: fix error logic at dvb_register_device()
Michael Kelley (1):
Drivers: hv: vmbus: Fix vmbus_wait_for_unload() to scan present CPUs
Min Li (2):
drm/exynos: fix race condition UAF in exynos_g2d_exec_ioctl drm/radeon: fix race condition UAF in radeon_gem_set_domain_ioctl
Osama Muhammad (1):
nfcsim.c: Fix error checking for debugfs_create_dir
Pablo Neira Ayuso (2):
netfilter: nf_tables: disallow element updates of bound anonymous sets
netfilter: nfnetlink_osf: fix module autoload
Paul E. McKenney (1):
rcu: Upgrade rcu_swap_protected() to rcu_replace_pointer()
Paulo Alcantara (SUSE) (5):
cifs: Clean up DFS referral cache
cifs: Get rid of kstrdup_const()'d paths
cifs: Introduce helpers for finding TCP connection
cifs: Merge is_path_valid() into get_normalized_path()
cifs: Fix potential deadlock when updating vol in cifs_reconnect()
Rafael Aquini (1):
writeback: fix dereferencing NULL mapping->host on writeback_page_template
Ricardo Ribalda (1):
x86/purgatory: remove PGO flags
Ross Lagerwall (1):
be2net: Extend xmit workaround to BE3 chip
Ryusuke Konishi (3):
nilfs2: reject devices with insufficient block count
nilfs2: fix buffer corruption due to concurrent device reads
nilfs2: prevent general protection fault in nilfs_clear_dirty_page()
Sebastian Andrzej Siewior (1):
xfrm: Linearize the skb after offloading if needed.
Sergey Shtylyov (7):
mmc: mtk-sd: fix deferred probing
mmc: mvsdio: fix deferred probing
mmc: omap: fix deferred probing
mmc: omap_hsmmc: fix deferred probing
mmc: sdhci-acpi: fix deferred probing
mmc: sh_mmcif: fix deferred probing
mmc: usdhi60rol0: fix deferred probing
Stefan Wahren (1):
net: qca_spi: Avoid high load if QCA7000 is not available
Steven Rostedt (Google) (1):
tracing: Add tracing_reset_all_online_cpus_unlocked() function
Terin Stock (1):
ipvs: align inner_mac_header for encapsulation
Thomas Gleixner (1):
tick/common: Align tick period during sched_timer setup
Vineeth Vijayan (1):
s390/cio: unregister device when the only path is gone
Xiu Jianfeng (1):
cgroup: Do not corrupt task iteration when rebinding subsystem
Yangtao Li (1):
mmc: mvsdio: convert to devm_platform_ioremap_resource
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 4 -SUBLEVEL = 248 +SUBLEVEL = 249 EXTRAVERSION = NAME = Kleptomaniac Octopus
arch/arm/boot/dts/am57xx-cl-som-am57x.dts +1 -1
@@ -527,7 +527,7 @@ interrupt-parent = <&gpio1>; interrupts = <31 0>; - pendown-gpio = <&gpio1 31 0>; + pendown-gpio = <&gpio1 31 GPIO_ACTIVE_LOW>; ti,x-min = /bits/ 16 <0x0>;
arch/arm/boot/dts/at91sam9261ek.dts +1 -1
@@ -156,7 +156,7 @@ compatible = "ti,ads7843"; interrupts-extended = <&pioC 2 IRQ_TYPE_EDGE_BOTH>; spi-max-frequency = <3000000>; - pendown-gpio = <&pioC 2 GPIO_ACTIVE_HIGH>; + pendown-gpio = <&pioC 2 GPIO_ACTIVE_LOW>; ti,x-min = /bits/ 16 <150>; ti,x-max = /bits/ 16 <3830>;
arch/arm/boot/dts/imx7d-pico-hobbit.dts +1 -1
@@ -64,7 +64,7 @@ interrupt-parent = <&gpio2>; interrupts = <7 0>; spi-max-frequency = <1000000>; - pendown-gpio = <&gpio2 7 0>; + pendown-gpio = <&gpio2 7 GPIO_ACTIVE_LOW>; vcc-supply = <®_3p3v>; ti,x-min = /bits/ 16 <0>; ti,x-max = /bits/ 16 <4095>;
arch/arm/boot/dts/imx7d-sdb.dts +1 -1
@@ -176,7 +176,7 @@ pinctrl-0 = <&pinctrl_tsc2046_pendown>; interrupt-parent = <&gpio2>; interrupts = <29 0>; - pendown-gpio = <&gpio2 29 GPIO_ACTIVE_HIGH>; + pendown-gpio = <&gpio2 29 GPIO_ACTIVE_LOW>; touchscreen-max-pressure = <255>; wakeup-source; };
arch/arm/boot/dts/omap3-cm-t3x.dtsi +1 -1
@@ -227,7 +227,7 @@ interrupt-parent = <&gpio2>; interrupts = <25 0>; /* gpio_57 */ - pendown-gpio = <&gpio2 25 GPIO_ACTIVE_HIGH>; + pendown-gpio = <&gpio2 25 GPIO_ACTIVE_LOW>; ti,x-min = /bits/ 16 <0x0>; ti,x-max = /bits/ 16 <0x0fff>;
arch/arm/boot/dts/omap3-devkit8000-lcd-common.dtsi +1 -1
@@ -54,7 +54,7 @@ interrupt-parent = <&gpio1>; interrupts = <27 0>; /* gpio_27 */ - pendown-gpio = <&gpio1 27 GPIO_ACTIVE_HIGH>; + pendown-gpio = <&gpio1 27 GPIO_ACTIVE_LOW>; ti,x-min = /bits/ 16 <0x0>; ti,x-max = /bits/ 16 <0x0fff>;
arch/arm/boot/dts/omap3-lilly-a83x.dtsi +1 -1
@@ -311,7 +311,7 @@ interrupt-parent = <&gpio1>; interrupts = <8 0>; /* boot6 / gpio_8 */ spi-max-frequency = <1000000>; - pendown-gpio = <&gpio1 8 GPIO_ACTIVE_HIGH>; + pendown-gpio = <&gpio1 8 GPIO_ACTIVE_LOW>; vcc-supply = <®_vcc3>; pinctrl-names = "default"; pinctrl-0 = <&tsc2048_pins>;
arch/arm/boot/dts/omap3-overo-common-lcd35.dtsi +1 -1
@@ -149,7 +149,7 @@ interrupt-parent = <&gpio4>; interrupts = <18 0>; /* gpio_114 */ - pendown-gpio = <&gpio4 18 GPIO_ACTIVE_HIGH>; + pendown-gpio = <&gpio4 18 GPIO_ACTIVE_LOW>; ti,x-min = /bits/ 16 <0x0>; ti,x-max = /bits/ 16 <0x0fff>;
arch/arm/boot/dts/omap3-overo-common-lcd43.dtsi +1 -1
@@ -160,7 +160,7 @@ interrupt-parent = <&gpio4>; interrupts = <18 0>; /* gpio_114 */ - pendown-gpio = <&gpio4 18 GPIO_ACTIVE_HIGH>; + pendown-gpio = <&gpio4 18 GPIO_ACTIVE_LOW>; ti,x-min = /bits/ 16 <0x0>; ti,x-max = /bits/ 16 <0x0fff>;
arch/arm/boot/dts/omap3-pandora-common.dtsi +1 -1
@@ -651,7 +651,7 @@ pinctrl-0 = <&penirq_pins>; interrupt-parent = <&gpio3>; interrupts = <30 IRQ_TYPE_NONE>; /* GPIO_94 */ - pendown-gpio = <&gpio3 30 GPIO_ACTIVE_HIGH>; + pendown-gpio = <&gpio3 30 GPIO_ACTIVE_LOW>; vcc-supply = <&vaux4>; ti,x-min = /bits/ 16 <0>;
arch/arm/boot/dts/omap5-cm-t54.dts +1 -1
@@ -354,7 +354,7 @@ interrupt-parent = <&gpio1>; interrupts = <15 0>; /* gpio1_wk15 */ - pendown-gpio = <&gpio1 15 GPIO_ACTIVE_HIGH>; + pendown-gpio = <&gpio1 15 GPIO_ACTIVE_LOW>; ti,x-min = /bits/ 16 <0x0>;
arch/arm64/include/asm/sysreg.h +6 -0
@@ -102,8 +102,14 @@#define SB_BARRIER_INSN __SYS_BARRIER_INSN(0, 7, 31)#define SYS_DC_ISW sys_insn(1, 0, 7, 6, 2) +#define SYS_DC_IGSW sys_insn(1, 0, 7, 6, 4) +#define SYS_DC_IGDSW sys_insn(1, 0, 7, 6, 6)#define SYS_DC_CSW sys_insn(1, 0, 7, 10, 2) +#define SYS_DC_CGSW sys_insn(1, 0, 7, 10, 4) +#define SYS_DC_CGDSW sys_insn(1, 0, 7, 10, 6)#define SYS_DC_CISW sys_insn(1, 0, 7, 14, 2) +#define SYS_DC_CIGSW sys_insn(1, 0, 7, 14, 4) +#define SYS_DC_CIGDSW sys_insn(1, 0, 7, 14, 6)#define SYS_OSDTRRX_EL1 sys_reg(2, 0, 0, 0, 2)#define SYS_MDCCINT_EL1 sys_reg(2, 0, 0, 2, 0)
arch/x86/kernel/apic/x2apic_phys.c +4 -1
@@ -97,7 +97,10 @@ static void init_x2apic_ldr(void)static int x2apic_phys_probe (void ) { -if (x2apic_mode && (x2apic_phys ||x2apic_fadt_phys ())) +if (!x2apic_mode) +return 0 ; + +if (x2apic_phys ||x2apic_fadt_phys ())return 1 ;return apic == &apic_x2apic_phys;
arch/x86/mm/kaslr.c +4 -4
@@ -182,11 +182,11 @@ static void __meminit init_trampoline_pud(void)set_p4d (p4d_tramp,__p4d (_KERNPG_TABLE |__pa (pud_page_tramp))); -set_pgd (&trampoline_pgd_entry, -__pgd (_KERNPG_TABLE |__pa (p4d_page_tramp))); + trampoline_pgd_entry = +__pgd (_KERNPG_TABLE |__pa (p4d_page_tramp)); }else { -set_pgd (&trampoline_pgd_entry, -__pgd (_KERNPG_TABLE |__pa (pud_page_tramp))); + trampoline_pgd_entry = +__pgd (_KERNPG_TABLE |__pa (pud_page_tramp)); } }
arch/x86/purgatory/Makefile +5 -0
@@ -14,6 +14,11 @@ $(obj)/sha256.o: $(srctree)/lib/crypto/sha256.c FORCE CFLAGS_sha256.o := -D__DISABLE_EXPORTS +# When profile-guided optimization is enabled, llvm emits two different +# overlapping text sections, which is not supported by kexec. Remove profile +# optimization flags. +KBUILD_CFLAGS := $(filter-out -fprofile-sample-use=% -fprofile-use=%,$(KBUILD_CFLAGS)) + LDFLAGS_purgatory.ro := -e purgatory_start -r --no-undefined -nostdlib -z nodefaultlib targets += purgatory.ro
drivers/gpu/drm/exynos/exynos_drm_g2d.c +1 -1
@@ -1332,7 +1332,7 @@ int exynos_g2d_exec_ioctl(struct drm_device *drm_dev, void *data,/* Let the runqueue know that there is work to do. */ queue_work (g2d->g2d_workq, &g2d->runqueue_work); -if (runqueue_node->async) +if (req->async) goto out;wait_for_completion (&runqueue_node->complete);
drivers/gpu/drm/exynos/exynos_drm_vidi.c +0 -2
@@ -483,8 +483,6 @@ static int vidi_remove(struct platform_device *pdev)if (ctx->raw_edid != (struct edid *)fake_edid_info) {kfree (ctx->raw_edid); ctx->raw_edid =NULL ; - -return -EINVAL ; }component_del (&pdev->dev, &vidi_component_ops);
drivers/gpu/drm/radeon/radeon_gem.c +1 -3
@@ -384,7 +384,6 @@ int radeon_gem_set_domain_ioctl(struct drm_device *dev, void *data,struct radeon_device *rdev = dev->dev_private;struct drm_radeon_gem_set_domain *args = data;struct drm_gem_object *gobj; -struct radeon_bo *robj;int r;/* for now if someone requests domain CPU -
@@ -397,13 +396,12 @@ int radeon_gem_set_domain_ioctl(struct drm_device *dev, void *data,up_read (&rdev->exclusive_lock);return -ENOENT ; } - robj =gem_to_radeon_bo (gobj); r =radeon_gem_set_domain (gobj, args->read_domains, args->write_domain);drm_gem_object_put_unlocked (gobj);up_read (&rdev->exclusive_lock); - r =radeon_gem_handle_lockup (robj->rdev, r); + r =radeon_gem_handle_lockup (rdev, r);return r; }
drivers/hid/wacom_sys.c +6 -1
@@ -2419,8 +2419,13 @@ static int wacom_parse_and_register(struct wacom *wacom, bool wireless) goto fail_quirks; } -if (features->device_type &WACOM_DEVICETYPE_WL_MONITOR ) +if (features->device_type &WACOM_DEVICETYPE_WL_MONITOR ) { error =hid_hw_open (hdev); +if (error) { +hid_err (hdev,"hw open failed\n" ); + goto fail_quirks; + } + }wacom_set_shared_values (wacom_wac);devres_close_group (&hdev->dev, wacom);
drivers/hv/channel_mgmt.c +16 -2
@@ -802,11 +802,22 @@ static void vmbus_wait_for_unload(void)if (completion_done (&vmbus_connection.unload_event)) goto completed; -for_each_online_cpu (cpu) { +for_each_present_cpu (cpu) {struct hv_per_cpu_context *hv_cpu =per_cpu_ptr (hv_context.cpu_context, cpu); +/* +* In a CoCo VM the synic_message_page is not allocated +* in hv_synic_alloc(). Instead it is set/cleared in +* hv_synic_enable_regs() and hv_synic_disable_regs() +* such that it is set only when the CPU is online. If +* not all present CPUs are online, the message page +* might be NULL, so skip such CPUs. +*/ page_addr = hv_cpu->synic_message_page; +if (!page_addr) +continue ; + msg = (struct hv_message *)page_addr +VMBUS_MESSAGE_SINT ;
@@ -840,11 +851,14 @@ static void vmbus_wait_for_unload(void)* maybe-pending messages on all CPUs to be able to receive new * messages after we reconnect. */ -for_each_online_cpu (cpu) { +for_each_present_cpu (cpu) {struct hv_per_cpu_context *hv_cpu =per_cpu_ptr (hv_context.cpu_context, cpu); page_addr = hv_cpu->synic_message_page; +if (!page_addr) +continue ; + msg = (struct hv_message *)page_addr +VMBUS_MESSAGE_SINT ; msg->header.message_type =HVMSG_NONE ; }
drivers/i2c/busses/i2c-imx-lpi2c.c +2 -2
@@ -206,8 +206,8 @@ static void lpi2c_imx_stop(struct lpi2c_imx_struct *lpi2c_imx)/* CLKLO = I2C_CLK_RATIO * CLKHI, SETHOLD = CLKHI, DATAVD = CLKHI/2 */ static int lpi2c_imx_config (struct lpi2c_imx_struct *lpi2c_imx) { -u8 prescale, filt, sethold, clkhi, clklo, datavd; -unsigned int clk_rate, clk_cycle; +u8 prescale, filt, sethold, datavd; +unsigned int clk_rate, clk_cycle, clkhi, clklo;enum lpi2c_imx_pincfg pincfg;unsigned int temp;
drivers/media/cec/cec-adap.c +2 -1
@@ -1077,7 +1077,8 @@ void cec_received_msg_ts(struct cec_adapter *adap,mutex_lock (&adap->lock);dprintk (2 ,"%s: %*ph\n" , __func__, msg->len, msg->msg); - adap->last_initiator =0xff ; +if (!adap->transmit_in_progress) + adap->last_initiator =0xff ;/* Check if this message was for us (directed or broadcast). */ if (!cec_msg_is_broadcast (msg))
drivers/media/dvb-core/dvbdev.c +68 -20
177 lines not on this page · raw message
drivers/mmc/host/meson-gx-mmc.c +2 -8
@@ -973,11 +973,8 @@ static irqreturn_t meson_mmc_irq(int irq, void *dev_id)if (status & (IRQ_END_OF_CHAIN |IRQ_RESP_STATUS )) {if (data && !cmd->error) data->bytes_xfered = data->blksz * data->blocks; -if (meson_mmc_bounce_buf_read (data) || -meson_mmc_get_next_command (cmd)) - ret =IRQ_WAKE_THREAD ; -else - ret =IRQ_HANDLED ; + +return IRQ_WAKE_THREAD ; } out:
@@ -989,9 +986,6 @@ static irqreturn_t meson_mmc_irq(int irq, void *dev_id)writel (start, host->regs +SD_EMMC_START ); } -if (ret ==IRQ_HANDLED ) -meson_mmc_request_done (host->mmc, cmd->mrq); -return ret; }
drivers/mmc/host/mtk-sd.c +1 -1
@@ -2249,7 +2249,7 @@ static int msdc_drv_probe(struct platform_device *pdev) host->irq =platform_get_irq (pdev,0 );if (host->irq <0 ) { - ret = -EINVAL ; + ret = host->irq; goto host_free; }
drivers/mmc/host/mvsdio.c +3 -5
@@ -696,17 +696,15 @@ static int mvsd_probe(struct platform_device *pdev)struct mmc_host *mmc =NULL ;struct mvsd_host *host =NULL ;const struct mbus_dram_target_info *dram; -struct resource *r;int ret, irq;if (!np) {dev_err (&pdev->dev,"no DT node\n" );return -ENODEV ; } - r =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); irq =platform_get_irq (pdev,0 ); -if (!r || irq <0 ) -return -ENXIO ; +if (irq <0 ) +return irq; mmc =mmc_alloc_host (sizeof (struct mvsd_host ), &pdev->dev);if (!mmc) {
@@ -758,7 +756,7 @@ static int mvsd_probe(struct platform_device *pdev)spin_lock_init (&host->lock); - host->base =devm_ioremap_resource (&pdev->dev, r); + host->base =devm_platform_ioremap_resource (pdev,0 );if (IS_ERR (host->base)) { ret =PTR_ERR (host->base); goto out;
drivers/mmc/host/omap.c +1 -1
@@ -1344,7 +1344,7 @@ static int mmc_omap_probe(struct platform_device *pdev) irq =platform_get_irq (pdev,0 );if (irq <0 ) -return -ENXIO ; +return irq; res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); host->virt_base =devm_ioremap_resource (&pdev->dev, res);
drivers/mmc/host/omap_hsmmc.c +4 -2
@@ -1843,9 +1843,11 @@ static int omap_hsmmc_probe(struct platform_device *pdev) } res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); - irq =platform_get_irq (pdev,0 ); -if (res ==NULL || irq <0 ) +if (!res)return -ENXIO ; + irq =platform_get_irq (pdev,0 ); +if (irq <0 ) +return irq; base =devm_ioremap_resource (&pdev->dev, res);if (IS_ERR (base))
drivers/mmc/host/sdhci-acpi.c +1 -1
@@ -835,7 +835,7 @@ static int sdhci_acpi_probe(struct platform_device *pdev) host->ops = &sdhci_acpi_ops_dflt; host->irq =platform_get_irq (pdev,0 );if (host->irq <0 ) { - err = -EINVAL ; + err = host->irq; goto err_free; }
drivers/mmc/host/sh_mmcif.c +1 -1
@@ -1395,7 +1395,7 @@ static int sh_mmcif_probe(struct platform_device *pdev) irq[0 ] =platform_get_irq (pdev,0 ); irq[1 ] =platform_get_irq_optional (pdev,1 );if (irq[0 ] <0 ) -return -ENXIO ; +return irq[0 ]; res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); reg =devm_ioremap_resource (dev, res);
drivers/mmc/host/usdhi6rol0.c +4 -2
@@ -1743,8 +1743,10 @@ static int usdhi6_probe(struct platform_device *pdev) irq_cd =platform_get_irq_byname (pdev,"card detect" ); irq_sd =platform_get_irq_byname (pdev,"data" ); irq_sdio =platform_get_irq_byname (pdev,"SDIO" ); -if (irq_sd <0 || irq_sdio <0 ) -return -ENODEV ; +if (irq_sd <0 ) +return irq_sd; +if (irq_sdio <0 ) +return irq_sdio; mmc =mmc_alloc_host (sizeof (struct usdhi6_host ), dev);if (!mmc)
drivers/net/dsa/mt7530.c +1 -1
@@ -644,7 +644,7 @@ mt7530_cpu_port_enable(struct mt7530_priv *priv,mt7530_rmw (priv,MT7530_MFC ,UNM_FFP_MASK ,UNM_FFP (BIT (port)));/* Set CPU port number */ -if (priv->id ==ID_MT7621 ) +if (priv->id ==ID_MT7530 || priv->id ==ID_MT7621 )mt7530_rmw (priv,MT7530_MFC ,CPU_MASK ,CPU_EN |CPU_PORT (port));/* CPU port gets connected to all user ports of
drivers/net/ethernet/emulex/benet/be_main.c +2 -2
@@ -1137,8 +1137,8 @@ static struct sk_buff *be_lancer_xmit_workarounds(struct be_adapter *adapter, eth_hdr_len =ntohs (skb->protocol) ==ETH_P_8021Q ?VLAN_ETH_HLEN :ETH_HLEN ;if (skb->len <=60 && - (lancer_chip (adapter) ||skb_vlan_tag_present (skb)) && -is_ipv4_pkt (skb)) { + (lancer_chip (adapter) ||BE3_chip (adapter) || +skb_vlan_tag_present (skb)) &&is_ipv4_pkt (skb)) { ip = (struct iphdr *)ip_hdr (skb);pskb_trim (skb, eth_hdr_len +ntohs (ip->tot_len)); }
drivers/net/ethernet/qualcomm/qca_spi.c +1 -2
@@ -574,8 +574,7 @@ qcaspi_spi_thread(void *data)while (!kthread_should_stop ()) {set_current_state (TASK_INTERRUPTIBLE );if ((qca->intr_req == qca->intr_svc) && - (qca->txr.skb[qca->txr.head] ==NULL ) && - (qca->sync ==QCASPI_SYNC_READY )) + !qca->txr.skb[qca->txr.head])schedule ();set_current_state (TASK_RUNNING );
drivers/net/ieee802154/mac802154_hwsim.c +4 -2
@@ -522,7 +522,7 @@ static int hwsim_del_edge_nl(struct sk_buff *msg, struct genl_info *info)static int hwsim_set_edge_lqi (struct sk_buff *msg,struct genl_info *info) {struct nlattr *edge_attrs[MAC802154_HWSIM_EDGE_ATTR_MAX +1 ]; -struct hwsim_edge_info *einfo; +struct hwsim_edge_info *einfo, *einfo_old;struct hwsim_phy *phy_v0;struct hwsim_edge *e;u32 v0, v1;
@@ -560,8 +560,10 @@ static int hwsim_set_edge_lqi(struct sk_buff *msg, struct genl_info *info)list_for_each_entry_rcu (e, &phy_v0->edges, list) {if (e->endpoint->idx == v1) { einfo->lqi = lqi; -rcu_assign_pointer (e->info, einfo); + einfo_old =rcu_replace_pointer (e->info, einfo, +lockdep_is_held (&hwsim_phys_lock));rcu_read_unlock (); +kfree_rcu (einfo_old, rcu);mutex_unlock (&hwsim_phys_lock);return 0 ; }
drivers/net/phy/dp83867.c +1 -1
@@ -476,7 +476,7 @@ static int dp83867_phy_reset(struct phy_device *phydev) {int err; - err =phy_write (phydev,DP83867_CTRL ,DP83867_SW_RESTART ); + err =phy_write (phydev,DP83867_CTRL ,DP83867_SW_RESET );if (err <0 )return err;
drivers/nfc/nfcsim.c +0 -4
@@ -336,10 +336,6 @@ static struct dentry *nfcsim_debugfs_root;static void nfcsim_debugfs_init (void ) { nfcsim_debugfs_root =debugfs_create_dir ("nfcsim" ,NULL ); - -if (!nfcsim_debugfs_root) -pr_err ("Could not create debugfs entry\n" ); - }static void nfcsim_debugfs_remove (void )
drivers/pci/controller/pci-hyperv.c +18 -0
@@ -2739,6 +2739,24 @@ static int hv_pci_query_relations(struct hv_device *hdev)if (!ret) ret =wait_for_response (hdev, &comp); +/* +* In the case of fast device addition/removal, it's possible that +* vmbus_sendpacket() or wait_for_response() returns -ENODEV but we +* already got a PCI_BUS_RELATIONS* message from the host and the +* channel callback already scheduled a work to hbus->wq, which can be +* running pci_devices_present_work() -> survey_child_resources() -> +* complete(&hbus->survey_event), even after hv_pci_query_relations() +* exits and the stack variable 'comp' is no longer valid; as a result, +* a hang or a page fault may happen when the complete() calls +* raw_spin_lock_irqsave(). Flush hbus->wq before we exit from +* hv_pci_query_relations() to avoid the issues. Note: if 'ret' is +* -ENODEV, there can't be any more work item scheduled to hbus->wq +* after the flush_workqueue(): see vmbus_onoffer_rescind() -> +* vmbus_reset_channel_cb(), vmbus_rescind_cleanup() -> +* channel->rescind = true. +*/ +flush_workqueue (hbus->wq); +return ret; }
drivers/s390/cio/device.c +4 -1
@@ -1385,6 +1385,7 @@ void ccw_device_set_notoper(struct ccw_device *cdev)enum io_sch_action {IO_SCH_UNREG ,IO_SCH_ORPH_UNREG , +IO_SCH_UNREG_CDEV ,IO_SCH_ATTACH ,IO_SCH_UNREG_ATTACH ,IO_SCH_ORPH_ATTACH ,
@@ -1417,7 +1418,7 @@ static enum io_sch_action sch_get_action(struct subchannel *sch) }if ((sch->schib.pmcw.pam & sch->opm) ==0 ) {if (ccw_device_notify (cdev,CIO_NO_PATH ) !=NOTIFY_OK ) -return IO_SCH_UNREG ; +return IO_SCH_UNREG_CDEV ;return IO_SCH_DISC ; }if (device_is_disconnected (cdev))
@@ -1479,6 +1480,7 @@ static int io_subchannel_sch_event(struct subchannel *sch, int process)case IO_SCH_ORPH_ATTACH :ccw_device_set_disconnected (cdev);break ; +case IO_SCH_UNREG_CDEV :case IO_SCH_UNREG_ATTACH :case IO_SCH_UNREG :if (!cdev)
@@ -1512,6 +1514,7 @@ static int io_subchannel_sch_event(struct subchannel *sch, int process)if (rc) goto out;break ; +case IO_SCH_UNREG_CDEV :case IO_SCH_UNREG_ATTACH :spin_lock_irqsave (sch->lock, flags);if (cdev->private->flags.resuming) {
drivers/target/iscsi/iscsi_target_nego.c +3 -1
@@ -1053,6 +1053,7 @@ int iscsi_target_locate_portal(iscsi_target_set_sock_callbacks (conn); login->np = np; + conn->tpg =NULL ; login_req = (struct iscsi_login_req *) login->req; payload_length =ntoh24 (login_req->dlength);
@@ -1122,7 +1123,6 @@ int iscsi_target_locate_portal(*/ sessiontype =strncmp (s_buf,DISCOVERY ,9 );if (!sessiontype) { - conn->tpg = iscsit_global->discovery_tpg;if (!login->leading_connection) goto get_target;
@@ -1139,9 +1139,11 @@ int iscsi_target_locate_portal(* Serialize access across the discovery struct iscsi_portal_group to * process login attempt. */ + conn->tpg = iscsit_global->discovery_tpg;if (iscsit_access_np (np, conn->tpg) <0 ) {iscsit_tx_login_rsp (conn,ISCSI_STATUS_CLS_TARGET_ERR ,ISCSI_LOGIN_STATUS_SVC_UNAVAILABLE ); + conn->tpg =NULL ; ret =-1 ; goto out; }
drivers/usb/gadget/udc/amd5536udc_pci.c +3 -0
@@ -171,6 +171,9 @@ static int udc_pci_probe( retval = -ENODEV ; goto err_probe; } + + udc = dev; +return 0 ; err_probe:
fs/cifs/dfs_cache.c +372 -329
1,307 lines not on this page · raw message
fs/eventpoll.c +5 -1
@@ -1814,7 +1814,11 @@ static int ep_autoremove_wake_function(struct wait_queue_entry *wq_entry, {int ret =default_wake_function (wq_entry, mode, sync, key); -list_del_init (&wq_entry->entry); +/* +* Pairs with list_empty_careful in ep_poll, and ensures future loop +* iterations see the cause of this wakeup. +*/ +list_del_init_careful (&wq_entry->entry);return ret; }
fs/nilfs2/page.c +9 -1
@@ -370,7 +370,15 @@ void nilfs_clear_dirty_pages(struct address_space *mapping, bool silent)struct page *page = pvec.pages[i];lock_page (page); -nilfs_clear_dirty_page (page, silent); + +/* +* This page may have been removed from the address +* space by truncation or invalidation when the lock +* was acquired. Skip processing in that case. +*/ +if (likely (page->mapping == mapping)) +nilfs_clear_dirty_page (page, silent); +unlock_page (page); }pagevec_release (&pvec);
fs/nilfs2/segbuf.c +6 -0
@@ -101,6 +101,12 @@ int nilfs_segbuf_extend_segsum(struct nilfs_segment_buffer *segbuf)if (unlikely (!bh))return -ENOMEM ; +lock_buffer (bh); +if (!buffer_uptodate (bh)) { +memset (bh->b_data,0 , bh->b_size); +set_buffer_uptodate (bh); + } +unlock_buffer (bh);nilfs_segbuf_add_segsum_buffer (segbuf, bh);return 0 ; }
fs/nilfs2/segment.c +7 -0
@@ -984,10 +984,13 @@ static void nilfs_segctor_fill_in_super_root(struct nilfs_sc_info *sci,unsigned int isz, srsz; bh_sr =NILFS_LAST_SEGBUF (&sci->sc_segbufs)->sb_super_root; + +lock_buffer (bh_sr); raw_sr = (struct nilfs_super_root *)bh_sr->b_data; isz = nilfs->ns_inode_size; srsz =NILFS_SR_BYTES (isz); + raw_sr->sr_sum =0 ;/* Ensure initialization within this update */ raw_sr->sr_bytes =cpu_to_le16 (srsz); raw_sr->sr_nongc_ctime = cpu_to_le64(nilfs_doing_gc() ?
@@ -1001,6 +1004,8 @@ static void nilfs_segctor_fill_in_super_root(struct nilfs_sc_info *sci,nilfs_write_inode_common (nilfs->ns_sufile, (void *)raw_sr +NILFS_SR_SUFILE_OFFSET (isz),1 );memset ((void *)raw_sr + srsz,0 , nilfs->ns_blocksize - srsz); +set_buffer_uptodate (bh_sr); +unlock_buffer (bh_sr); }static void nilfs_redirty_inodes (struct list_head *head)
@@ -1778,6 +1783,7 @@ static void nilfs_abort_logs(struct list_head *logs, int err)list_for_each_entry (segbuf, logs, sb_list) {list_for_each_entry (bh, &segbuf->sb_segsum_buffers, b_assoc_buffers) { +clear_buffer_uptodate (bh);if (bh->b_page != bd_page) {if (bd_page)end_page_writeback (bd_page);
@@ -1789,6 +1795,7 @@ static void nilfs_abort_logs(struct list_head *logs, int err) b_assoc_buffers) {clear_buffer_async_write (bh);if (bh == segbuf->sb_super_root) { +clear_buffer_uptodate (bh);if (bh->b_page != bd_page) {end_page_writeback (bd_page); bd_page = bh->b_page;
fs/nilfs2/super.c +22 -1
@@ -367,10 +367,31 @@ static int nilfs_move_2nd_super(struct super_block *sb, loff_t sb2off) goto out; } nsbp = (void *)nsbh->b_data + offset; -memset (nsbp,0 , nilfs->ns_blocksize); +lock_buffer (nsbh);if (sb2i >=0 ) { +/* +* The position of the second superblock only changes by 4KiB, +* which is larger than the maximum superblock data size +* (= 1KiB), so there is no need to use memmove() to allow +* overlap between source and destination. +*/ memcpy (nsbp, nilfs->ns_sbp[sb2i], nilfs->ns_sbsize); + +/* +* Zero fill after copy to avoid overwriting in case of move +* within the same block. +*/ +memset (nsbh->b_data,0 , offset); +memset ((void *)nsbp + nilfs->ns_sbsize,0 , + nsbh->b_size - offset - nilfs->ns_sbsize); + }else { +memset (nsbh->b_data,0 , nsbh->b_size); + } +set_buffer_uptodate (nsbh); +unlock_buffer (nsbh); + +if (sb2i >=0 ) {brelse (nilfs->ns_sbh[sb2i]); nilfs->ns_sbh[sb2i] = nsbh; nilfs->ns_sbp[sb2i] = nsbp;
fs/nilfs2/the_nilfs.c +43 -1
62 lines not on this page · raw message
fs/xfs/xfs_log_recover.c +10 -0
@@ -2783,6 +2783,16 @@ xlog_recover_buffer_pass2(if (lsn && lsn !=-1 &&XFS_LSN_CMP (lsn, current_lsn) >=0 ) {trace_xfs_log_recover_buf_skip (log, buf_f);xlog_recover_validate_buf_type (mp, bp, buf_f,NULLCOMMITLSN ); + +/* +* We're skipping replay of this buffer log item due to the log +* item LSN being behind the ondisk buffer. Verify the buffer +* contents since we aren't going to run the write verifier. +*/ +if (bp->b_ops) { + bp->b_ops->verify_read (bp); + error = bp->b_error; + } goto out_release; }
include/linux/list.h +19 -1
@@ -268,6 +268,24 @@ static inline int list_empty(const struct list_head *head)return READ_ONCE (head->next) == head; } +/** +* list_del_init_careful - deletes entry from list and reinitialize it. +* @entry: the element to delete from the list. +* +* This is the same as list_del_init(), except designed to be used +* together with list_empty_careful() in a way to guarantee ordering +* of other memory operations. +* +* Any memory operations done before a list_del_init_careful() are +* guaranteed to be visible after a list_empty_careful() test. +*/ +static inline void list_del_init_careful (struct list_head *entry) +{ +__list_del_entry (entry); + entry->prev = entry; +smp_store_release (&entry->next, entry); +} +/** * list_empty_careful - tests whether a list is empty and not being modified * @head: the list to test
@@ -283,7 +301,7 @@ static inline int list_empty(const struct list_head *head)*/ static inline int list_empty_careful (const struct list_head *head) { -struct list_head *next = head->next; +struct list_head *next =smp_load_acquire (&head->next);return (next == head) && (next == head->prev); }
include/linux/rcupdate.h +18 -0
@@ -384,6 +384,24 @@ do { \smp_store_release (&p,RCU_INITIALIZER ((typeof (p ))_r_a_p__v)); \ }while (0 ) +/** +* rcu_replace_pointer() - replace an RCU pointer, returning its old value +* @rcu_ptr: RCU pointer, whose old value is returned +* @ptr: regular pointer +* @c: the lockdep conditions under which the dereference will take place +* +* Perform a replacement, where @rcu_ptr is an RCU-annotated +* pointer and @c is the lockdep argument that is passed to the +* rcu_dereference_protected() call used to read that pointer. The old +* value of @rcu_ptr is returned, and @rcu_ptr is set to @ptr. +*/ +#define rcu_replace_pointer(rcu_ptr, ptr, c) \ +({ \ +typeof (ptr) __tmp =rcu_dereference_protected ((rcu_ptr), (c)); \ +rcu_assign_pointer ((rcu_ptr), (ptr)); \ +__tmp ; \ +}) +/** * rcu_swap_protected() - swap an RCU and a regular pointer * @rcu_ptr: RCU pointer
include/media/dvbdev.h +15 -0
@@ -189,6 +189,21 @@ struct dvb_device {void *priv; }; +/** +* struct dvbdevfops_node - fops nodes registered in dvbdevfops_list +* +* @fops: Dynamically allocated fops for ->owner registration +* @type: type of dvb_device +* @template: dvb_device used for registration +* @list_head: list_head for dvbdevfops_list +*/ +struct dvbdevfops_node { +struct file_operations *fops; +enum dvb_device_type type; +const struct dvb_device *template; +struct list_head list_head; +}; +/** * dvb_device_get - Increase dvb_device reference *
include/net/ip_tunnels.h +8 -4
@@ -374,9 +374,11 @@ static inline int ip_tunnel_encap(struct sk_buff *skb, struct ip_tunnel *t,static inline u8 ip_tunnel_get_dsfield (const struct iphdr *iph,const struct sk_buff *skb) { -if (skb->protocol ==htons (ETH_P_IP )) +__be16 payload_protocol =skb_protocol (skb, true); + +if (payload_protocol ==htons (ETH_P_IP ))return iph->tos; -else if (skb->protocol ==htons (ETH_P_IPV6 )) +else if (payload_protocol ==htons (ETH_P_IPV6 ))return ipv6_get_dsfield ((const struct ipv6hdr *)iph);else return 0 ;
@@ -385,9 +387,11 @@ static inline u8 ip_tunnel_get_dsfield(const struct iphdr *iph,static inline u8 ip_tunnel_get_ttl (const struct iphdr *iph,const struct sk_buff *skb) { -if (skb->protocol ==htons (ETH_P_IP )) +__be16 payload_protocol =skb_protocol (skb, true); + +if (payload_protocol ==htons (ETH_P_IP ))return iph->ttl; -else if (skb->protocol ==htons (ETH_P_IPV6 )) +else if (payload_protocol ==htons (ETH_P_IPV6 ))return ((const struct ipv6hdr *)iph)->hop_limit;else return 0 ;
include/trace/events/writeback.h +1 -1
@@ -68,7 +68,7 @@ DECLARE_EVENT_CLASS(writeback_page_template,strscpy_pad (__entry->name,bdi_dev_name (mapping ?inode_to_bdi (mapping->host) :NULL ),32 ); - __entry->ino = mapping ? mapping->host->i_ino :0 ; + __entry->ino = (mapping && mapping->host) ? mapping->host->i_ino :0 ; __entry->index = page->index; ),
kernel/cgroup/cgroup.c +17 -3
@@ -1723,7 +1723,7 @@ int rebind_subsystems(struct cgroup_root *dst_root, u16 ss_mask) {struct cgroup *dcgrp = &dst_root->cgrp;struct cgroup_subsys *ss; -int ssid, i, ret; +int ssid, ret;u16 dfl_disable_ss_mask =0 ;lockdep_assert_held (&cgroup_mutex);
@@ -1767,7 +1767,8 @@ int rebind_subsystems(struct cgroup_root *dst_root, u16 ss_mask)struct cgroup_root *src_root = ss->root;struct cgroup *scgrp = &src_root->cgrp;struct cgroup_subsys_state *css =cgroup_css (scgrp, ss); -struct css_set *cset; +struct css_set *cset, *cset_pos; +struct css_task_iter *it;WARN_ON (!css ||cgroup_css (dcgrp, ss));
@@ -1785,9 +1786,22 @@ int rebind_subsystems(struct cgroup_root *dst_root, u16 ss_mask) css->cgroup = dcgrp;spin_lock_irq (&css_set_lock); -hash_for_each (css_set_table, i, cset, hlist) +WARN_ON (!list_empty (&dcgrp->e_csets[ss->id])); +list_for_each_entry_safe (cset, cset_pos, &scgrp->e_csets[ss->id], + e_cset_node[ss->id]) {list_move_tail (&cset->e_cset_node[ss->id], &dcgrp->e_csets[ss->id]); +/* +* all css_sets of scgrp together in same order to dcgrp, +* patch in-flight iterators to preserve correct iteration. +* since the iterator is always advanced right away and +* finished when it->cset_pos meets it->cset_head, so only +* update it->cset_head is enough here. +*/ +list_for_each_entry (it, &cset->task_iters, iters_node) +if (it->cset_head == &scgrp->e_csets[ss->id]) + it->cset_head = &dcgrp->e_csets[ss->id]; + }spin_unlock_irq (&css_set_lock);/* default hierarchy doesn't enable controllers by default */
kernel/sched/wait.c +1 -1
@@ -384,7 +384,7 @@ int autoremove_wake_function(struct wait_queue_entry *wq_entry, unsigned mode, iint ret =default_wake_function (wq_entry, mode, sync, key);if (ret) -list_del_init (&wq_entry->entry); +list_del_init_careful (&wq_entry->entry);return ret; }
kernel/time/tick-common.c +1 -12
@@ -216,19 +216,8 @@ static void tick_setup_device(struct tick_device *td,* this cpu: */ if (tick_do_timer_cpu ==TICK_DO_TIMER_BOOT ) { -ktime_t next_p; -u32 rem; - tick_do_timer_cpu = cpu; - - next_p =ktime_get (); -div_u64_rem (next_p,TICK_NSEC , &rem); -if (rem) { - next_p -= rem; - next_p +=TICK_NSEC ; - } - - tick_next_period = next_p; + tick_next_period =ktime_get ();#ifdef CONFIG_NO_HZ_FULL /* * The boot CPU may be nohz_full, in which case set
kernel/time/tick-sched.c +12 -1
@@ -129,8 +129,19 @@ static ktime_t tick_init_jiffy_update(void)raw_spin_lock (&jiffies_lock);write_seqcount_begin (&jiffies_seq);/* Did we start the jiffies update yet ? */ -if (last_jiffies_update ==0 ) +if (last_jiffies_update ==0 ) { +u32 rem; + +/* +* Ensure that the tick is aligned to a multiple of +* TICK_NSEC. +*/ +div_u64_rem (tick_next_period,TICK_NSEC , &rem); +if (rem) + tick_next_period +=TICK_NSEC - rem; + last_jiffies_update = tick_next_period; + } period = last_jiffies_update;write_seqcount_end (&jiffies_seq);raw_spin_unlock (&jiffies_lock);
kernel/trace/trace.c +10 -1
@@ -1931,10 +1931,12 @@ void tracing_reset_online_cpus(struct trace_buffer *buf) }/* Must have trace_types_lock held */ -void tracing_reset_all_online_cpus (void ) +void tracing_reset_all_online_cpus_unlocked (void ) {struct trace_array *tr; +lockdep_assert_held (&trace_types_lock); +list_for_each_entry (tr, &ftrace_trace_arrays, list) {if (!tr->clear_trace)continue ;
@@ -1946,6 +1948,13 @@ void tracing_reset_all_online_cpus(void) } } +void tracing_reset_all_online_cpus (void ) +{ +mutex_lock (&trace_types_lock); +tracing_reset_all_online_cpus_unlocked (); +mutex_unlock (&trace_types_lock); +} +/* * The tgid_map array maps from pid to tgid; i.e. the value stored at index i * is the tgid last observed corresponding to pid=i.
kernel/trace/trace.h +1 -0
@@ -677,6 +677,7 @@ int tracing_is_enabled(void);void tracing_reset_online_cpus (struct trace_buffer *buf);void tracing_reset_current (int cpu);void tracing_reset_all_online_cpus (void ); +void tracing_reset_all_online_cpus_unlocked (void );int tracing_open_generic (struct inode *inode,struct file *filp);int tracing_open_generic_tr (struct inode *inode,struct file *filp);bool tracing_is_disabled (void );
kernel/trace/trace_events.c +1 -1
@@ -2440,7 +2440,7 @@ static void trace_module_remove_events(struct module *mod)* over from this module may be passed to the new module events and * unexpected results may occur. */ -tracing_reset_all_online_cpus (); +tracing_reset_all_online_cpus_unlocked (); } static int trace_module_notify(struct notifier_block *self,
mm/filemap.c +88 -47
193 lines not on this page · raw message
mm/page-writeback.c +1 -7
@@ -2746,12 +2746,6 @@ int test_clear_page_writeback(struct page *page) }else { ret =TestClearPageWriteback (page); } -/* -* NOTE: Page might be free now! Writeback doesn't hold a page -* reference on its own, it relies on truncation to wait for -* the clearing of PG_writeback. The below can only access -* page state that is static across allocation cycles. -*/ if (ret) {dec_lruvec_state (lruvec,NR_WRITEBACK );dec_zone_page_state (page,NR_ZONE_WRITE_PENDING );
@@ -2817,7 +2811,7 @@ EXPORT_SYMBOL(__test_set_page_writeback);*/ void wait_on_page_writeback (struct page *page) { -if (PageWriteback (page)) { +while (PageWriteback (page)) {trace_wait_on_page_writeback (page,page_mapping (page));wait_on_page_bit (page, PG_writeback); }
net/ipv4/esp4_offload.c +3 -0
@@ -283,6 +283,9 @@ static int esp_xmit(struct xfrm_state *x, struct sk_buff *skb, netdev_features_secpath_reset (skb); +if (skb_needs_linearize (skb, skb->dev->features) && +__skb_linearize (skb)) +return -ENOMEM ;return 0 ; }
net/ipv6/esp6_offload.c +3 -0
@@ -314,6 +314,9 @@ static int esp6_xmit(struct xfrm_state *x, struct sk_buff *skb, netdev_featuressecpath_reset (skb); +if (skb_needs_linearize (skb, skb->dev->features) && +__skb_linearize (skb)) +return -ENOMEM ;return 0 ; }
net/netfilter/ipvs/ip_vs_xmit.c +2 -0
@@ -1231,6 +1231,7 @@ ip_vs_tunnel_xmit(struct sk_buff *skb, struct ip_vs_conn *cp, skb->transport_header = skb->network_header;skb_set_inner_ipproto (skb, next_protocol); +skb_set_inner_mac_header (skb,skb_inner_network_offset (skb));if (tun_type ==IP_VS_CONN_F_TUNNEL_TYPE_GUE ) {bool check = false;
@@ -1379,6 +1380,7 @@ ip_vs_tunnel_xmit_v6(struct sk_buff *skb, struct ip_vs_conn *cp, skb->transport_header = skb->network_header;skb_set_inner_ipproto (skb, next_protocol); +skb_set_inner_mac_header (skb,skb_inner_network_offset (skb));if (tun_type ==IP_VS_CONN_F_TUNNEL_TYPE_GUE ) {bool check = false;
net/netfilter/nf_tables_api.c +5 -2
@@ -4804,7 +4804,8 @@ static int nf_tables_newsetelem(struct net *net, struct sock *nlsk,if (IS_ERR (set))return PTR_ERR (set); -if (!list_empty (&set->bindings) && set->flags &NFT_SET_CONSTANT ) +if (!list_empty (&set->bindings) && + (set->flags & (NFT_SET_CONSTANT |NFT_SET_ANONYMOUS )))return -EBUSY ;nla_for_each_nested (attr, nla[NFTA_SET_ELEM_LIST_ELEMENTS ], rem) {
@@ -4987,7 +4988,9 @@ static int nf_tables_delsetelem(struct net *net, struct sock *nlsk, set =nft_set_lookup (ctx.table, nla[NFTA_SET_ELEM_LIST_SET ], genmask);if (IS_ERR (set))return PTR_ERR (set); -if (!list_empty (&set->bindings) && set->flags &NFT_SET_CONSTANT ) + +if (!list_empty (&set->bindings) && + (set->flags & (NFT_SET_CONSTANT |NFT_SET_ANONYMOUS )))return -EBUSY ;if (nla[NFTA_SET_ELEM_LIST_ELEMENTS ] ==NULL ) {
net/netfilter/nfnetlink_osf.c +1 -0
@@ -440,3 +440,4 @@ module_init(nfnl_osf_init);module_exit (nfnl_osf_fini);MODULE_LICENSE ("GPL" ); +MODULE_ALIAS_NFNL_SUBSYS (NFNL_SUBSYS_OSF );
net/netfilter/xt_osf.c +0 -1
@@ -71,4 +71,3 @@ MODULE_AUTHOR("Evgeniy Polyakov <[email protected]>");MODULE_DESCRIPTION ("Passive OS fingerprint matching." );MODULE_ALIAS ("ipt_osf" );MODULE_ALIAS ("ip6t_osf" ); -MODULE_ALIAS_NFNL_SUBSYS (NFNL_SUBSYS_OSF );
net/sched/sch_netem.c +6 -2
@@ -969,6 +969,7 @@ static int netem_change(struct Qdisc *sch, struct nlattr *opt,if (ret <0 )return ret; +sch_tree_lock (sch);/* backup q->clg and q->loss_model */ old_clg = q->clg; old_loss_model = q->loss_model;
@@ -977,7 +978,7 @@ static int netem_change(struct Qdisc *sch, struct nlattr *opt, ret =get_loss_clg (q, tb[TCA_NETEM_LOSS ]);if (ret) { q->loss_model = old_loss_model; -return ret; + goto unlock; } }else { q->loss_model =CLG_RANDOM ;
@@ -1044,6 +1045,8 @@ static int netem_change(struct Qdisc *sch, struct nlattr *opt,/* capping jitter to the range acceptable by tabledist() */ q->jitter =min_t (s64,abs (q->jitter),INT_MAX ); +unlock: +sch_tree_unlock (sch);return ret; get_table_failure:
@@ -1053,7 +1056,8 @@ static int netem_change(struct Qdisc *sch, struct nlattr *opt,*/ q->clg = old_clg; q->loss_model = old_loss_model; -return ret; + + goto unlock; } static int netem_init(struct Qdisc *sch, struct nlattr *opt,
sound/soc/codecs/nau8824.c +24 -0
@@ -1896,6 +1896,30 @@ static const struct dmi_system_id nau8824_quirk_table[] = { }, .driver_data = (void *)(NAU8824_JD_ACTIVE_HIGH), }, + { + /* Positivo CW14Q01P */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Positivo Tecnologia SA"), + DMI_MATCH(DMI_BOARD_NAME, "CW14Q01P"), + }, + .driver_data = (void *)(NAU8824_JD_ACTIVE_HIGH), + }, + { + /* Positivo K1424G */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Positivo Tecnologia SA"), + DMI_MATCH(DMI_BOARD_NAME, "K1424G"), + }, + .driver_data = (void *)(NAU8824_JD_ACTIVE_HIGH), + }, + { + /* Positivo N14ZP74G */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Positivo Tecnologia SA"), + DMI_MATCH(DMI_BOARD_NAME, "N14ZP74G"), + }, + .driver_data = (void *)(NAU8824_JD_ACTIVE_HIGH), + }, {} };