Linux 5.4.270
Greg Kroah-Hartman
maintainerI'm announcing the release of the 5.4.270 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/mach-ep93xx/core.c | 1 arch/arm64/boot/dts/qcom/msm8916.dtsi | 4 arch/s390/pci/pci.c | 2 arch/x86/kernel/alternative.c | 13 drivers/ata/ahci.c | 34 drivers/ata/ahci.h | 1 drivers/block/virtio_blk.c | 7 drivers/dma/fsl-qdma.c | 2 drivers/dma/sh/shdma.h | 2 drivers/firewire/core-card.c | 18 drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 3 drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h | 5 drivers/gpu/drm/drm_syncobj.c | 16 drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadow.c | 8 drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 3 drivers/hwmon/coretemp.c | 2 drivers/infiniband/hw/bnxt_re/ib_verbs.c | 5 drivers/infiniband/hw/hfi1/pio.c | 6 drivers/infiniband/hw/hfi1/sdma.c | 2 drivers/infiniband/ulp/srpt/ib_srpt.c | 18 drivers/md/dm-crypt.c | 6 drivers/md/dm-integrity.c | 11 drivers/net/gtp.c | 10 drivers/nvme/target/fc.c | 8 drivers/nvme/target/tcp.c | 1 drivers/pci/controller/pci-tegra.c | 17 drivers/pci/msi.c | 2 drivers/pinctrl/pinctrl-rockchip.c | 23 drivers/regulator/pwm-regulator.c | 3 drivers/s390/net/qeth_l3_main.c | 9 drivers/scsi/Kconfig | 2 drivers/scsi/lpfc/lpfc_scsi.c | 12 drivers/soc/renesas/r8a77980-sysc.c | 3 drivers/spi/spi-mt7621.c | 8 drivers/target/target_core_device.c | 5 drivers/target/target_core_transport.c | 4 drivers/usb/cdns3/gadget.c | 8 drivers/usb/gadget/function/f_ncm.c | 10 drivers/usb/roles/class.c | 12 drivers/video/fbdev/savage/savagefb_driver.c | 3 drivers/video/fbdev/sis/sis_main.c | 2 fs/afs/volume.c | 4 fs/aio.c | 9 fs/ext4/mballoc.c | 13 fs/iomap/buffered-io.c | 3 fs/nilfs2/dat.c | 27 include/linux/fs.h | 2 include/linux/lockdep.h | 5 include/net/tcp.h | 1 kernel/sched/rt.c | 10 kernel/sysctl.c | 4 mm/memcontrol.c | 6 mm/userfaultfd.c | 14 net/bridge/br_device.c | 2 net/ipv4/af_inet.c | 2 net/ipv4/devinet.c | 21 net/ipv4/tcp.c | 27 net/ipv4/tcp_input.c | 4 net/ipv6/addrconf.c | 21 net/ipv6/seg6.c | 20 net/l2tp/l2tp_ip6.c | 2 net/mac80211/sta_info.c | 2 net/mac80211/tx.c | 2 net/netfilter/nf_conntrack_proto_sctp.c | 2 net/netfilter/nf_tables_api.c | 1 net/packet/af_packet.c | 4 net/sched/Kconfig | 42 net/sched/Makefile | 3 net/sched/sch_atm.c | 710 -------- net/sched/sch_cbq.c | 1818 ---------------------- net/sched/sch_dsmark.c | 523 ------ net/tls/tls_sw.c | 12 net/wireless/nl80211.c | 1 scripts/bpf_helpers_doc.py | 157 + sound/pci/hda/patch_realtek.c | 6 sound/soc/sunxi/sun4i-spdif.c | 5 tools/testing/selftests/bpf/test_verifier.c | 13 virt/kvm/arm/vgic/vgic-its.c | 5 79 files changed, 562 insertions(+), 3254 deletions(-)
Alexandra Winter (1):
s390/qeth: Fix potential loss of L3-IP@ in case of network issues
Andrii Nakryiko (2):
scripts/bpf: teach bpf_helpers_doc.py to dump BPF helper definitions scripts/bpf: Fix xdp_md forward declaration typo
Arnd Bergmann (2):
RDMA/srpt: fix function pointer cast warnings
nouveau: fix function cast warnings
Baokun Li (2):
ext4: avoid allocating blocks from corrupted group in ext4_mb_try_best_found()
ext4: avoid allocating blocks from corrupted group in ext4_mb_find_by_goal()
Bart Van Assche (2):
RDMA/srpt: Make debug output more detailed
fs/aio: Restrict kiocb_set_cancel_fn() to I/O submitted via libaio
Björn Töpel (1):
selftests/bpf: Avoid running unprivileged tests with alignment requirements
Chen-Yu Tsai (1):
ASoC: sunxi: sun4i-spdif: Add support for Allwinner H616
Christian König (1):
drm/syncobj: make lockdep complain on WAIT_FOR_SUBMIT v3
Christophe JAILLET (2):
spi: mt7621: Fix an error message in mt7621_spi_probe()
PCI: tegra: Fix OF node reference leak
Conrad Kostecki (1):
ahci: asm1166: correct count of reported ports
Cyril Hrubis (3):
sched/rt: sysctl_sched_rr_timeslice show default timeslice after reset sched/rt: Fix sysctl_sched_rr_timeslice intial value sched/rt: Disallow writing invalid values to sched_rt_period_us
Daniel Vacek (1):
IB/hfi1: Fix sdma.h tx->num_descs off-by-one error
Daniel Wagner (1):
nvmet-fc: abort command when there is no binding
Daniil Dulov (1):
afs: Increase buffer size in afs_update_volume_status()
Dmitry Bogdanov (1):
scsi: target: core: Add TMF to tmr_list handling
Eric Dumazet (3):
tcp: add annotations around sk->sk_shutdown accesses
ipv4: properly combine dev_base_seq and ipv4.dev_addr_genid
ipv6: properly combine dev_base_seq and ipv6.dev_addr_genid
Erik Kurzinger (1):
drm/syncobj: call drm_syncobj_fence_add_wait when WAIT_AVAILABLE flag is set
Felix Fietkau (1):
wifi: mac80211: fix race condition on enabling fast-xmit
Florian Westphal (1):
netfilter: nf_tables: set dormant flag on hook register failure
Frank Li (2):
usb: cdns3: fixed memory use after free at cdns3_gadget_ep_disable()
usb: cdns3: fix memory double free when handle zero packet
Fullway Wang (2):
fbdev: savage: Error out if pixclock equals zero
fbdev: sis: Error out if pixclock equals zero
GONG, Ruiqi (1):
memcg: add refcnt for pcpu stock to avoid UAF problem in drain_all_stock()
Geert Uytterhoeven (1):
pmdomain: renesas: r8a77980-sysc: CR7 must be always on
Gianmarco Lusvardi (1):
bpf, scripts: Correct GPL license name
Greg Kroah-Hartman (1):
Linux 5.4.270
Guixin Liu (1):
nvmet-tcp: fix nvme tcp ida memory leak
Hannes Reinecke (1):
scsi: lpfc: Use unsigned type for num_sge
Icenowy Zheng (1):
Revert "drm/sun4i: dsi: Change the start delay calculation"
Jakub Kicinski (2):
tls: rx: jump to a more appropriate label
tls: rx: drop pointless else after goto
Jamal Hadi Salim (3):
net/sched: Retire CBQ qdisc
net/sched: Retire ATM qdisc
net/sched: Retire dsmark qdisc
Jason Gunthorpe (1):
s390: use the correct count for __iowrite64_copy()
Kai-Heng Feng (1):
ALSA: hda/realtek - Enable micmute LED on and HP system
Kalesh AP (1):
RDMA/bnxt_re: Return error for SRQ resize
Kirill A. Shutemov (1):
x86/alternatives: Disable KASAN in apply_alternatives()
Krishna Kurapati (1):
usb: gadget: ncm: Avoid dropping datagrams of properly parsed NTBs
Lee Jones (1):
pinctrl: pinctrl-rockchip: Fix a bunch of kerneldoc misdemeanours
Lennert Buytenhek (1):
ahci: add 43-bit DMA address quirk for ASMedia ASM1061 controllers
Lokesh Gidra (1):
userfaultfd: fix mmap_changing checking in mfill_atomic_hugetlb
Martin Blumenstingl (1):
regulator: pwm-regulator: Add validity checks in continuous .get_voltage
Matthew Wilcox (Oracle) (1):
iomap: Set all uptodate bits for an Uptodate page
Miaoqian Lin (1):
pinctrl: rockchip: Fix refcount leak in rockchip_pinctrl_parse_groups
Michal Kazior (1):
wifi: cfg80211: fix missing interfaces when dumping
Mikulas Patocka (2):
dm-integrity: don't modify bio's immutable bio_vec in integrity_metadata()
dm-crypt: don't modify the data when using authenticated encryption
Nathan Chancellor (1):
drm/amdgpu: Fix type of second parameter in trans_msg() callback
Nikita Shubin (1):
ARM: ep93xx: Add terminator to gpiod_lookup_table
Nikolay Aleksandrov (1):
net: bridge: clear bridge's private skb space on xmit
Oliver Upton (2):
KVM: arm64: vgic-its: Test for valid IRQ in its_sync_lpi_pending_table()
KVM: arm64: vgic-its: Test for valid IRQ in MOVALL handler
Pali Rohár (1):
PCI: tegra: Fix reporting GPIO error value
Paolo Abeni (1):
tcp: factor out __tcp_close() helper
Randy Dunlap (1):
scsi: jazz_esp: Only build if SCSI core is builtin
Ryusuke Konishi (1):
nilfs2: replace WARN_ONs for invalid DAT metadata block requests
Sabrina Dubroca (1):
tls: stop recv() if initial process_rx_list gave us non-DATA
Sireesh Kodali (1):
arm64: dts: qcom: msm8916: Fix typo in pronto remoteproc node
Soheil Hassas Yeganeh (1):
tcp: return EPOLLOUT from tcp_poll only when notsent_bytes is half the limit
Takashi Sakamoto (1):
firewire: core: send bus reset promptly on gap count error
Tom Parkin (1):
l2tp: pass correct message length to ip6_append_data
Trek (1):
drm/amdgpu: Check for valid number of registers to read
Vasiliy Kovalev (2):
gtp: fix use-after-free and null-ptr-deref in gtp_genl_dump_pdp()
ipv6: sr: fix possible use-after-free and null-ptr-deref
Vidya Sagar (1):
PCI/MSI: Prevent MSI hardware interrupt number truncation
Vinod Koul (2):
dmaengine: shdma: increase size of 'dev_id'
dmaengine: fsl-qdma: increase size of 'irq_name'
Wolfram Sang (1):
packet: move from strlcpy with unused retval to strscpy
Xin Long (1):
netfilter: conntrack: check SCTP_CID_SHUTDOWN_ACK for vtag setting in sctp_new
Xu Yang (1):
usb: roles: don't get/set_role() when usb_role_switch is unregistered
Yi Sun (1):
virtio-blk: Ensure no requests in virtqueues before deleting vqs.
Zhang Rui (1):
hwmon: (coretemp) Enlarge per package core count limit
Zhipeng Lu (1):
IB/hfi1: Fix a memleak in init_credit_return
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 4 -SUBLEVEL = 269 +SUBLEVEL = 270 EXTRAVERSION = NAME = Kleptomaniac Octopus
arch/arm/mach-ep93xx/core.c +1 -0
@@ -337,6 +337,7 @@ static struct gpiod_lookup_table ep93xx_i2c_gpiod_table = { GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN), GPIO_LOOKUP_IDX("G", 0, NULL, 1, GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN), + { } }, };
arch/arm64/boot/dts/qcom/msm8916.dtsi +2 -2
@@ -1097,8 +1097,8 @@ vddmx-supply = <&pm8916_l3>; vddpx-supply = <&pm8916_l7>; - qcom,state = <&wcnss_smp2p_out 0>; - qcom,state-names = "stop"; + qcom,smem-states = <&wcnss_smp2p_out 0>; + qcom,smem-state-names = "stop"; pinctrl-names = "default"; pinctrl-0 = <&wcnss_pin_a>;
arch/s390/pci/pci.c +1 -1
@@ -223,7 +223,7 @@ resource_size_t pcibios_align_resource(void *data, const struct resource *res,/* combine single writes by using store-block insn */ void __iowrite64_copy (void __iomem *to,const void *from,size_t count) { -zpci_memcpy_toio (to, from, count); +zpci_memcpy_toio (to, from, count *8 ); }void __iomem *ioremap (unsigned long ioaddr,unsigned long size)
arch/x86/kernel/alternative.c +13 -0
@@ -374,6 +374,17 @@ void __init_or_module noinline apply_alternatives(struct alt_instr *start,u8 insn_buff[MAX_PATCH_LEN ];DPRINTK ("alt table %px, -> %px" , start, end); + +/* +* In the case CONFIG_X86_5LEVEL=y, KASAN_SHADOW_START is defined using +* cpu_feature_enabled(X86_FEATURE_LA57) and is therefore patched here. +* During the process, KASAN becomes confused seeing partial LA57 +* conversion and triggers a false-positive out-of-bound report. +* +* Disable KASAN until the patching is complete. +*/ +kasan_disable_current (); +/* * The scan order should be from start to end. A later scanned * alternative code can overwrite previously scanned alternative code.
@@ -434,6 +445,8 @@ void __init_or_module noinline apply_alternatives(struct alt_instr *start,text_poke_early (instr, insn_buff, insn_buff_sz); } + +kasan_enable_current (); }#ifdef CONFIG_SMP
drivers/ata/ahci.c +28 -6
@@ -48,6 +48,7 @@ enum {enum board_ids {/* board IDs by feature in alphabetical order */ board_ahci, + board_ahci_43bit_dma, board_ahci_ign_iferr, board_ahci_mobile, board_ahci_nomsi,
@@ -126,6 +127,13 @@ static const struct ata_port_info ahci_port_info[] = { .udma_mask = ATA_UDMA6, .port_ops = &ahci_ops, }, + [board_ahci_43bit_dma] = { + AHCI_HFLAGS (AHCI_HFLAG_43BIT_ONLY), + .flags = AHCI_FLAG_COMMON, + .pio_mask = ATA_PIO4, + .udma_mask = ATA_UDMA6, + .port_ops = &ahci_ops, + }, [board_ahci_ign_iferr] = { AHCI_HFLAGS (AHCI_HFLAG_IGN_IRQ_IF_ERR), .flags = AHCI_FLAG_COMMON,
@@ -561,11 +569,11 @@ static const struct pci_device_id ahci_pci_tbl[] = { { PCI_VDEVICE(PROMISE, 0x3f20), board_ahci }, /* PDC42819 */ { PCI_VDEVICE(PROMISE, 0x3781), board_ahci }, /* FastTrak TX8660 ahci-mode */ -/* Asmedia */ +/* ASMedia */ { PCI_VDEVICE(ASMEDIA, 0x0601), board_ahci }, /* ASM1060 */ { PCI_VDEVICE(ASMEDIA, 0x0602), board_ahci }, /* ASM1060 */ - { PCI_VDEVICE(ASMEDIA, 0x0611), board_ahci }, /* ASM1061 */ - { PCI_VDEVICE(ASMEDIA, 0x0612), board_ahci }, /* ASM1062 */ + { PCI_VDEVICE(ASMEDIA, 0x0611), board_ahci_43bit_dma }, /* ASM1061 */ + { PCI_VDEVICE(ASMEDIA, 0x0612), board_ahci_43bit_dma }, /* ASM1061/1062 */ { PCI_VDEVICE(ASMEDIA, 0x0621), board_ahci }, /* ASM1061R */ { PCI_VDEVICE(ASMEDIA, 0x0622), board_ahci }, /* ASM1062R */
@@ -618,6 +626,11 @@ MODULE_PARM_DESC(mobile_lpm_policy, "Default LPM policy for mobile chipsets");static void ahci_pci_save_initial_config (struct pci_dev *pdev,struct ahci_host_priv *hpriv) { +if (pdev->vendor ==PCI_VENDOR_ID_ASMEDIA && pdev->device ==0x1166 ) { +dev_info (&pdev->dev,"ASM1166 has only six ports\n" ); + hpriv->saved_port_map =0x3f ; + } +if (pdev->vendor ==PCI_VENDOR_ID_JMICRON && pdev->device ==0x2361 ) {dev_info (&pdev->dev,"JMB361 has only one port\n" ); hpriv->force_port_map =1 ;
@@ -911,11 +924,20 @@ static int ahci_pci_device_resume(struct device *dev)#endif /* CONFIG_PM */ -static int ahci_configure_dma_masks (struct pci_dev *pdev,int using_dac) +static int ahci_configure_dma_masks (struct pci_dev *pdev, +struct ahci_host_priv *hpriv) { -const int dma_bits = using_dac ?64 :32 ; +int dma_bits;int rc; +if (hpriv->cap &HOST_CAP_64 ) { + dma_bits =64 ; +if (hpriv->flags &AHCI_HFLAG_43BIT_ONLY ) + dma_bits =43 ; + }else { + dma_bits =32 ; + } +/* * If the device fixup already set the dma_mask to some non-standard * value, don't extend it here. This happens on STA2X11, for example.
@@ -1875,7 +1897,7 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)ahci_gtf_filter_workaround (host);/* initialize adapter */ - rc =ahci_configure_dma_masks (pdev, hpriv->cap &HOST_CAP_64 ); + rc =ahci_configure_dma_masks (pdev, hpriv);if (rc)return rc;
drivers/ata/ahci.h +1 -0
@@ -244,6 +244,7 @@ enum {AHCI_HFLAG_IGN_NOTSUPP_POWER_ON =BIT (27 ),/* ignore -EOPNOTSUPP from phy_power_on() */ AHCI_HFLAG_NO_SXS =BIT (28 ),/* SXS not supported */ + AHCI_HFLAG_43BIT_ONLY = BIT(29), /* 43bit DMA addr limit *//* ap->flags bits */
drivers/block/virtio_blk.c +4 -3
@@ -1063,14 +1063,15 @@ static int virtblk_freeze(struct virtio_device *vdev) {struct virtio_blk *vblk = vdev->priv; +/* Ensure no requests in virtqueues before deleting vqs. */ +blk_mq_freeze_queue (vblk->disk->queue); +/* Ensure we don't receive any more interrupts */ vdev->config->reset (vdev);/* Make sure no work handler is accessing the device. */ flush_work (&vblk->config_work); -blk_mq_quiesce_queue (vblk->disk->queue); - vdev->config->del_vqs (vdev);kfree (vblk->vqs);
@@ -1088,7 +1089,7 @@ static int virtblk_restore(struct virtio_device *vdev)virtio_device_ready (vdev); -blk_mq_unquiesce_queue (vblk->disk->queue); +blk_mq_unfreeze_queue (vblk->disk->queue); return 0; }#endif
drivers/dma/fsl-qdma.c +1 -1
@@ -754,7 +754,7 @@ fsl_qdma_irq_init(struct platform_device *pdev,int i;int cpu;int ret; -char irq_name[20 ]; +char irq_name[32 ]; fsl_qdma->error_irq =platform_get_irq_byname (pdev,"qdma-error" );
drivers/dma/sh/shdma.h +1 -1
@@ -25,7 +25,7 @@ struct sh_dmae_chan {const struct sh_dmae_slave_config *config;/* Slave DMA configuration */ int xmit_shift;/* log_2(bytes_per_xfer) */ void __iomem *base; -char dev_id[16 ];/* unique name per DMAC of channel */ +char dev_id[32 ];/* unique name per DMAC of channel */ int pm_error;dma_addr_t slave_addr; };
drivers/firewire/core-card.c +17 -1
@@ -429,7 +429,23 @@ static void bm_work(struct work_struct *work)*/ card->bm_generation = generation; -if (root_device ==NULL ) { +if (card->gap_count ==0 ) { +/* +* If self IDs have inconsistent gap counts, do a +* bus reset ASAP. The config rom read might never +* complete, so don't wait for it. However, still +* send a PHY configuration packet prior to the +* bus reset. The PHY configuration packet might +* fail, but 1394-2008 8.4.5.2 explicitly permits +* it in this case, so it should be safe to try. +*/ + new_root_id = local_id; +/* +* We must always send a bus reset if the gap count +* is inconsistent, so bypass the 5-reset limit. +*/ + card->bm_retries =0 ; + }else if (root_device ==NULL ) {/* * Either link_on is false, or we failed to read the * config rom. In either case, pick another root.
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +3 -0
@@ -650,6 +650,9 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_fileif (info->read_mmr_reg.count >128 )return -EINVAL ; +if (info->read_mmr_reg.count >128 ) +return -EINVAL ; + regs =kmalloc_array (info->read_mmr_reg.count,sizeof (*regs),GFP_KERNEL );if (!regs)return -ENOMEM ;
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h +4 -1
@@ -48,6 +48,8 @@ struct amdgpu_vf_error_buffer {uint64_t data[AMDGPU_VF_ERROR_ENTRY_SIZE ]; }; +enum idh_request ; +/** * struct amdgpu_virt_ops - amdgpu device virt operations */
@@ -56,7 +58,8 @@ struct amdgpu_virt_ops {int (*rel_full_gpu)(struct amdgpu_device *adev,bool init);int (*reset_gpu)(struct amdgpu_device *adev);int (*wait_reset)(struct amdgpu_device *adev); -void (*trans_msg)(struct amdgpu_device *adev,u32 req,u32 data1,u32 data2,u32 data3); +void (*trans_msg)(struct amdgpu_device *adev,enum idh_request req, +u32 data1,u32 data2,u32 data3);int (*get_pp_clk)(struct amdgpu_device *adev,u32 type,char *buf);int (*force_dpm_level)(struct amdgpu_device *adev,u32 level); };
drivers/gpu/drm/drm_syncobj.c +15 -1
@@ -325,6 +325,15 @@ int drm_syncobj_find_fence(struct drm_file *file_private,if (!syncobj)return -ENOENT ; +/* Waiting for userspace with locks help is illegal cause that can +* trivial deadlock with page faults for example. Make lockdep complain +* about it early on. +*/ +if (flags &DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT ) { +might_sleep (); +lockdep_assert_none_held_once (); + } + *fence =drm_syncobj_fence_get (syncobj);if (*fence) {
@@ -889,6 +898,10 @@ static signed long drm_syncobj_array_wait_timeout(struct drm_syncobj **syncobjs,uint64_t *points;uint32_t signaled_count, i; +if (flags & (DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT | +DRM_SYNCOBJ_WAIT_FLAGS_WAIT_AVAILABLE )) +lockdep_assert_none_held_once (); + points =kmalloc_array (count,sizeof (*points),GFP_KERNEL );if (points ==NULL )return -ENOMEM ;
@@ -955,7 +968,8 @@ static signed long drm_syncobj_array_wait_timeout(struct drm_syncobj **syncobjs,* fallthough and try a 0 timeout wait! */ -if (flags &DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT ) { +if (flags & (DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT | +DRM_SYNCOBJ_WAIT_FLAGS_WAIT_AVAILABLE )) {for (i =0 ; i < count; ++i)drm_syncobj_fence_add_wait (syncobjs[i], &entries[i]); }
drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadow.c +7 -1
@@ -154,11 +154,17 @@ shadow_fw_init(struct nvkm_bios *bios, const char *name)return (void *)fw; } +static void +shadow_fw_release (void *fw) +{ +release_firmware (fw); +} +static const struct nvbios_source shadow_fw = { .name ="firmware" , .init = shadow_fw_init, - .fini = (void (*)(void *))release_firmware, + .fini = shadow_fw_release, .read = shadow_fw_read, .rw = false, };
drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c +1 -2
@@ -365,8 +365,7 @@ static void sun6i_dsi_inst_init(struct sun6i_dsi *dsi,static u16 sun6i_dsi_get_video_start_delay (struct sun6i_dsi *dsi,struct drm_display_mode *mode) { -u16 start =clamp (mode->vtotal - mode->vdisplay -10 ,8 ,100 ); -u16 delay = mode->vtotal - (mode->vsync_end - mode->vdisplay) + start; +u16 delay = mode->vtotal - (mode->vsync_end - mode->vdisplay) +1 ;if (delay > mode->vtotal) delay = delay % mode->vtotal;
drivers/hwmon/coretemp.c +1 -1
@@ -40,7 +40,7 @@ MODULE_PARM_DESC(tjmax, "TjMax value in degrees Celsius");#define PKG_SYSFS_ATTR_NO 1/* Sysfs attribute for package temp */ #define BASE_SYSFS_ATTR_NO 2/* Sysfs Base attr no for coretemp */ -#define NUM_REAL_CORES 128/* Number of Real cores per cpu */ +#define NUM_REAL_CORES 512/* Number of Real cores per cpu */ #define CORETEMP_NAME_LENGTH 28/* String Length of attrs */ #define MAX_CORE_ATTRS 4/* Maximum no of basic attrs */ #define TOTAL_ATTRS (MAX_CORE_ATTRS + 1)
drivers/infiniband/hw/bnxt_re/ib_verbs.c +2 -3
@@ -1623,7 +1623,7 @@ int bnxt_re_modify_srq(struct ib_srq *ib_srq, struct ib_srq_attr *srq_attr,switch (srq_attr_mask) {case IB_SRQ_MAX_WR :/* SRQ resize is not supported */ -break ; +return -EINVAL ;case IB_SRQ_LIMIT :/* Change the SRQ threshold */ if (srq_attr->srq_limit > srq->qplib_srq.max_wqe)
@@ -1638,13 +1638,12 @@ int bnxt_re_modify_srq(struct ib_srq *ib_srq, struct ib_srq_attr *srq_attr,/* On success, update the shadow */ srq->srq_limit = srq_attr->srq_limit;/* No need to Build and send response back to udata */ -break ; +return 0 ;default :dev_err (rdev_to_dev (rdev),"Unsupported srq_attr_mask 0x%x" , srq_attr_mask);return -EINVAL ; } -return 0 ; }int bnxt_re_query_srq (struct ib_srq *ib_srq,struct ib_srq_attr *srq_attr)
drivers/infiniband/hw/hfi1/pio.c +5 -1
@@ -2131,7 +2131,7 @@ int init_credit_return(struct hfi1_devdata *dd)"Unable to allocate credit return DMA range for NUMA %d\n" , i); ret = -ENOMEM ; - goto done; + goto free_cr_base; } }set_dev_node (&dd->pcidev->dev, dd->node);
@@ -2139,6 +2139,10 @@ int init_credit_return(struct hfi1_devdata *dd) ret =0 ; done:return ret; + +free_cr_base: +free_credit_return (dd); + goto done; }void free_credit_return (struct hfi1_devdata *dd)
drivers/infiniband/hw/hfi1/sdma.c +1 -1
@@ -3203,7 +3203,7 @@ int _pad_sdma_tx_descs(struct hfi1_devdata *dd, struct sdma_txreq *tx) {int rval =0 ; -if ((unlikely (tx->num_desc +1 == tx->desc_limit))) { +if ((unlikely (tx->num_desc == tx->desc_limit))) { rval =_extend_sdma_tx_descs (dd, tx);if (rval) {__sdma_txclean (dd, tx);
drivers/infiniband/ulp/srpt/ib_srpt.c +10 -8
@@ -213,12 +213,15 @@ static const char *get_ch_state_name(enum rdma_ch_state s)/** * srpt_qp_event - QP event callback function * @event: Description of the event that occurred. -* @ch: SRPT RDMA channel. +* @ptr: SRPT RDMA channel. */ -static void srpt_qp_event (struct ib_event *event,struct srpt_rdma_ch *ch) +static void srpt_qp_event (struct ib_event *event,void *ptr) { -pr_debug ("QP event %d on ch=%p sess_name=%s state=%d\n" , - event->event, ch, ch->sess_name, ch->state); +struct srpt_rdma_ch *ch = ptr; + +pr_debug ("QP event %d on ch=%p sess_name=%s-%d state=%s\n" , + event->event, ch, ch->sess_name, ch->qp->qp_num, +get_ch_state_name (ch->state));switch (event->event) {case IB_EVENT_COMM_EST :
@@ -1801,8 +1804,7 @@ static int srpt_create_ch_ib(struct srpt_rdma_ch *ch) } qp_init->qp_context = (void *)ch; - qp_init->event_handler - = (void (*)(struct ib_event *,void *))srpt_qp_event; + qp_init->event_handler = srpt_qp_event; qp_init->send_cq = ch->cq; qp_init->recv_cq = ch->cq; qp_init->sq_sig_type =IB_SIGNAL_REQ_WR ;
@@ -2005,8 +2007,8 @@ static void __srpt_close_all_ch(struct srpt_port *sport)list_for_each_entry (nexus, &sport->nexus_list, entry) {list_for_each_entry (ch, &nexus->ch_list, list) {if (srpt_disconnect_ch (ch) >=0 ) -pr_info ("Closing channel %s because target %s_%d has been disabled\n" , - ch->sess_name, +pr_info ("Closing channel %s-%d because target %s_%d has been disabled\n" , + ch->sess_name, ch->qp->qp_num,dev_name (&sport->sdev->device->dev), sport->port);srpt_close_ch (ch);
drivers/md/dm-crypt.c +6 -0
@@ -1627,6 +1627,12 @@ static void kcryptd_crypt_write_convert(struct dm_crypt_io *io) io->ctx.bio_out = clone; io->ctx.iter_out = clone->bi_iter; +if (crypt_integrity_aead (cc)) { +bio_copy_data (clone, io->base_bio); + io->ctx.bio_in = clone; + io->ctx.iter_in = clone->bi_iter; + } + sector +=bio_sectors (clone);crypt_inc_pending (io);
drivers/md/dm-integrity.c +6 -5
@@ -1582,11 +1582,12 @@ static void integrity_metadata(struct work_struct *w) }__bio_for_each_segment (bv, bio, iter, dio->bio_details.bi_iter) { +struct bio_vec bv_copy = bv;unsigned pos;char *mem, *checksums_ptr; again: - mem = (char *)kmap_atomic (bv.bv_page) + bv.bv_offset; + mem = (char *)kmap_atomic (bv_copy.bv_page) + bv_copy.bv_offset; pos =0 ; checksums_ptr = checksums; do {
@@ -1595,7 +1596,7 @@ static void integrity_metadata(struct work_struct *w) sectors_to_process -= ic->sectors_per_block; pos += ic->sectors_per_block <<SECTOR_SHIFT ; sector += ic->sectors_per_block; - }while (pos < bv.bv_len && sectors_to_process && checksums != checksums_onstack); + }while (pos < bv_copy.bv_len && sectors_to_process && checksums != checksums_onstack);kunmap_atomic (mem); r = dm_integrity_rw_tag(ic, checksums, &dio->metadata_block, &dio->metadata_offset,
@@ -1615,9 +1616,9 @@ static void integrity_metadata(struct work_struct *w)if (!sectors_to_process)break ; -if (unlikely (pos < bv.bv_len)) { - bv.bv_offset += pos; - bv.bv_len -= pos; +if (unlikely (pos < bv_copy.bv_len)) { + bv_copy.bv_offset += pos; + bv_copy.bv_len -= pos; goto again; } }
drivers/net/gtp.c +5 -5
@@ -1381,20 +1381,20 @@ static int __init gtp_init(void)if (err <0 ) goto error_out; - err =genl_register_family (>p_genl_family); + err =register_pernet_subsys (>p_net_ops);if (err <0 ) goto unreg_rtnl_link; - err =register_pernet_subsys (>p_net_ops); + err =genl_register_family (>p_genl_family);if (err <0 ) - goto unreg_genl_family; + goto unreg_pernet_subsys;pr_info ("GTP module loaded (pdp ctx size %zd bytes)\n" ,sizeof (struct pdp_ctx ));return 0 ; -unreg_genl_family: -genl_unregister_family (>p_genl_family); +unreg_pernet_subsys: +unregister_pernet_subsys (>p_net_ops); unreg_rtnl_link:rtnl_link_unregister (>p_link_ops); error_out:
drivers/nvme/target/fc.c +6 -2
@@ -796,6 +796,9 @@ nvmet_fc_alloc_target_assoc(struct nvmet_fc_tgtport *tgtport)int idx;bool needrandom = true; +if (!tgtport->pe) +return NULL ; + assoc =kzalloc (sizeof (*assoc),GFP_KERNEL );if (!assoc)return NULL ;
@@ -2180,8 +2183,9 @@ nvmet_fc_handle_fcp_rqst(struct nvmet_fc_tgtport *tgtport, fod->req.cmd = &fod->cmdiubuf.sqe; fod->req.cqe = &fod->rspiubuf.cqe; -if (tgtport->pe) - fod->req.port = tgtport->pe->port; +if (!tgtport->pe) + goto transport_error; + fod->req.port = tgtport->pe->port;/* clear any response payload */ memset (&fod->rspiubuf,0 ,sizeof (fod->rspiubuf));
drivers/nvme/target/tcp.c +1 -0
@@ -1817,6 +1817,7 @@ static void __exit nvmet_tcp_exit(void)flush_scheduled_work ();destroy_workqueue (nvmet_tcp_wq); +ida_destroy (&nvmet_tcp_queue_ida); }module_init (nvmet_tcp_init);
drivers/pci/controller/pci-tegra.c +10 -7
@@ -2267,13 +2267,15 @@ static int tegra_pcie_parse_dt(struct tegra_pcie *pcie) rp->np = port; rp->base =devm_pci_remap_cfg_resource (dev, &rp->regs); -if (IS_ERR (rp->base)) -return PTR_ERR (rp->base); +if (IS_ERR (rp->base)) { + err =PTR_ERR (rp->base); + goto err_node_put; + } label =devm_kasprintf (dev,GFP_KERNEL ,"pex-reset-%u" , index);if (!label) { -dev_err (dev,"failed to create reset GPIO label\n" ); -return -ENOMEM ; + err = -ENOMEM ; + goto err_node_put; }/*
@@ -2289,9 +2291,10 @@ static int tegra_pcie_parse_dt(struct tegra_pcie *pcie)if (PTR_ERR (rp->reset_gpio) == -ENOENT ) { rp->reset_gpio =NULL ; }else { -dev_err (dev,"failed to get reset GPIO: %d\n" , - err); -return PTR_ERR (rp->reset_gpio); +dev_err (dev,"failed to get reset GPIO: %ld\n" , +PTR_ERR (rp->reset_gpio)); + err =PTR_ERR (rp->reset_gpio); + goto err_node_put; } }
drivers/pci/msi.c +1 -1
@@ -1428,7 +1428,7 @@ irq_hw_number_t pci_msi_domain_calc_hwirq(struct pci_dev *dev, {return (irq_hw_number_t )desc->msi_attrib.entry_nr |pci_dev_id (dev) <<11 | - (pci_domain_nr (dev->bus) &0xFFFFFFFF ) <<27 ; + ((irq_hw_number_t)(pci_domain_nr (dev->bus) &0xFFFFFFFF )) <<27 ; }static inline bool pci_msi_desc_is_multi_msi (struct msi_desc *desc)
drivers/pinctrl/pinctrl-rockchip.c +13 -10
@@ -62,7 +62,7 @@ enum rockchip_pinctrl_type { RK3399, }; -/** +/* * Encode variants of iomux registers into a type variable */ #define IOMUX_GPIO_ONLY BIT(0)
@@ -72,6 +72,7 @@ enum rockchip_pinctrl_type {#define IOMUX_WIDTH_3BIT BIT(4)/** +* struct rockchip_iomux * @type: iomux variant using IOMUX_* constants * @offset: if initialized to -1 it will be autocalculated, by specifying * an initial offset value the relevant source offset can be reset
@@ -82,7 +83,7 @@ struct rockchip_iomux {int offset; }; -/** +/* * enum type index corresponding to rockchip_perpin_drv_list arrays index. */ enum rockchip_pin_drv_type {
@@ -94,7 +95,7 @@ enum rockchip_pin_drv_type {DRV_TYPE_MAX }; -/** +/* * enum type index corresponding to rockchip_pull_list arrays index. */ enum rockchip_pin_pull_type {
@@ -104,6 +105,7 @@ enum rockchip_pin_pull_type { };/** +* struct rockchip_drv * @drv_type: drive strength variant using rockchip_perpin_drv_type * @offset: if initialized to -1 it will be autocalculated, by specifying * an initial offset value the relevant source offset can be reset
@@ -117,8 +119,9 @@ struct rockchip_drv { };/** +* struct rockchip_pin_bank * @reg_base: register base of the gpio bank -* @reg_pull: optional separate register for additional pull settings +* @regmap_pull: optional separate register for additional pull settings * @clk: clock of the gpio bank * @irq: interrupt of the gpio bank * @saved_masks: Saved content of GPIO_INTEN at suspend time.
@@ -136,6 +139,8 @@ struct rockchip_drv {* @gpio_chip: gpiolib chip * @grange: gpio range * @slock: spinlock for the gpio bank +* @toggle_edge_mode: bit mask to toggle (falling/rising) edge mode +* @recalced_mask: bit mask to indicate a need to recalulate the mask * @route_mask: bits describing the routing pins of per bank */ struct rockchip_pin_bank {
@@ -310,6 +315,7 @@ enum rockchip_mux_route_location {* @bank_num: bank number. * @pin: index at register or used to calc index. * @func: the min pin. +* @route_location: the mux route location (same, pmu, grf). * @route_offset: the max pin. * @route_val: the register offset. */
@@ -322,8 +328,6 @@ struct rockchip_mux_route_data {u32 route_val; }; -/** -*/ struct rockchip_pin_ctrl {struct rockchip_pin_bank *pin_banks;u32 nr_banks;
@@ -361,9 +365,7 @@ struct rockchip_pin_config {* @name: name of the pin group, used to lookup the group. * @pins: the pins included in this group. * @npins: number of pins included in this group. -* @func: the mux function number to be programmed when selected. -* @configs: the config values to be set for each pin -* @nconfigs: number of configs for each pin +* @data: local pin configuration */ struct rockchip_pin_group {const char *name;
@@ -376,7 +378,7 @@ struct rockchip_pin_group {* struct rockchip_pmx_func: represent a pin function. * @name: name of the pin function, used to lookup the function. * @groups: one or more names of pin groups that provide this function. -* @num_groups: number of groups included in @groups. +* @ngroups: number of groups included in @groups. */ struct rockchip_pmx_func {const char *name;
@@ -2534,6 +2536,7 @@ static int rockchip_pinctrl_parse_groups(struct device_node *np, np_config =of_find_node_by_phandle (be32_to_cpup (phandle)); ret =pinconf_generic_parse_dt_config (np_config,NULL , &grp->data[j].configs, &grp->data[j].nconfigs); +of_node_put (np_config);if (ret)return ret; }
drivers/regulator/pwm-regulator.c +3 -0
@@ -158,6 +158,9 @@ static int pwm_regulator_get_voltage(struct regulator_dev *rdev)pwm_get_state (drvdata->pwm, &pstate); voltage =pwm_get_relative_duty_cycle (&pstate, duty_unit); +if (voltage <min (max_uV_duty, min_uV_duty) || + voltage >max (max_uV_duty, min_uV_duty)) +return -ENOTRECOVERABLE ;/* * The dutycycle for min_uV might be greater than the one for max_uV.
drivers/s390/net/qeth_l3_main.c +6 -3
@@ -305,9 +305,10 @@ static void qeth_l3_clear_ip_htable(struct qeth_card *card, int recover)if (!recover) {hash_del (&addr->hnode);kfree (addr); -continue ; + }else { +/* prepare for recovery */ + addr->disp_flag =QETH_DISP_ADDR_ADD ; } - addr->disp_flag =QETH_DISP_ADDR_ADD ; }mutex_unlock (&card->ip_lock);
@@ -335,11 +336,13 @@ static void qeth_l3_recover_ip(struct qeth_card *card) }else rc =qeth_l3_register_addr_entry (card, addr); -if (!rc) { +if (!rc || rc == -EADDRINUSE || rc == -ENETDOWN ) { +/* keep it in the records */ addr->disp_flag =QETH_DISP_ADDR_DO_NOTHING ;if (addr->ref_counter <1 )qeth_l3_delete_ip (card, addr); }else { +/* bad address */ hash_del (&addr->hnode);kfree (addr); }
drivers/scsi/Kconfig +1 -1
@@ -1286,7 +1286,7 @@ source "drivers/scsi/arm/Kconfig" config JAZZ_ESP bool "MIPS JAZZ FAS216 SCSI support" - depends on MACH_JAZZ && SCSI + depends on MACH_JAZZ && SCSI=y select SCSI_SPI_ATTRS help This is the driver for the onboard SCSI host adapter of MIPS Magnum
drivers/scsi/lpfc/lpfc_scsi.c +6 -6
@@ -1942,7 +1942,7 @@ lpfc_bg_setup_bpl_prot(struct lpfc_hba *phba, struct scsi_cmnd *sc,* * Returns the number of SGEs added to the SGL. **/ -static int +static uint32_t lpfc_bg_setup_sgl (struct lpfc_hba *phba,struct scsi_cmnd *sc,struct sli4_sge *sgl,int datasegcnt,struct lpfc_io_buf *lpfc_cmd)
@@ -1950,8 +1950,8 @@ lpfc_bg_setup_sgl(struct lpfc_hba *phba, struct scsi_cmnd *sc,struct scatterlist *sgde =NULL ;/* s/g data entry */ struct sli4_sge_diseed *diseed =NULL ;dma_addr_t physaddr; -int i =0 , num_sge =0 , status; -uint32_t reftag; +int i =0 , status; +uint32_t reftag, num_sge =0 ;uint8_t txop, rxop;#ifdef CONFIG_SCSI_LPFC_DEBUG_FS uint32_t rc;
@@ -2122,7 +2122,7 @@ lpfc_bg_setup_sgl(struct lpfc_hba *phba, struct scsi_cmnd *sc,* * Returns the number of SGEs added to the SGL. **/ -static int +static uint32_t lpfc_bg_setup_sgl_prot (struct lpfc_hba *phba,struct scsi_cmnd *sc,struct sli4_sge *sgl,int datacnt,int protcnt,struct lpfc_io_buf *lpfc_cmd)
@@ -2146,8 +2146,8 @@ lpfc_bg_setup_sgl_prot(struct lpfc_hba *phba, struct scsi_cmnd *sc,uint32_t rc;#endif uint32_t checking =1 ; -uint32_t dma_offset =0 ; -int num_sge =0 , j =2 ; +uint32_t dma_offset =0 , num_sge =0 ; +int j =2 ;struct sli4_hybrid_sgl *sgl_xtra =NULL ; sgpe =scsi_prot_sglist (sc);
drivers/soc/renesas/r8a77980-sysc.c +2 -1
@@ -25,7 +25,8 @@ static const struct rcar_sysc_area r8a77980_areas[] __initconst = { PD_CPU_NOCR }, {"ca53-cpu3" ,0x200 ,3 ,R8A77980_PD_CA53_CPU3 ,R8A77980_PD_CA53_SCU , PD_CPU_NOCR }, - { "cr7", 0x240, 0, R8A77980_PD_CR7, R8A77980_PD_ALWAYS_ON }, + { "cr7", 0x240, 0, R8A77980_PD_CR7, R8A77980_PD_ALWAYS_ON, + PD_CPU_NOCR }, { "a3ir", 0x180, 0, R8A77980_PD_A3IR, R8A77980_PD_ALWAYS_ON }, { "a2ir0", 0x400, 0, R8A77980_PD_A2IR0, R8A77980_PD_A3IR }, { "a2ir1", 0x400, 1, R8A77980_PD_A2IR1, R8A77980_PD_A3IR },
drivers/spi/spi-mt7621.c +3 -5
@@ -340,11 +340,9 @@ static int mt7621_spi_probe(struct platform_device *pdev)return PTR_ERR (base); clk =devm_clk_get (&pdev->dev,NULL ); -if (IS_ERR (clk)) { -dev_err (&pdev->dev,"unable to get SYS clock, err=%d\n" , - status); -return PTR_ERR (clk); - } +if (IS_ERR (clk)) +return dev_err_probe (&pdev->dev,PTR_ERR (clk), +"unable to get SYS clock\n" ); status =clk_prepare_enable (clk);if (status)
drivers/target/target_core_device.c +0 -5
@@ -151,7 +151,6 @@ int transport_lookup_tmr_lun(struct se_cmd *se_cmd, u64 unpacked_lun)struct se_session *se_sess = se_cmd->se_sess;struct se_node_acl *nacl = se_sess->se_node_acl;struct se_tmr_req *se_tmr = se_cmd->se_tmr_req; -unsigned long flags;rcu_read_lock (); deve =target_nacl_find_deve (nacl, unpacked_lun);
@@ -182,10 +181,6 @@ int transport_lookup_tmr_lun(struct se_cmd *se_cmd, u64 unpacked_lun) se_cmd->se_dev =rcu_dereference_raw (se_lun->lun_se_dev); se_tmr->tmr_dev =rcu_dereference_raw (se_lun->lun_se_dev); -spin_lock_irqsave (&se_tmr->tmr_dev->se_tmr_lock, flags); -list_add_tail (&se_tmr->tmr_list, &se_tmr->tmr_dev->dev_tmr_list); -spin_unlock_irqrestore (&se_tmr->tmr_dev->se_tmr_lock, flags); -return 0 ; }EXPORT_SYMBOL (transport_lookup_tmr_lun);
drivers/target/target_core_transport.c +4 -0
@@ -3392,6 +3392,10 @@ int transport_generic_handle_tmr(unsigned long flags;bool aborted = false; +spin_lock_irqsave (&cmd->se_dev->se_tmr_lock, flags); +list_add_tail (&cmd->se_tmr_req->tmr_list, &cmd->se_dev->dev_tmr_list); +spin_unlock_irqrestore (&cmd->se_dev->se_tmr_lock, flags); +spin_lock_irqsave (&cmd->t_state_lock, flags);if (cmd->transport_state &CMD_T_ABORTED ) { aborted = true;
drivers/usb/cdns3/gadget.c +6 -2
@@ -661,7 +661,11 @@ void cdns3_gadget_giveback(struct cdns3_endpoint *priv_ep,return ; } -if (request->complete) { +/* +* zlp request is appended by driver, needn't call usb_gadget_giveback_request() to notify +* gadget composite driver. +*/ +if (request->complete && request->buf != priv_dev->zlp_buf) {spin_unlock (&priv_dev->lock);usb_gadget_giveback_request (&priv_ep->endpoint, request);
@@ -1951,11 +1955,11 @@ static int cdns3_gadget_ep_disable(struct usb_ep *ep)while (!list_empty (&priv_ep->wa2_descmiss_req_list)) { priv_req =cdns3_next_priv_request (&priv_ep->wa2_descmiss_req_list); +list_del_init (&priv_req->list);kfree (priv_req->request.buf);cdns3_gadget_ep_free_request (&priv_ep->endpoint, &priv_req->request); -list_del_init (&priv_req->list); --priv_ep->wa2_counter; }
drivers/usb/gadget/function/f_ncm.c +9 -1
@@ -1349,7 +1349,15 @@ static int ncm_unwrap_ntb(struct gether *port, "Parsed NTB with %d frames\n", dgram_counter); to_process -= block_len; -if (to_process !=0 ) { + +/* +* Windows NCM driver avoids USB ZLPs by adding a 1-byte +* zero pad as needed. +*/ +if (to_process ==1 && + (*(unsigned char *)(ntb_ptr + block_len) ==0x00 )) { + to_process--; + }else if (to_process >0 ) { ntb_ptr = (unsigned char *)(ntb_ptr + block_len); goto parse_ntb; }
drivers/usb/roles/class.c +10 -2
@@ -20,6 +20,7 @@ struct usb_role_switch {struct device dev;struct mutex lock;/* device lock*/ enum usb_role role; +bool registered;/* From descriptor */ struct device *usb2_port;
@@ -46,6 +47,9 @@ int usb_role_switch_set_role(struct usb_role_switch *sw, enum usb_role role)if (IS_ERR_OR_NULL (sw))return 0 ; +if (!sw->registered) +return -EOPNOTSUPP ; +mutex_lock (&sw->lock); ret = sw->set (sw->dev.parent, role);
@@ -69,7 +73,7 @@ enum usb_role usb_role_switch_get_role(struct usb_role_switch *sw) {enum usb_role role; -if (IS_ERR_OR_NULL (sw)) +if (IS_ERR_OR_NULL (sw) || !sw->registered)return USB_ROLE_NONE ;mutex_lock (&sw->lock);
@@ -319,6 +323,8 @@ usb_role_switch_register(struct device *parent,return ERR_PTR (ret); } + sw->registered = true; +/* TODO: Symlinks for the host port and the device controller. */ return sw;
@@ -333,8 +339,10 @@ EXPORT_SYMBOL_GPL(usb_role_switch_register);*/ void usb_role_switch_unregister (struct usb_role_switch *sw) { -if (!IS_ERR_OR_NULL (sw)) +if (!IS_ERR_OR_NULL (sw)) { + sw->registered = false;device_unregister (&sw->dev); + } }EXPORT_SYMBOL_GPL (usb_role_switch_unregister);
drivers/video/fbdev/savage/savagefb_driver.c +3 -0
@@ -869,6 +869,9 @@ static int savagefb_check_var(struct fb_var_screeninfo *var,DBG ("savagefb_check_var" ); +if (!var->pixclock) +return -EINVAL ; + var->transp.offset =0 ; var->transp.length =0 ;switch (var->bits_per_pixel) {
drivers/video/fbdev/sis/sis_main.c +2 -0
@@ -1474,6 +1474,8 @@ sisfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) vtotal = var->upper_margin + var->lower_margin + var->vsync_len; +if (!var->pixclock) +return -EINVAL ; pixclock = var->pixclock;if ((var->vmode &FB_VMODE_MASK ) ==FB_VMODE_NONINTERLACED ) {
fs/afs/volume.c +2 -2
@@ -221,7 +221,7 @@ static int afs_update_volume_status(struct afs_volume *volume, struct key *key) {struct afs_server_list *new, *old, *discard;struct afs_vldb_entry *vldb; -char idbuf[16 ]; +char idbuf[24 ];int ret, idsz;_enter ("" );
@@ -229,7 +229,7 @@ static int afs_update_volume_status(struct afs_volume *volume, struct key *key)/* We look up an ID by passing it as a decimal string in the * operation's name parameter. */ - idsz =sprintf (idbuf,"%llu" , volume->vid); + idsz =snprintf (idbuf,sizeof (idbuf),"%llu" , volume->vid); vldb =afs_vl_lookup_vldb (volume->cell, key, idbuf, idsz);if (IS_ERR (vldb)) {
fs/aio.c +8 -1
@@ -570,6 +570,13 @@ void kiocb_set_cancel_fn(struct kiocb *iocb, kiocb_cancel_fn *cancel)struct kioctx *ctx = req->ki_ctx;unsigned long flags; +/* +* kiocb didn't come from aio or is neither a read nor a write, hence +* ignore it. +*/ +if (!(iocb->ki_flags &IOCB_AIO_RW )) +return ; +if (WARN_ON_ONCE (!list_empty (&req->ki_list)))return ;
@@ -1455,7 +1462,7 @@ static int aio_prep_rw(struct kiocb *req, const struct iocb *iocb) req->ki_complete = aio_complete_rw; req->private =NULL ; req->ki_pos = iocb->aio_offset; - req->ki_flags =iocb_flags (req->ki_filp); + req->ki_flags =iocb_flags (req->ki_filp) |IOCB_AIO_RW ;if (iocb->aio_flags &IOCB_FLAG_RESFD ) req->ki_flags |=IOCB_EVENTFD ; req->ki_hint =ki_hint_validate (file_write_hint (req->ki_filp));
fs/ext4/mballoc.c +8 -5
@@ -1802,6 +1802,9 @@ int ext4_mb_try_best_found(struct ext4_allocation_context *ac,return err;ext4_lock_group (ac->ac_sb, group); +if (unlikely (EXT4_MB_GRP_BBITMAP_CORRUPT (e4b->bd_info))) + goto out; + max =mb_find_extent (e4b, ex.fe_start, ex.fe_len, &ex);if (max >0 ) {
@@ -1809,6 +1812,7 @@ int ext4_mb_try_best_found(struct ext4_allocation_context *ac,ext4_mb_use_best_found (ac, e4b); } +out:ext4_unlock_group (ac->ac_sb, group);ext4_mb_unload_buddy (e4b);
@@ -1835,12 +1839,10 @@ int ext4_mb_find_by_goal(struct ext4_allocation_context *ac,if (err)return err; -if (unlikely (EXT4_MB_GRP_BBITMAP_CORRUPT (e4b->bd_info))) { -ext4_mb_unload_buddy (e4b); -return 0 ; - } -ext4_lock_group (ac->ac_sb, group); +if (unlikely (EXT4_MB_GRP_BBITMAP_CORRUPT (e4b->bd_info))) + goto out; + max =mb_find_extent (e4b, ac->ac_g_ex.fe_start, ac->ac_g_ex.fe_len, &ex); ex.fe_logical =0xDEADFA11 ;/* debug value */
@@ -1873,6 +1875,7 @@ int ext4_mb_find_by_goal(struct ext4_allocation_context *ac, ac->ac_b_ex = ex;ext4_mb_use_best_found (ac, e4b); } +out:ext4_unlock_group (ac->ac_sb, group);ext4_mb_unload_buddy (e4b);
fs/iomap/buffered-io.c +3 -0
@@ -23,6 +23,7 @@ static struct iomap_page * iomap_page_create(struct inode *inode, struct page *page) { struct iomap_page *iop = to_iomap_page(page); +unsigned int nr_blocks =PAGE_SIZE /i_blocksize (inode);if (iop ||i_blocksize (inode) ==PAGE_SIZE )return iop;
@@ -32,6 +33,8 @@ iomap_page_create(struct inode *inode, struct page *page)atomic_set (&iop->write_count,0 );spin_lock_init (&iop->uptodate_lock);bitmap_zero (iop->uptodate,PAGE_SIZE /SECTOR_SIZE ); +if (PageUptodate (page)) +bitmap_fill (iop->uptodate, nr_blocks);/* * migrate_page_move_mapping() assumes that pages with private data have
fs/nilfs2/dat.c +17 -10
@@ -40,8 +40,21 @@ static inline struct nilfs_dat_info *NILFS_DAT_I(struct inode *dat)static int nilfs_dat_prepare_entry (struct inode *dat,struct nilfs_palloc_req *req,int create) { -return nilfs_palloc_get_entry_block (dat, req->pr_entry_nr, - create, &req->pr_entry_bh); +int ret; + + ret =nilfs_palloc_get_entry_block (dat, req->pr_entry_nr, + create, &req->pr_entry_bh); +if (unlikely (ret == -ENOENT )) { +nilfs_msg (dat->i_sb,KERN_ERR , +"DAT doesn't have a block to manage vblocknr = %llu" , + (unsigned long long )req->pr_entry_nr); +/* +* Return internal code -EINVAL to notify bmap layer of +* metadata corruption. +*/ + ret = -EINVAL ; + } +return ret; } static void nilfs_dat_commit_entry(struct inode *dat,
@@ -123,11 +136,7 @@ static void nilfs_dat_commit_free(struct inode *dat,int nilfs_dat_prepare_start (struct inode *dat,struct nilfs_palloc_req *req) { -int ret; - - ret =nilfs_dat_prepare_entry (dat, req,0 ); -WARN_ON (ret == -ENOENT ); -return ret; +return nilfs_dat_prepare_entry (dat, req,0 ); } void nilfs_dat_commit_start(struct inode *dat, struct nilfs_palloc_req *req,
@@ -154,10 +163,8 @@ int nilfs_dat_prepare_end(struct inode *dat, struct nilfs_palloc_req *req)int ret; ret =nilfs_dat_prepare_entry (dat, req,0 ); -if (ret <0 ) { -WARN_ON (ret == -ENOENT ); +if (ret <0 )return ret; - } kaddr =kmap_atomic (req->pr_entry_bh->b_page); entry = nilfs_palloc_block_get_entry(dat, req->pr_entry_nr,
include/linux/fs.h +2 -0
@@ -314,6 +314,8 @@ enum rw_hint {#define IOCB_SYNC (1 << 5)#define IOCB_WRITE (1 << 6)#define IOCB_NOWAIT (1 << 7) +/* kiocb is a read or write operation submitted by fs/aio.c. */ +#define IOCB_AIO_RW (1 << 23)struct kiocb {struct file *ki_filp;
include/linux/lockdep.h +5 -0
@@ -403,6 +403,10 @@ extern void lock_unpin_lock(struct lockdep_map *lock, struct pin_cookie);WARN_ON_ONCE (debug_locks && !lockdep_is_held (l)); \ } while (0) +#define lockdep_assert_none_held_once () do { \ + WARN_ON_ONCE(debug_locks && current->lockdep_depth); \ + } while (0) +#define lockdep_recursing (tsk) ((tsk)->lockdep_recursion)#define lockdep_pin_lock (l) lock_pin_lock(&(l)->dep_map)
@@ -479,6 +483,7 @@ struct lockdep_map { };#define lockdep_assert_held_write (l) do { (void)(l); } while (0)#define lockdep_assert_held_read (l) do { (void)(l); } while (0)#define lockdep_assert_held_once (l) do { (void)(l); } while (0) +#define lockdep_assert_none_held_once () do { } while (0)#define lockdep_recursing (tsk) (0)
include/net/tcp.h +1 -0
@@ -391,6 +391,7 @@ void tcp_update_metrics(struct sock *sk);void tcp_init_metrics (struct sock *sk);void tcp_metrics_init (void );bool tcp_peer_is_proven (struct request_sock *req,struct dst_entry *dst); +void __tcp_close (struct sock *sk,long timeout);void tcp_close (struct sock *sk,long timeout);void tcp_init_sock (struct sock *sk);void tcp_init_transfer (struct sock *sk,int bpf_op);
kernel/sched/rt.c +5 -5
@@ -8,7 +8,7 @@#include "pelt.h" int sched_rr_timeslice =RR_TIMESLICE ; -int sysctl_sched_rr_timeslice = (MSEC_PER_SEC /HZ ) *RR_TIMESLICE ; +int sysctl_sched_rr_timeslice = (MSEC_PER_SEC *RR_TIMESLICE ) /HZ ;/* More than 4 hours if BW_SHIFT equals 20. */ static const u64 max_rt_runtime =MAX_BW ;
@@ -2659,9 +2659,6 @@ static int sched_rt_global_constraints(void)static int sched_rt_global_validate (void ) { -if (sysctl_sched_rt_period <=0 ) -return -EINVAL ; - if ((sysctl_sched_rt_runtime != RUNTIME_INF) && ((sysctl_sched_rt_runtime > sysctl_sched_rt_period) || ((u64)sysctl_sched_rt_runtime *
@@ -2693,7 +2690,7 @@ int sched_rt_handler(struct ctl_table *table, int write, old_period = sysctl_sched_rt_period; old_runtime = sysctl_sched_rt_runtime; - ret =proc_dointvec (table, write, buffer, lenp, ppos); + ret =proc_dointvec_minmax (table, write, buffer, lenp, ppos);if (!ret && write) { ret =sched_rt_global_validate ();
@@ -2738,6 +2735,9 @@ int sched_rr_handler(struct ctl_table *table, int write, sched_rr_timeslice = sysctl_sched_rr_timeslice <=0 ?RR_TIMESLICE :msecs_to_jiffies (sysctl_sched_rr_timeslice); + +if (sysctl_sched_rr_timeslice <=0 ) + sysctl_sched_rr_timeslice =jiffies_to_msecs (RR_TIMESLICE ); }mutex_unlock (&mutex);
kernel/sysctl.c +4 -0
@@ -465,6 +465,8 @@ static struct ctl_table kern_table[] = { .maxlen = sizeof(unsigned int), .mode = 0644, .proc_handler = sched_rt_handler, + .extra1 = SYSCTL_ONE, + .extra2 = SYSCTL_INT_MAX, }, { .procname = "sched_rt_runtime_us",
@@ -472,6 +474,8 @@ static struct ctl_table kern_table[] = { .maxlen = sizeof(int), .mode = 0644, .proc_handler = sched_rt_handler, + .extra1 = &neg_one, + .extra2 = SYSCTL_INT_MAX, }, { .procname = "sched_rr_timeslice_ms",
mm/memcontrol.c +6 -0
@@ -2214,6 +2214,9 @@ static void drain_stock(struct memcg_stock_pcp *stock) {struct mem_cgroup *old = stock->cached; +if (!old) +return ; +if (stock->nr_pages) {page_counter_uncharge (&old->memory, stock->nr_pages);if (do_memsw_account ())
@@ -2221,6 +2224,8 @@ static void drain_stock(struct memcg_stock_pcp *stock)css_put_many (&old->css, stock->nr_pages); stock->nr_pages =0 ; } + +css_put (&old->css); stock->cached =NULL ; }
@@ -2256,6 +2261,7 @@ static void refill_stock(struct mem_cgroup *memcg, unsigned int nr_pages) stock =this_cpu_ptr (&memcg_stock);if (stock->cached != memcg) {/* reset if necessary */ drain_stock (stock); +css_get (&memcg->css); stock->cached = memcg; } stock->nr_pages += nr_pages;
mm/userfaultfd.c +13 -1
@@ -177,6 +177,7 @@ static __always_inline ssize_t __mcopy_atomic_hugetlb(struct mm_struct *dst_mm,unsigned long dst_start, unsigned long src_start, unsigned long len, + bool *mmap_changing, bool zeropage) { int vm_alloc_shared = dst_vma->vm_flags & VM_SHARED;
@@ -308,6 +309,15 @@ static __always_inline ssize_t __mcopy_atomic_hugetlb(struct mm_struct *dst_mm, goto out; }down_read (&dst_mm->mmap_sem); +/* +* If memory mappings are changing because of non-cooperative +* operation (e.g. mremap) running in parallel, bail out and +* request the user to retry later +*/ +if (mmap_changing &&READ_ONCE (*mmap_changing)) { + err = -EAGAIN ; +break ; + } dst_vma =NULL ; goto retry;
@@ -389,6 +399,7 @@ extern ssize_t __mcopy_atomic_hugetlb(struct mm_struct *dst_mm,unsigned long dst_start, unsigned long src_start, unsigned long len, + bool *mmap_changing, bool zeropage);#endif /* CONFIG_HUGETLB_PAGE */
@@ -506,7 +517,8 @@ static __always_inline ssize_t __mcopy_atomic(struct mm_struct *dst_mm,*/ if (is_vm_hugetlb_page (dst_vma))return __mcopy_atomic_hugetlb (dst_mm, dst_vma, dst_start, - src_start, len, zeropage); + src_start, len, mmap_changing, + zeropage);if (!vma_is_anonymous (dst_vma) && !vma_is_shmem (dst_vma)) goto out_unlock;
net/bridge/br_device.c +2 -0
@@ -35,6 +35,8 @@ netdev_tx_t br_dev_xmit(struct sk_buff *skb, struct net_device *dev)const unsigned char *dest;u16 vid =0 ; +memset (skb->cb,0 ,sizeof (struct br_input_skb_cb )); +rcu_read_lock (); nf_ops =rcu_dereference (nf_br_ops);if (nf_ops && nf_ops->br_dev_xmit_hook (skb)) {
net/ipv4/af_inet.c +1 -1
@@ -876,7 +876,7 @@ int inet_shutdown(struct socket *sock, int how)EPOLLHUP, even on eg. unconnected UDP sockets -- RR */ /* fall through */ default : - sk->sk_shutdown |= how; +WRITE_ONCE (sk->sk_shutdown, sk->sk_shutdown | how);if (sk->sk_prot->shutdown) sk->sk_prot->shutdown (sk, how);break ;
net/ipv4/devinet.c +17 -4
@@ -1798,6 +1798,21 @@ static int in_dev_dump_addr(struct in_device *in_dev, struct sk_buff *skb,return err; } +/* Combine dev_addr_genid and dev_base_seq to detect changes. +*/ +static u32 inet_base_seq (const struct net *net) +{ +u32 res =atomic_read (&net->ipv4.dev_addr_genid) + + net->dev_base_seq; + +/* Must not return 0 (see nl_dump_check_consistent()). +* Chose a value far away from 0. +*/ +if (!res) + res =0x80000000 ; +return res; +} +static int inet_dump_ifaddr (struct sk_buff *skb,struct netlink_callback *cb) {const struct nlmsghdr *nlh = cb->nlh;
@@ -1849,8 +1864,7 @@ static int inet_dump_ifaddr(struct sk_buff *skb, struct netlink_callback *cb) idx =0 ; head = &tgt_net->dev_index_head[h];rcu_read_lock (); - cb->seq =atomic_read (&tgt_net->ipv4.dev_addr_genid) ^ - tgt_net->dev_base_seq; + cb->seq =inet_base_seq (tgt_net);hlist_for_each_entry_rcu (dev, head, index_hlist) {if (idx < s_idx) goto cont;
@@ -2249,8 +2263,7 @@ static int inet_netconf_dump_devconf(struct sk_buff *skb, idx =0 ; head = &net->dev_index_head[h];rcu_read_lock (); - cb->seq =atomic_read (&net->ipv4.dev_addr_genid) ^ - net->dev_base_seq; + cb->seq =inet_base_seq (net);hlist_for_each_entry_rcu (dev, head, index_hlist) {if (idx < s_idx) goto cont;
net/ipv4/tcp.c +17 -10
@@ -505,6 +505,7 @@ __poll_t tcp_poll(struct file *file, struct socket *sock, poll_table *wait)__poll_t mask;struct sock *sk = sock->sk;const struct tcp_sock *tp =tcp_sk (sk); +u8 shutdown;int state;sock_poll_wait (file, sock, wait);
@@ -547,9 +548,10 @@ __poll_t tcp_poll(struct file *file, struct socket *sock, poll_table *wait)* NOTE. Check for TCP_CLOSE is added. The goal is to prevent * blocking on fresh not-connected or disconnected socket. --ANK */ -if (sk->sk_shutdown ==SHUTDOWN_MASK || state ==TCP_CLOSE ) + shutdown =READ_ONCE (sk->sk_shutdown); +if (shutdown ==SHUTDOWN_MASK || state ==TCP_CLOSE ) mask |=EPOLLHUP ; -if (sk->sk_shutdown &RCV_SHUTDOWN ) +if (shutdown &RCV_SHUTDOWN ) mask |=EPOLLIN |EPOLLRDNORM |EPOLLRDHUP ;/* Connected or passive Fast Open socket? */
@@ -565,8 +567,8 @@ __poll_t tcp_poll(struct file *file, struct socket *sock, poll_table *wait)if (tcp_stream_is_readable (tp, target, sk)) mask |=EPOLLIN |EPOLLRDNORM ; -if (!(sk->sk_shutdown &SEND_SHUTDOWN )) { -if (sk_stream_is_writeable (sk)) { +if (!(shutdown &SEND_SHUTDOWN )) { +if (__sk_stream_is_writeable (sk,1 )) { mask |=EPOLLOUT |EPOLLWRNORM ; }else {/* send SIGIO later */ sk_set_bit (SOCKWQ_ASYNC_NOSPACE , sk);
@@ -578,7 +580,7 @@ __poll_t tcp_poll(struct file *file, struct socket *sock, poll_table *wait)* pairs with the input side. */ smp_mb__after_atomic (); -if (sk_stream_is_writeable (sk)) +if (__sk_stream_is_writeable (sk,1 )) mask |=EPOLLOUT |EPOLLWRNORM ; } }else
@@ -2351,14 +2353,13 @@ bool tcp_check_oom(struct sock *sk, int shift)return too_many_orphans || out_of_socket_memory; } -void tcp_close (struct sock *sk,long timeout) +void __tcp_close (struct sock *sk,long timeout) {struct sk_buff *skb;int data_was_unread =0 ;int state; -lock_sock (sk); - sk->sk_shutdown =SHUTDOWN_MASK ; +WRITE_ONCE (sk->sk_shutdown,SHUTDOWN_MASK );if (sk->sk_state ==TCP_LISTEN ) {tcp_set_state (sk,TCP_CLOSE );
@@ -2521,6 +2522,12 @@ void tcp_close(struct sock *sk, long timeout) out:bh_unlock_sock (sk);local_bh_enable (); +} + +void tcp_close (struct sock *sk,long timeout) +{ +lock_sock (sk); +__tcp_close (sk, timeout);release_sock (sk);sock_put (sk); }
@@ -2624,7 +2631,7 @@ int tcp_disconnect(struct sock *sk, int flags)if (!(sk->sk_userlocks &SOCK_BINDADDR_LOCK ))inet_reset_saddr (sk); - sk->sk_shutdown =0 ; +WRITE_ONCE (sk->sk_shutdown,0 );sock_reset_flag (sk,SOCK_DONE ); tp->srtt_us =0 ; tp->mdev_us =jiffies_to_usecs (TCP_TIMEOUT_INIT );
@@ -3900,7 +3907,7 @@ void tcp_done(struct sock *sk)if (req)reqsk_fastopen_remove (sk, req, false); - sk->sk_shutdown =SHUTDOWN_MASK ; +WRITE_ONCE (sk->sk_shutdown,SHUTDOWN_MASK );if (!sock_flag (sk,SOCK_DEAD )) sk->sk_state_change (sk);
net/ipv4/tcp_input.c +2 -2
@@ -4216,7 +4216,7 @@ void tcp_fin(struct sock *sk)inet_csk_schedule_ack (sk); - sk->sk_shutdown |=RCV_SHUTDOWN ; +WRITE_ONCE (sk->sk_shutdown, sk->sk_shutdown |RCV_SHUTDOWN );sock_set_flag (sk,SOCK_DONE );switch (sk->sk_state) {
@@ -6354,7 +6354,7 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb)break ;tcp_set_state (sk,TCP_FIN_WAIT2 ); - sk->sk_shutdown |=SEND_SHUTDOWN ; +WRITE_ONCE (sk->sk_shutdown, sk->sk_shutdown |SEND_SHUTDOWN );sk_dst_confirm (sk);
net/ipv6/addrconf.c +18 -3
@@ -696,6 +696,22 @@ static int inet6_netconf_get_devconf(struct sk_buff *in_skb,return err; } +/* Combine dev_addr_genid and dev_base_seq to detect changes. +*/ +static u32 inet6_base_seq (const struct net *net) +{ +u32 res =atomic_read (&net->ipv6.dev_addr_genid) + + net->dev_base_seq; + +/* Must not return 0 (see nl_dump_check_consistent()). +* Chose a value far away from 0. +*/ +if (!res) + res =0x80000000 ; +return res; +} + +static int inet6_netconf_dump_devconf (struct sk_buff *skb,struct netlink_callback *cb) {
@@ -729,8 +745,7 @@ static int inet6_netconf_dump_devconf(struct sk_buff *skb, idx =0 ; head = &net->dev_index_head[h];rcu_read_lock (); - cb->seq =atomic_read (&net->ipv6.dev_addr_genid) ^ - net->dev_base_seq; + cb->seq =inet6_base_seq (net);hlist_for_each_entry_rcu (dev, head, index_hlist) {if (idx < s_idx) goto cont;
@@ -5232,7 +5247,7 @@ static int inet6_dump_addr(struct sk_buff *skb, struct netlink_callback *cb, }rcu_read_lock (); - cb->seq =atomic_read (&tgt_net->ipv6.dev_addr_genid) ^ tgt_net->dev_base_seq; + cb->seq =inet6_base_seq (tgt_net);for (h = s_h; h <NETDEV_HASHENTRIES ; h++, s_idx =0 ) { idx =0 ; head = &tgt_net->dev_index_head[h];
net/ipv6/seg6.c +11 -9
@@ -441,22 +441,24 @@ int __init seg6_init(void) {int err = -ENOMEM ; - err =genl_register_family (&seg6_genl_family); + err =register_pernet_subsys (&ip6_segments_ops);if (err) goto out; - err =register_pernet_subsys (&ip6_segments_ops); + err =genl_register_family (&seg6_genl_family);if (err) - goto out_unregister_genl; + goto out_unregister_pernet;#ifdef CONFIG_IPV6_SEG6_LWTUNNEL err =seg6_iptunnel_init ();if (err) - goto out_unregister_pernet; + goto out_unregister_genl; err =seg6_local_init (); -if (err) - goto out_unregister_pernet; +if (err) { +seg6_iptunnel_exit (); + goto out_unregister_genl; + }#endif #ifdef CONFIG_IPV6_SEG6_HMAC
@@ -477,11 +479,11 @@ int __init seg6_init(void)#endif #endif #ifdef CONFIG_IPV6_SEG6_LWTUNNEL -out_unregister_pernet: -unregister_pernet_subsys (&ip6_segments_ops); -#endif out_unregister_genl:genl_unregister_family (&seg6_genl_family); +#endif +out_unregister_pernet: +unregister_pernet_subsys (&ip6_segments_ops); goto out; }
net/l2tp/l2tp_ip6.c +1 -1
@@ -644,7 +644,7 @@ static int l2tp_ip6_sendmsg(struct sock *sk, struct msghdr *msg, size_t len) back_from_confirm:lock_sock (sk); - ulen = len +skb_queue_empty (&sk->sk_write_queue) ? transhdrlen :0 ; + ulen = len + (skb_queue_empty (&sk->sk_write_queue) ? transhdrlen :0 ); err = ip6_append_data(sk, ip_generic_getfrag, msg, ulen, transhdrlen, &ipc6, &fl6, (struct rt6_info *)dst,
net/mac80211/sta_info.c +2 -0
@@ -683,6 +683,8 @@ static int sta_info_insert_finish(struct sta_info *sta) __acquires(RCU)if (ieee80211_vif_is_mesh (&sdata->vif))mesh_accept_plinks_update (sdata); +ieee80211_check_fast_xmit (sta); +return 0 ; out_remove:sta_info_hash_del (local, sta);
net/mac80211/tx.c +1 -1
@@ -2919,7 +2919,7 @@ void ieee80211_check_fast_xmit(struct sta_info *sta) sdata->vif.type == NL80211_IFTYPE_STATION) goto out; -if (!test_sta_flag (sta,WLAN_STA_AUTHORIZED )) +if (!test_sta_flag (sta,WLAN_STA_AUTHORIZED ) || !sta->uploaded) goto out; if (test_sta_flag(sta, WLAN_STA_PS_STA) ||
net/netfilter/nf_conntrack_proto_sctp.c +1 -1
@@ -299,7 +299,7 @@ sctp_new(struct nf_conn *ct, const struct sk_buff *skb,pr_debug ("Setting vtag %x for secondary conntrack\n" , sh->vtag); ct->proto.sctp.vtag[IP_CT_DIR_ORIGINAL ] = sh->vtag; - }else { + }else if (sch->type ==SCTP_CID_SHUTDOWN_ACK ) {/* If it is a shutdown ack OOTB packet, we expect a return shutdown complete, otherwise an ABORT Sec 8.4 (5) and (8) */ pr_debug("Setting vtag %x for new conn OOTB\n",
net/netfilter/nf_tables_api.c +1 -0
@@ -951,6 +951,7 @@ static int nf_tables_updtable(struct nft_ctx *ctx)return 0 ; err_register_hooks: + ctx->table->flags |=NFT_TABLE_F_DORMANT ;nft_trans_destroy (trans);return ret; }
net/packet/af_packet.c +2 -2
@@ -1850,7 +1850,7 @@ static int packet_rcv_spkt(struct sk_buff *skb, struct net_device *dev,*/ spkt->spkt_family = dev->type; -strlcpy (spkt->spkt_device, dev->name,sizeof (spkt->spkt_device)); +strscpy (spkt->spkt_device, dev->name,sizeof (spkt->spkt_device)); spkt->spkt_protocol = skb->protocol;/*
@@ -3511,7 +3511,7 @@ static int packet_getname_spkt(struct socket *sock, struct sockaddr *uaddr,rcu_read_lock (); dev =dev_get_by_index_rcu (sock_net (sk),READ_ONCE (pkt_sk (sk)->ifindex));if (dev) -strlcpy (uaddr->sa_data, dev->name,sizeof (uaddr->sa_data)); +strscpy (uaddr->sa_data, dev->name,sizeof (uaddr->sa_data));rcu_read_unlock ();return sizeof (*uaddr);
net/sched/Kconfig +0 -42
60 lines not on this page · raw message
net/sched/Makefile +0 -3
@@ -31,20 +31,17 @@ obj-$(CONFIG_NET_IFE_SKBTCINDEX) += act_meta_skbtcindex.o obj-$(CONFIG_NET_ACT_TUNNEL_KEY)+= act_tunnel_key.o obj-$(CONFIG_NET_ACT_CT) += act_ct.o obj-$(CONFIG_NET_SCH_FIFO) += sch_fifo.o -obj-$(CONFIG_NET_SCH_CBQ) += sch_cbq.o obj-$(CONFIG_NET_SCH_HTB) += sch_htb.o obj-$(CONFIG_NET_SCH_HFSC) += sch_hfsc.o obj-$(CONFIG_NET_SCH_RED) += sch_red.o obj-$(CONFIG_NET_SCH_GRED) += sch_gred.o obj-$(CONFIG_NET_SCH_INGRESS) += sch_ingress.o -obj-$(CONFIG_NET_SCH_DSMARK) += sch_dsmark.o obj-$(CONFIG_NET_SCH_SFB) += sch_sfb.o obj-$(CONFIG_NET_SCH_SFQ) += sch_sfq.o obj-$(CONFIG_NET_SCH_TBF) += sch_tbf.o obj-$(CONFIG_NET_SCH_TEQL) += sch_teql.o obj-$(CONFIG_NET_SCH_PRIO) += sch_prio.o obj-$(CONFIG_NET_SCH_MULTIQ) += sch_multiq.o -obj-$(CONFIG_NET_SCH_ATM) += sch_atm.o obj-$(CONFIG_NET_SCH_NETEM) += sch_netem.o obj-$(CONFIG_NET_SCH_DRR) += sch_drr.o obj-$(CONFIG_NET_SCH_PLUG) += sch_plug.o
net/sched/sch_atm.c deleted +0 -710
710 lines not on this page · raw message
net/sched/sch_cbq.c deleted +0 -1818
792 lines not on this page · raw message
net/sched/sch_dsmark.c deleted +0 -523
523 lines not on this page · raw message
scripts/bpf_helpers_doc.py +155 -2
157 lines not on this page · raw message
tools/testing/selftests/bpf/test_verifier.c +13 -0
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.