Linux 5.10.112
Greg Kroah-Hartman
maintainerI'm announcing the release of the 5.10.112 kernel.
All users of the 5.10 kernel series must upgrade.
The updated 5.10.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.10.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-davinci/board-da850-evm.c | 4 arch/arm64/kernel/alternative.c | 6 arch/arm64/kernel/cpuidle.c | 6 arch/x86/include/asm/kvm_host.h | 5 arch/x86/kvm/mmu/mmu.c | 20 arch/x86/kvm/x86.c | 20 drivers/acpi/processor_idle.c | 15 drivers/ata/libata-core.c | 3 drivers/firmware/arm_scmi/clock.c | 3 drivers/gpio/gpiolib-acpi.c | 4 drivers/gpu/drm/amd/amdgpu/ObjectID.h | 1 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 10 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 2 drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c | 3 drivers/gpu/drm/amd/amdkfd/kfd_device.c | 11 drivers/gpu/drm/amd/amdkfd/kfd_events.c | 2 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 4 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 14 drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 14 drivers/gpu/drm/amd/display/modules/info_packet/info_packet.c | 5 drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 2 drivers/gpu/drm/msm/dsi/dsi_manager.c | 2 drivers/gpu/drm/msm/msm_gem.c | 1 drivers/gpu/ipu-v3/ipu-di.c | 5 drivers/hv/ring_buffer.c | 11 drivers/i2c/busses/i2c-pasemi.c | 6 drivers/infiniband/ulp/iser/iscsi_iser.c | 2 drivers/md/dm-historical-service-time.c | 10 drivers/md/dm-integrity.c | 7 drivers/media/platform/rockchip/rga/rga.c | 2 drivers/memory/atmel-ebi.c | 23 drivers/memory/renesas-rpc-if.c | 10 drivers/net/dsa/ocelot/felix_vsc9959.c | 2 drivers/net/ethernet/broadcom/genet/bcmgenet.c | 4 drivers/net/ethernet/mellanox/mlxsw/i2c.c | 1 drivers/net/ethernet/micrel/Kconfig | 1 drivers/net/ethernet/myricom/myri10ge/myri10ge.c | 6 drivers/net/ethernet/stmicro/stmmac/altr_tse_pcs.c | 8 drivers/net/ethernet/stmicro/stmmac/altr_tse_pcs.h | 4 drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c | 13 drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 13 drivers/net/hamradio/6pack.c | 5 drivers/net/mdio/mdio-bcm-unimac.c | 16 drivers/net/mdio/mdio-bitbang.c | 4 drivers/net/mdio/mdio-cavium.c | 2 drivers/net/mdio/mdio-gpio.c | 10 drivers/net/mdio/mdio-ipq4019.c | 4 drivers/net/mdio/mdio-ipq8064.c | 4 drivers/net/mdio/mdio-mscc-miim.c | 8 drivers/net/mdio/mdio-mux-bcm-iproc.c | 10 drivers/net/mdio/mdio-mux-gpio.c | 8 drivers/net/mdio/mdio-mux-mmioreg.c | 6 drivers/net/mdio/mdio-mux-multiplexer.c | 2 drivers/net/mdio/mdio-mux.c | 6 drivers/net/mdio/mdio-octeon.c | 8 drivers/net/mdio/mdio-thunder.c | 10 drivers/net/mdio/mdio-xgene.c | 6 drivers/net/mdio/of_mdio.c | 10 drivers/net/slip/slip.c | 2 drivers/net/usb/aqc111.c | 9 drivers/net/veth.c | 2 drivers/net/wireless/ath/ath9k/main.c | 2 drivers/net/wireless/ath/ath9k/xmit.c | 33 drivers/perf/fsl_imx8_ddr_perf.c | 2 drivers/regulator/wm8994-regulator.c | 42 drivers/scsi/be2iscsi/be_iscsi.c | 19 drivers/scsi/be2iscsi/be_main.c | 1 drivers/scsi/bnx2i/bnx2i_iscsi.c | 24 drivers/scsi/cxgbi/cxgb3i/cxgb3i.c | 1 drivers/scsi/cxgbi/cxgb4i/cxgb4i.c | 1 drivers/scsi/cxgbi/libcxgbi.c | 12 drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 2 drivers/scsi/libiscsi.c | 70 + drivers/scsi/lpfc/lpfc_init.c | 2 drivers/scsi/megaraid/megaraid_sas.h | 3 drivers/scsi/megaraid/megaraid_sas_base.c | 7 drivers/scsi/mvsas/mv_init.c | 1 drivers/scsi/pm8001/pm80xx_hwi.c | 33 drivers/scsi/qedi/qedi_iscsi.c | 26 drivers/scsi/qla4xxx/ql4_os.c | 2 drivers/scsi/scsi_transport_iscsi.c | 541 ++++++---- drivers/target/target_core_user.c | 3 fs/btrfs/block-group.c | 4 fs/btrfs/disk-io.c | 5 fs/btrfs/file.c | 13 fs/btrfs/inode.c | 1 fs/btrfs/volumes.c | 2 fs/cifs/link.c | 3 include/asm-generic/tlb.h | 10 include/net/ax25.h | 12 include/net/flow_dissector.h | 2 include/scsi/libiscsi.h | 1 include/scsi/scsi_transport_iscsi.h | 14 include/trace/events/sunrpc.h | 7 kernel/dma/direct.h | 3 kernel/irq/affinity.c | 5 kernel/smp.c | 2 kernel/time/tick-sched.c | 2 kernel/time/timer.c | 11 mm/kmemleak.c | 8 mm/page_alloc.c | 2 mm/page_io.c | 54 net/ax25/af_ax25.c | 38 net/ax25/ax25_dev.c | 28 net/ax25/ax25_route.c | 13 net/ax25/ax25_subr.c | 20 net/core/flow_dissector.c | 1 net/ipv6/ip6_output.c | 2 net/nfc/nci/core.c | 4 net/sched/cls_api.c | 2 net/sched/cls_flower.c | 18 net/sched/sch_taprio.c | 3 net/sctp/socket.c | 2 net/smc/smc_pnet.c | 5 net/wireless/nl80211.c | 3 net/wireless/scan.c | 2 scripts/gcc-plugins/latent_entropy_plugin.c | 44 sound/core/pcm_misc.c | 2 sound/pci/hda/patch_realtek.c | 2 tools/perf/util/parse-events.c | 5 tools/testing/selftests/mqueue/mq_perf_tests.c | 25 124 files changed, 1053 insertions(+), 578 deletions(-)
Adrian Hunter (1):
perf tools: Fix misleading add event PMU debug message
Ajish Koshy (2):
scsi: pm80xx: Mask and unmask upper interrupt vectors 32-63
scsi: pm80xx: Enable upper inbound, outbound queuesAlexey Galakhov (1):
scsi: mvsas: Add PCI ID of RocketRaid 2640
Andy Chiu (1):
net: axienet: setup mdio unconditionally
Anna-Maria Behnsen (1):
timers: Fix warning condition in __run_timers()
Athira Rajeev (1):
testing/selftests/mqueue: Fix mq_perf_tests to free the allocated cpu set
Aurabindo Pillai (1):
drm/amd: Add USBC connector ID
Benedikt Spranger (1):
net/sched: taprio: Check if socket flags are valid
Borislav Petkov (1):
perf/imx_ddr: Fix undefined behavior due to shift overflowing the constant
Calvin Johnson (1):
net: mdio: Alphabetically sort header inclusion
Chandrakanth patil (1):
scsi: megaraid_sas: Target with invalid LUN ID is deleted during scan
Chao Gao (1):
dma-direct: avoid redundant memory sync for swiotlb
Charlene Liu (1):
drm/amd/display: fix audio format not updated after edid updated
Chiawen Huang (1):
drm/amd/display: FEC check in timing validation
Christian Lamparter (1):
ata: libata-core: Disable READ LOG DMA EXT for Samsung 840 EVOs
Chuck Lever (1):
SUNRPC: Fix the svc_deferred_event trace class
Cristian Marussi (1):
firmware: arm_scmi: Fix sorting of retrieved clock rates
Darrick J. Wong (1):
btrfs: fix fallocate to use file_modified to update permissions consistently
Dinh Nguyen (1):
net: ethernet: stmmac: fix altr_tse_pcs function when using a fixed-link
Duoming Zhou (9):
drivers: net: slip: fix NPD bug in sl_tx_timeout()
ax25: add refcount in ax25_dev to avoid UAF bugs
ax25: fix reference count leaks of ax25_dev
ax25: fix UAF bugs of net_device caused by rebinding operation
ax25: Fix refcount leaks caused by ax25_cb_del()
ax25: fix UAF bug in ax25_send_control()
ax25: fix NPD bug in ax25_disconnect
ax25: Fix NULL pointer dereferences in ax25 timers
ax25: Fix UAF bugs in ax25 timers
Fabio M. De Francesco (1):
ALSA: pcm: Test for "silence" field in struct "pcm_format_data"
Felix Kuehling (1):
drm/amdkfd: Use drm_priv to pass VM from KFD to amdgpu
Greg Kroah-Hartman (1):
Linux 5.10.112
Guillaume Nault (1):
veth: Ensure eth header is in skb's linear part
Harshit Mogalapalli (1):
cifs: potential buffer overflow in handling symlinks
James Smart (1):
scsi: lpfc: Fix queue failures when recovering from PCI parity error
Jason A. Donenfeld (1):
gcc-plugins: latent_entropy: use /dev/urandom
Jeremy Linton (1):
net: bcmgenet: Revert "Use stronger register read/writes to assure ordering"
Jia-Ju Bai (1):
btrfs: fix root ref counts in error handling in btrfs_get_root_ref
Joey Gouly (1):
arm64: alternatives: mark patch_alternative() as noinstr
Johan Hovold (1):
memory: renesas-rpc-if: fix platform-device leak in error path
Johannes Berg (1):
nl80211: correctly check NL80211_ATTR_REG_ALPHA2 size
Jonathan Bakker (1):
regulator: wm8994: Add an off-on delay for WM8994 variant
Josef Bacik (1):
btrfs: do not warn for free space inode in cow_file_range
Juergen Gross (1):
mm, page_alloc: fix build_zonerefs_node()
Karsten Graul (1):
net/smc: Fix NULL pointer dereference in smc_pnet_find_ib()
Khazhismel Kumykov (1):
dm mpath: only use ktime_get_ns() in historical selector
Kyle Copperfield (1):
media: rockchip/rga: do proper error checking in probe
Leo (Hanghong) Ma (1):
drm/amd/display: Update VTEM Infopacket definition
Leo Ruan (1):
gpu: ipu-v3: Fix dev_dbg frequency output
Lin Ma (3):
hamradio: defer 6pack kfree after unregister_netdev
hamradio: remove needs_free_netdev to avoid UAF
nfc: nci: add flush_workqueue to prevent uaf
Linus Torvalds (1):
gpiolib: acpi: use correct format characters
Marcelo Ricardo Leitner (1):
net/sched: fix initialization order when updating chain 0 head
Marcin Kozlowski (1):
net: usb: aqc111: Fix out-of-bounds accesses in RX fixup
Mario Limonciello (2):
cpuidle: PSCI: Move the has_lpi check to the beginning of the function
ACPI: processor idle: Check for architectural support for LPI
Martin Leung (1):
drm/amd/display: Revert FEC check in validation
Martin Povišer (1):
i2c: pasemi: Wait for write xfers to finish
Melissa Wen (1):
drm/amd/display: don't ignore alpha property on pre-multiplied mode
Miaoqian Lin (1):
memory: atmel-ebi: Fix missing of_node_put in atmel_ebi_probe
Michael Kelley (1):
Drivers: hv: vmbus: Prevent load re-ordering when reading ring buffer
Michael Walle (1):
net: dsa: felix: suppress -EPROBE_DEFER errors
Mike Christie (10):
scsi: iscsi: Stop queueing during ep_disconnect
scsi: iscsi: Force immediate failure during shutdown
scsi: iscsi: Use system_unbound_wq for destroy_work
scsi: iscsi: Rel ref after iscsi_lookup_endpoint()
scsi: iscsi: Fix in-kernel conn failure handling
scsi: iscsi: Move iscsi_ep_disconnect()
scsi: iscsi: Fix offload conn cleanup when iscsid restarts
scsi: iscsi: Fix conn cleanup and stop race during iscsid restart
scsi: iscsi: Fix endpoint reuse regression
scsi: iscsi: Fix unbound endpoint error handling
Mikulas Patocka (1):
dm integrity: fix memory corruption when tag_size is less than digest size
Minchan Kim (1):
mm: fix unexpected zeroed page mapping with zram swap
Nadav Amit (1):
smp: Fix offline cpu check in flush_smp_call_function_queue()
Naohiro Aota (1):
btrfs: mark resumed async balance as writing
Nathan Chancellor (2):
btrfs: remove unused variable in btrfs_{start,write}_dirty_block_groups()
ARM: davinci: da850-evm: Avoid NULL pointer dereference
Nicolas Dichtel (1):
ipv6: fix panic when forwarding a pkt with no in6 dev
Patrick Wang (1):
mm: kmemleak: take a full lowmem check in kmemleak_*_phys()
Paul Gortmaker (1):
tick/nohz: Use WARN_ON_ONCE() to prevent console saturation
Petr Malat (1):
sctp: Initialize daddr on peeled off socket
QintaoShen (1):
drm/amdkfd: Check for potential null return of kmalloc_array()
Rameshkumar Sundaram (1):
cfg80211: hold bss_lock while updating nontrans_list
Randy Dunlap (1):
net: micrel: fix KS8851_MLL Kconfig
Rei Yamamoto (1):
genirq/affinity: Consider that CPUs on nodes can be unbalanced
Rob Clark (2):
drm/msm: Add missing put_task_struct() in debugfs path drm/msm: Fix range size vs end confusion
Roman Li (1):
drm/amd/display: Fix allocate_mst_payload assert on resume
Sean Christopherson (1):
KVM: x86/mmu: Resolve nx_huge_pages when kvm.ko is loaded
Stephen Boyd (1):
drm/msm/dsi: Use connector directly in msm_dsi_manager_connector_init()
Steve Capper (1):
tlb: hugetlb: Add more sizes to tlb_remove_huge_tlb_entry
Tao Jin (1):
ALSA: hda/realtek: add quirk for Lenovo Thinkpad X12 speakers
Tianci Yin (1):
drm/amdgpu/vcn: improve vcn dpg stop procedure
Tim Crawford (1):
ALSA: hda/realtek: Add quirk for Clevo PD50PNT
Toke Høiland-Jørgensen (2):
ath9k: Properly clear TX status area before reporting to mac80211
ath9k: Fix usage of driver-private space in tx_info
Tomasz Moń (1):
drm/amdgpu: Enable gfxoff quirk on MacBook Pro
Tushar Patel (1):
drm/amdkfd: Fix Incorrect VMIDs passed to HWS
Tyrel Datwyler (1):
scsi: ibmvscsis: Increase INITIAL_SRP_LIMIT to 1024
Vadim Pasternak (1):
mlxsw: i2c: Fix initialization error flow
Vlad Buslov (1):
net/sched: flower: fix parsing of ethertype following VLAN header
Xiaoguang Wang (1):
scsi: target: tcmu: Fix possible page UAF
Xiaomeng Tong (1):
myri10ge: fix an incorrect free for skb in myri10ge_sw_tso
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 10 -SUBLEVEL = 111 +SUBLEVEL = 112 EXTRAVERSION = NAME = Dare mighty things
arch/arm/mach-davinci/board-da850-evm.c +3 -1
@@ -1101,11 +1101,13 @@ static int __init da850_evm_config_emac(void)int ret;u32 val;struct davinci_soc_info *soc_info = &davinci_soc_info; -u8 rmii_en = soc_info->emac_pdata->rmii_en; +u8 rmii_en;if (!machine_is_davinci_da850_evm ())return 0 ; + rmii_en = soc_info->emac_pdata->rmii_en; + cfg_chip3_base =DA8XX_SYSCFG0_VIRT (DA8XX_CFGCHIP3_REG ); val =__raw_readl (cfg_chip3_base);
arch/arm64/kernel/alternative.c +3 -3
@@ -41,7 +41,7 @@ bool alternative_is_applied(u16 cpufeature)/* * Check if the target PC is within an alternative block. */ -static bool branch_insn_requires_update (struct alt_instr *alt,unsigned long pc) +static __always_inline bool branch_insn_requires_update(struct alt_instr *alt, unsigned long pc) {unsigned long replptr = (unsigned long )ALT_REPL_PTR (alt);return !(pc >= replptr && pc <= (replptr + alt->alt_len));
@@ -49,7 +49,7 @@ static bool branch_insn_requires_update(struct alt_instr *alt, unsigned long pc)#define align_down (x, a) ((unsigned long)(x) & ~(((unsigned long)(a)) - 1)) -static u32 get_alt_insn (struct alt_instr *alt,__le32 *insnptr,__le32 *altinsnptr) +static __always_inline u32 get_alt_insn(struct alt_instr *alt, __le32 *insnptr, __le32 *altinsnptr) {u32 insn;
@@ -94,7 +94,7 @@ static u32 get_alt_insn(struct alt_instr *alt, __le32 *insnptr, __le32 *altinsnpreturn insn; } -static void patch_alternative (struct alt_instr *alt, +static noinstr void patch_alternative(struct alt_instr *alt,__le32 *origptr,__le32 *updptr,int nr_inst) {__le32 *replptr;
arch/arm64/kernel/cpuidle.c +3 -3
@@ -54,6 +54,9 @@ static int psci_acpi_cpu_init_idle(unsigned int cpu)struct acpi_lpi_state *lpi;struct acpi_processor *pr =per_cpu (processors, cpu); +if (unlikely (!pr || !pr->flags.has_lpi)) +return -EINVAL ; +/* * If the PSCI cpu_suspend function hook has not been initialized * idle states must not be enabled, so bail out
@@ -61,9 +64,6 @@ static int psci_acpi_cpu_init_idle(unsigned int cpu)if (!psci_ops.cpu_suspend)return -EOPNOTSUPP ; -if (unlikely (!pr || !pr->flags.has_lpi)) -return -EINVAL ; - count = pr->power.count -1 ;if (count <=0 )return -ENODEV ;
arch/x86/include/asm/kvm_host.h +3 -2
@@ -1340,8 +1340,9 @@ static inline int kvm_arch_flush_remote_tlb(struct kvm *kvm)return -ENOTSUPP ; } -int kvm_mmu_module_init (void ); -void kvm_mmu_module_exit (void ); +void kvm_mmu_x86_module_init (void ); +int kvm_mmu_vendor_module_init (void ); +void kvm_mmu_vendor_module_exit (void );void kvm_mmu_destroy (struct kvm_vcpu *vcpu);int kvm_mmu_create (struct kvm_vcpu *vcpu);
arch/x86/kvm/mmu/mmu.c +16 -4
@@ -5876,12 +5876,24 @@ static int set_nx_huge_pages(const char *val, const struct kernel_param *kp)return 0 ; } -int kvm_mmu_module_init (void ) +/* +* nx_huge_pages needs to be resolved to true/false when kvm.ko is loaded, as +* its default value of -1 is technically undefined behavior for a boolean. +*/ +void kvm_mmu_x86_module_init (void ) { -int ret = -ENOMEM ; -if (nx_huge_pages ==-1 )__set_nx_huge_pages (get_nx_auto_mode ()); +} + +/* +* The bulk of the MMU initialization is deferred until the vendor module is +* loaded as many of the masks/values may be modified by VMX or SVM, i.e. need +* to be reset when a potentially different vendor module is loaded. +*/ +int kvm_mmu_vendor_module_init (void ) +{ +int ret = -ENOMEM ;/* * MMU roles use union aliasing which is, generally speaking, an
@@ -5955,7 +5967,7 @@ void kvm_mmu_destroy(struct kvm_vcpu *vcpu)mmu_free_memory_caches (vcpu); } -void kvm_mmu_module_exit (void ) +void kvm_mmu_vendor_module_exit (void ) {mmu_destroy_caches ();percpu_counter_destroy (&kvm_total_used_mmu_pages);
arch/x86/kvm/x86.c +18 -2
@@ -8005,7 +8005,7 @@ int kvm_arch_init(void *opaque) goto out_free_x86_emulator_cache; } - r =kvm_mmu_module_init (); + r =kvm_mmu_vendor_module_init ();if (r) goto out_free_percpu;
@@ -8065,7 +8065,7 @@ void kvm_arch_exit(void)cancel_work_sync (&pvclock_gtod_work);#endif kvm_x86_ops.hardware_enable =NULL ; -kvm_mmu_module_exit (); +kvm_mmu_vendor_module_exit ();free_percpu (user_return_msrs);kmem_cache_destroy (x86_emulator_cache);kmem_cache_destroy (x86_fpu_cache);
@@ -11426,3 +11426,19 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(kvm_avic_unaccelerated_access);EXPORT_TRACEPOINT_SYMBOL_GPL (kvm_avic_incomplete_ipi);EXPORT_TRACEPOINT_SYMBOL_GPL (kvm_avic_ga_log);EXPORT_TRACEPOINT_SYMBOL_GPL (kvm_apicv_update_request); + +static int __init kvm_x86_init (void ) +{ +kvm_mmu_x86_module_init (); +return 0 ; +} +module_init (kvm_x86_init); + +static void __exit kvm_x86_exit(void) +{ +/* +* If module_init() is implemented, module_exit() must also be +* implemented to allow module unload. +*/ +} +module_exit (kvm_x86_exit);
drivers/acpi/processor_idle.c +10 -5
@@ -1080,6 +1080,11 @@ static int flatten_lpi_states(struct acpi_processor *pr,return 0 ; } +int __weak acpi_processor_ffh_lpi_probe (unsigned int cpu) +{ +return -EOPNOTSUPP ; +} +static int acpi_processor_get_lpi_info (struct acpi_processor *pr) {int ret, i;
@@ -1088,6 +1093,11 @@ static int acpi_processor_get_lpi_info(struct acpi_processor *pr)struct acpi_device *d =NULL ;struct acpi_lpi_states_array info[2 ], *tmp, *prev, *curr; +/* make sure our architecture has support */ + ret =acpi_processor_ffh_lpi_probe (pr->id); +if (ret == -EOPNOTSUPP ) +return ret; +if (!osc_pc_lpi_support_confirmed)return -EOPNOTSUPP ;
@@ -1139,11 +1149,6 @@ static int acpi_processor_get_lpi_info(struct acpi_processor *pr)return 0 ; } -int __weak acpi_processor_ffh_lpi_probe (unsigned int cpu) -{ -return -ENODEV ; -} -int __weak acpi_processor_ffh_lpi_enter (struct acpi_lpi_state *lpi) {return -ENODEV ;
drivers/ata/libata-core.c +3 -0
@@ -3974,6 +3974,9 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = { ATA_HORKAGE_ZERO_AFTER_TRIM, }, {"Crucial_CT*MX100*" ,"MU01" ,ATA_HORKAGE_NO_NCQ_TRIM | ATA_HORKAGE_ZERO_AFTER_TRIM, }, + { "Samsung SSD 840 EVO*", NULL, ATA_HORKAGE_NO_NCQ_TRIM | +ATA_HORKAGE_NO_DMA_LOG | + ATA_HORKAGE_ZERO_AFTER_TRIM, }, { "Samsung SSD 840*", NULL, ATA_HORKAGE_NO_NCQ_TRIM | ATA_HORKAGE_ZERO_AFTER_TRIM, }, { "Samsung SSD 850*", NULL, ATA_HORKAGE_NO_NCQ_TRIM |
drivers/firmware/arm_scmi/clock.c +2 -1
@@ -202,7 +202,8 @@ scmi_clock_describe_rates_get(const struct scmi_handle *handle, u32 clk_id,if (rate_discrete && rate) { clk->list.num_rates = tot_rate_cnt; -sort (rate, tot_rate_cnt,sizeof (*rate), rate_cmp_func,NULL ); +sort (clk->list.rates, tot_rate_cnt,sizeof (*rate), + rate_cmp_func,NULL ); } clk->rate_discrete = rate_discrete;
drivers/gpio/gpiolib-acpi.c +2 -2
@@ -276,8 +276,8 @@ static acpi_status acpi_gpiochip_alloc_event(struct acpi_resource *ares, pin = agpio->pin_table[0 ];if (pin <=255 ) { -char ev_name[5 ]; -sprintf (ev_name,"_%c%02hhX" , +char ev_name[8 ]; +sprintf (ev_name,"_%c%02X" , agpio->triggering ==ACPI_EDGE_SENSITIVE ?'E' :'L' , pin);if (ACPI_SUCCESS (acpi_get_handle (handle, ev_name, &evt_handle)))
drivers/gpu/drm/amd/amdgpu/ObjectID.h +1 -0
@@ -119,6 +119,7 @@#define CONNECTOR_OBJECT_ID_eDP 0x14#define CONNECTOR_OBJECT_ID_MXM 0x15#define CONNECTOR_OBJECT_ID_LVDS_eDP 0x16 +#define CONNECTOR_OBJECT_ID_USBC 0x17/* deleted */
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c +7 -3
@@ -1024,11 +1024,15 @@ int amdgpu_amdkfd_gpuvm_acquire_process_vm(struct kgd_dev *kgd, struct dma_fence **ef) {struct amdgpu_device *adev =get_amdgpu_device (kgd); -struct drm_file *drm_priv = filp->private_data; -struct amdgpu_fpriv *drv_priv = drm_priv->driver_priv; -struct amdgpu_vm *avm = &drv_priv->vm; +struct amdgpu_fpriv *drv_priv; +struct amdgpu_vm *avm;int ret; + ret =amdgpu_file_to_fpriv (filp, &drv_priv); +if (ret) +return ret; + avm = &drv_priv->vm; +/* Already a compute VM? */ if (avm->process_info)return -EINVAL ;
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +1 -1
@@ -632,7 +632,7 @@ MODULE_PARM_DESC(sched_policy,* Maximum number of processes that HWS can schedule concurrently. The maximum is the * number of VMIDs assigned to the HWS, which is also the default. */ -int hws_max_conc_proc =8 ; +int hws_max_conc_proc =-1 ;module_param (hws_max_conc_proc, int,0444 );MODULE_PARM_DESC (hws_max_conc_proc,"Max # processes HWS can execute concurrently when sched_policy=0 (0 = no concurrency, #VMIDs for KFD = Maximum(default))" );
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +2 -0
@@ -1248,6 +1248,8 @@ static const struct amdgpu_gfxoff_quirk amdgpu_gfxoff_quirk_list[] = { { 0x1002, 0x15dd, 0x103c, 0x83e7, 0xd3 },/* GFXOFF is unstable on C6 parts with a VBIOS 113-RAVEN-114 */ { 0x1002, 0x15dd, 0x1002, 0x15dd, 0xc6 }, +/* Apple MacBook Pro (15-inch, 2019) Radeon Pro Vega 20 4 GB */ + { 0x1002, 0x69af, 0x106b, 0x019a, 0xc0 }, { 0, 0, 0, 0, 0 }, };
drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c +3 -0
@@ -1429,8 +1429,11 @@ static int vcn_v3_0_start_sriov(struct amdgpu_device *adev)static int vcn_v3_0_stop_dpg_mode (struct amdgpu_device *adev,int inst_idx) { +struct dpg_pause_state state = {.fw_based =VCN_DPG_STATE__UNPAUSE };uint32_t tmp; +vcn_v3_0_pause_dpg_mode (adev,0 , &state); +/* Wait for power status to be 1 */ SOC15_WAIT_ON_RREG (VCN , inst_idx, mmUVD_POWER_STATUS,1 ,UVD_POWER_STATUS__UVD_POWER_STATUS_MASK );
drivers/gpu/drm/amd/amdkfd/kfd_device.c +3 -8
@@ -664,15 +664,10 @@ bool kgd2kfd_device_init(struct kfd_dev *kfd, - kfd->vm_info.first_vmid_kfd +1 ;/* Verify module parameters regarding mapped process number*/ -if ((hws_max_conc_proc <0 ) - || (hws_max_conc_proc > kfd->vm_info.vmid_num_kfd)) { -dev_err (kfd_device, -"hws_max_conc_proc %d must be between 0 and %d, use %d instead\n" , - hws_max_conc_proc, kfd->vm_info.vmid_num_kfd, - kfd->vm_info.vmid_num_kfd); +if (hws_max_conc_proc >=0 ) + kfd->max_proc_per_quantum =min ((u32 )hws_max_conc_proc, kfd->vm_info.vmid_num_kfd); +else kfd->max_proc_per_quantum = kfd->vm_info.vmid_num_kfd; - }else - kfd->max_proc_per_quantum = hws_max_conc_proc;/* calculate max size of mqds needed for queues */ size = max_num_of_queues_per_device *
drivers/gpu/drm/amd/amdkfd/kfd_events.c +2 -0
@@ -531,6 +531,8 @@ static struct kfd_event_waiter *alloc_event_waiters(uint32_t num_events) event_waiters =kmalloc_array (num_events,sizeof (struct kfd_event_waiter ),GFP_KERNEL ); +if (!event_waiters) +return NULL ;for (i =0 ; (event_waiters) && (i < num_events) ; i++) {init_wait (&event_waiters[i].wait);
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +2 -1
@@ -2022,7 +2022,8 @@ static int dm_resume(void *handle)* this is the case when traversing through already created * MST connectors, should be skipped */ -if (aconnector->mst_port) +if (aconnector->dc_link && + aconnector->dc_link->type == dc_connection_mst_branch)continue ;mutex_lock (&aconnector->hpd_lock);
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +2 -2
@@ -1701,8 +1701,8 @@ bool dc_is_stream_unchanged(if (old_stream->ignore_msa_timing_param != stream->ignore_msa_timing_param)return false; -// Only Have Audio left to check whether it is same or not. This is a corner case for Tiled sinks -if (old_stream->audio_info.mode_count != stream->audio_info.mode_count) +/*compare audio info*/ +if (memcmp (&old_stream->audio_info, &stream->audio_info,sizeof (stream->audio_info)) !=0 )return false;return true;
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c +9 -5
@@ -2387,14 +2387,18 @@ void dcn10_update_mpcc(struct dc *dc, struct pipe_ctx *pipe_ctx) &blnd_cfg.black_color); } -if (per_pixel_alpha) - blnd_cfg.alpha_mode =MPCC_ALPHA_BLEND_MODE_PER_PIXEL_ALPHA ; -else - blnd_cfg.alpha_mode =MPCC_ALPHA_BLEND_MODE_GLOBAL_ALPHA ; - blnd_cfg.overlap_only = false; blnd_cfg.global_gain =0xff ; +if (per_pixel_alpha && pipe_ctx->plane_state->global_alpha) { + blnd_cfg.alpha_mode =MPCC_ALPHA_BLEND_MODE_PER_PIXEL_ALPHA_COMBINED_GLOBAL_GAIN ; + blnd_cfg.global_gain = pipe_ctx->plane_state->global_alpha_value; + }else if (per_pixel_alpha) { + blnd_cfg.alpha_mode =MPCC_ALPHA_BLEND_MODE_PER_PIXEL_ALPHA ; + }else { + blnd_cfg.alpha_mode =MPCC_ALPHA_BLEND_MODE_GLOBAL_ALPHA ; + } +if (pipe_ctx->plane_state->global_alpha) blnd_cfg.global_alpha = pipe_ctx->plane_state->global_alpha_value;else
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c +9 -5
@@ -2270,14 +2270,18 @@ void dcn20_update_mpcc(struct dc *dc, struct pipe_ctx *pipe_ctx) pipe_ctx, &blnd_cfg.black_color); } -if (per_pixel_alpha) - blnd_cfg.alpha_mode =MPCC_ALPHA_BLEND_MODE_PER_PIXEL_ALPHA ; -else - blnd_cfg.alpha_mode =MPCC_ALPHA_BLEND_MODE_GLOBAL_ALPHA ; - blnd_cfg.overlap_only = false; blnd_cfg.global_gain =0xff ; +if (per_pixel_alpha && pipe_ctx->plane_state->global_alpha) { + blnd_cfg.alpha_mode =MPCC_ALPHA_BLEND_MODE_PER_PIXEL_ALPHA_COMBINED_GLOBAL_GAIN ; + blnd_cfg.global_gain = pipe_ctx->plane_state->global_alpha_value; + }else if (per_pixel_alpha) { + blnd_cfg.alpha_mode =MPCC_ALPHA_BLEND_MODE_PER_PIXEL_ALPHA ; + }else { + blnd_cfg.alpha_mode =MPCC_ALPHA_BLEND_MODE_GLOBAL_ALPHA ; + } +if (pipe_ctx->plane_state->global_alpha) blnd_cfg.global_alpha = pipe_ctx->plane_state->global_alpha_value;else
drivers/gpu/drm/amd/display/modules/info_packet/info_packet.c +3 -2
@@ -100,7 +100,8 @@ enum vsc_packet_revision {//PB7 = MD0 #define MASK_VTEM_MD0__VRR_EN 0x01#define MASK_VTEM_MD0__M_CONST 0x02 -#define MASK_VTEM_MD0__RESERVED2 0x0C +#define MASK_VTEM_MD0__QMS_EN 0x04 +#define MASK_VTEM_MD0__RESERVED2 0x08#define MASK_VTEM_MD0__FVA_FACTOR_M1 0xF0//MD1
@@ -109,7 +110,7 @@ enum vsc_packet_revision {//MD2 #define MASK_VTEM_MD2__BASE_REFRESH_RATE_98 0x03#define MASK_VTEM_MD2__RB 0x04 -#define MASK_VTEM_MD2__RESERVED3 0xF8 +#define MASK_VTEM_MD2__NEXT_TFR 0xF8//MD3 #define MASK_VTEM_MD3__BASE_REFRESH_RATE_07 0xFF
drivers/gpu/drm/msm/adreno/a6xx_gpu.c +1 -1
@@ -1222,7 +1222,7 @@ a6xx_create_private_address_space(struct msm_gpu *gpu)return ERR_CAST (mmu);return msm_gem_address_space_create (mmu, -"gpu" ,0x100000000ULL ,0x1ffffffffULL ); +"gpu" ,0x100000000ULL ,SZ_4G ); }static uint32_t a6xx_get_rptr (struct msm_gpu *gpu,struct msm_ringbuffer *ring)
drivers/gpu/drm/msm/dsi/dsi_manager.c +1 -1
@@ -644,7 +644,7 @@ struct drm_connector *msm_dsi_manager_connector_init(u8 id)return connector; fail: - connector->funcs->destroy (msm_dsi->connector); + connector->funcs->destroy (connector);return ERR_PTR (ret); }
drivers/gpu/drm/msm/msm_gem.c +1 -0
@@ -849,6 +849,7 @@ void msm_gem_describe(struct drm_gem_object *obj, struct seq_file *m)get_pid_task (aspace->pid,PIDTYPE_PID );if (task) { comm =kstrdup (task->comm,GFP_KERNEL ); +put_task_struct (task); }else { comm =NULL ; }
drivers/gpu/ipu-v3/ipu-di.c +3 -2
@@ -451,8 +451,9 @@ static void ipu_di_config_clock(struct ipu_di *di, error = rate / (sig->mode.pixelclock /1000 ); -dev_dbg (di->ipu->dev," IPU clock can give %lu with divider %u, error %d.%u%%\n" , - rate, div, (signed )(error -1000 ) /10 , error %10 ); +dev_dbg (di->ipu->dev," IPU clock can give %lu with divider %u, error %c%d.%d%%\n" , + rate, div, error <1000 ?'-' :'+' , +abs (error -1000 ) /10 ,abs (error -1000 ) %10 );/* Allow a 1% error */ if (error <1010 && error >=990 ) {
drivers/hv/ring_buffer.c +10 -1
@@ -378,7 +378,16 @@ int hv_ringbuffer_read(struct vmbus_channel *channel,static u32 hv_pkt_iter_avail (const struct hv_ring_buffer_info *rbi) {u32 priv_read_loc = rbi->priv_read_index; -u32 write_loc =READ_ONCE (rbi->ring_buffer->write_index); +u32 write_loc; + +/* +* The Hyper-V host writes the packet data, then uses +* store_release() to update the write_index. Use load_acquire() +* here to prevent loads of the packet data from being re-ordered +* before the read of the write_index and potentially getting +* stale data. +*/ + write_loc =virt_load_acquire (&rbi->ring_buffer->write_index);if (write_loc >= priv_read_loc)return write_loc - priv_read_loc;
drivers/i2c/busses/i2c-pasemi.c +6 -0
@@ -137,6 +137,12 @@ static int pasemi_i2c_xfer_msg(struct i2c_adapter *adapter,TXFIFO_WR (smbus, msg->buf[msg->len-1 ] | (stop ?MTXFIFO_STOP :0 )); + +if (stop) { + err =pasemi_smb_waitready (smbus); +if (err) + goto reset_out; + } }return 0 ;
drivers/infiniband/ulp/iser/iscsi_iser.c +2 -0
@@ -499,6 +499,7 @@ iscsi_iser_conn_bind(struct iscsi_cls_session *cls_session, iser_conn->iscsi_conn = conn; out: +iscsi_put_endpoint (ep);mutex_unlock (&iser_conn->state_mutex);return error; }
@@ -988,6 +989,7 @@ static struct iscsi_transport iscsi_iser_transport = {/* connection management */ .create_conn = iscsi_iser_conn_create, .bind_conn = iscsi_iser_conn_bind, + .unbind_conn = iscsi_conn_unbind, .destroy_conn = iscsi_conn_teardown, .attr_is_visible = iser_attr_is_visible, .set_param = iscsi_iser_set_param,
drivers/md/dm-historical-service-time.c +5 -5
@@ -429,7 +429,7 @@ static struct dm_path *hst_select_path(struct path_selector *ps, {struct selector *s = ps->context;struct path_info *pi =NULL , *best =NULL ; -u64 time_now =sched_clock (); +u64 time_now =ktime_get_ns ();struct dm_path *ret =NULL ;unsigned long flags;
@@ -470,7 +470,7 @@ static int hst_start_io(struct path_selector *ps, struct dm_path *path,static u64 path_service_time (struct path_info *pi,u64 start_time) { -u64 sched_now =ktime_get_ns (); +u64 now =ktime_get_ns ();/* if a previous disk request has finished after this IO was * sent to the hardware, pretend the submission happened
@@ -479,11 +479,11 @@ static u64 path_service_time(struct path_info *pi, u64 start_time)if (time_after64 (pi->last_finish, start_time)) start_time = pi->last_finish; - pi->last_finish = sched_now; -if (time_before64 (sched_now, start_time)) + pi->last_finish = now; +if (time_before64 (now, start_time))return 0 ; -return sched_now - start_time; +return now - start_time; } static int hst_end_io(struct path_selector *ps, struct dm_path *path,
drivers/md/dm-integrity.c +5 -2
@@ -4232,6 +4232,7 @@ static int dm_integrity_ctr(struct dm_target *ti, unsigned argc, char **argv) }if (ic->internal_hash) { +size_t recalc_tags_size; ic->recalc_wq =alloc_workqueue ("dm-integrity-recalc" ,WQ_MEM_RECLAIM ,1 );if (!ic->recalc_wq ) { ti->error ="Cannot allocate workqueue" ;
@@ -4245,8 +4246,10 @@ static int dm_integrity_ctr(struct dm_target *ti, unsigned argc, char **argv) r = -ENOMEM ; goto bad; } - ic->recalc_tags =kvmalloc_array (RECALC_SECTORS >> ic->sb->log2_sectors_per_block, - ic->tag_size,GFP_KERNEL ); + recalc_tags_size = (RECALC_SECTORS >> ic->sb->log2_sectors_per_block) * ic->tag_size; +if (crypto_shash_digestsize (ic->internal_hash) > ic->tag_size) + recalc_tags_size +=crypto_shash_digestsize (ic->internal_hash) - ic->tag_size; + ic->recalc_tags =kvmalloc (recalc_tags_size,GFP_KERNEL );if (!ic->recalc_tags) { ti->error ="Cannot allocate tags for recalculating" ; r = -ENOMEM ;
drivers/media/platform/rockchip/rga/rga.c +1 -1
@@ -895,7 +895,7 @@ static int rga_probe(struct platform_device *pdev) } rga->dst_mmu_pages = (unsigned int *)__get_free_pages (GFP_KERNEL | __GFP_ZERO,3 ); -if (rga->dst_mmu_pages) { +if (!rga->dst_mmu_pages) { ret = -ENOMEM ; goto free_src_pages; }
drivers/memory/atmel-ebi.c +17 -6
@@ -544,20 +544,27 @@ static int atmel_ebi_probe(struct platform_device *pdev) smc_np =of_parse_phandle (dev->of_node,"atmel,smc" ,0 ); ebi->smc.regmap =syscon_node_to_regmap (smc_np); -if (IS_ERR (ebi->smc.regmap)) -return PTR_ERR (ebi->smc.regmap); +if (IS_ERR (ebi->smc.regmap)) { + ret =PTR_ERR (ebi->smc.regmap); + goto put_node; + } ebi->smc.layout =atmel_hsmc_get_reg_layout (smc_np); -if (IS_ERR (ebi->smc.layout)) -return PTR_ERR (ebi->smc.layout); +if (IS_ERR (ebi->smc.layout)) { + ret =PTR_ERR (ebi->smc.layout); + goto put_node; + } ebi->smc.clk =of_clk_get (smc_np,0 );if (IS_ERR (ebi->smc.clk)) { -if (PTR_ERR (ebi->smc.clk) != -ENOENT ) -return PTR_ERR (ebi->smc.clk); +if (PTR_ERR (ebi->smc.clk) != -ENOENT ) { + ret =PTR_ERR (ebi->smc.clk); + goto put_node; + } ebi->smc.clk =NULL ; } +of_node_put (smc_np); ret =clk_prepare_enable (ebi->smc.clk);if (ret)return ret;
@@ -608,6 +615,10 @@ static int atmel_ebi_probe(struct platform_device *pdev) }return of_platform_populate (np,NULL ,NULL , dev); + +put_node: +of_node_put (smc_np); +return ret; }static __maybe_unused int atmel_ebi_resume (struct device *dev)
drivers/memory/renesas-rpc-if.c +9 -1
@@ -592,6 +592,7 @@ static int rpcif_probe(struct platform_device *pdev)struct platform_device *vdev;struct device_node *flash;const char *name; +int ret; flash =of_get_next_child (pdev->dev.of_node,NULL );if (!flash) {
@@ -615,7 +616,14 @@ static int rpcif_probe(struct platform_device *pdev)return -ENOMEM ; vdev->dev.parent = &pdev->dev;platform_set_drvdata (pdev, vdev); -return platform_device_add (vdev); + + ret =platform_device_add (vdev); +if (ret) { +platform_device_put (vdev); +return ret; + } + +return 0 ; }static int rpcif_remove (struct platform_device *pdev)
drivers/net/dsa/ocelot/felix_vsc9959.c +1 -1
@@ -1466,7 +1466,7 @@ static int felix_pci_probe(struct pci_dev *pdev, err =dsa_register_switch (ds);if (err) { -dev_err (&pdev->dev,"Failed to register DSA switch: %d\n" , err); +dev_err_probe (&pdev->dev, err,"Failed to register DSA switch\n" ); goto err_register_ds; }
drivers/net/ethernet/broadcom/genet/bcmgenet.c +2 -2
@@ -76,7 +76,7 @@ static inline void bcmgenet_writel(u32 value, void __iomem *offset)if (IS_ENABLED (CONFIG_MIPS ) &&IS_ENABLED (CONFIG_CPU_BIG_ENDIAN ))__raw_writel (value, offset);else -writel (value, offset); +writel_relaxed (value, offset); }static inline u32 bcmgenet_readl (void __iomem *offset)
@@ -84,7 +84,7 @@ static inline u32 bcmgenet_readl(void __iomem *offset)if (IS_ENABLED (CONFIG_MIPS ) &&IS_ENABLED (CONFIG_CPU_BIG_ENDIAN ))return __raw_readl (offset);else -return readl (offset); +return readl_relaxed (offset); } static inline void dmadesc_set_length_status(struct bcmgenet_priv *priv,
drivers/net/ethernet/mellanox/mlxsw/i2c.c +1 -0
@@ -650,6 +650,7 @@ static int mlxsw_i2c_probe(struct i2c_client *client,return 0 ; errout: +mutex_destroy (&mlxsw_i2c->cmd.lock);i2c_set_clientdata (client,NULL );return err;
drivers/net/ethernet/micrel/Kconfig +1 -0
@@ -37,6 +37,7 @@ config KS8851 config KS8851_MLL tristate "Micrel KS8851 MLL" depends on HAS_IOMEM + depends on PTP_1588_CLOCK_OPTIONAL select MII select CRC32 select EEPROM_93CX6
drivers/net/ethernet/myricom/myri10ge/myri10ge.c +2 -4
@@ -2895,11 +2895,9 @@ static netdev_tx_t myri10ge_sw_tso(struct sk_buff *skb, status =myri10ge_xmit (curr, dev);if (status !=0 ) {dev_kfree_skb_any (curr); -if (segs !=NULL ) { - curr = segs; - segs = next; + skb_list_walk_safe(next, curr, next) { curr->next =NULL ; -dev_kfree_skb_any (segs); +dev_kfree_skb_any (curr); } goto drop; }
drivers/net/ethernet/stmicro/stmmac/altr_tse_pcs.c +0 -8
@@ -57,10 +57,6 @@#define TSE_PCS_USE_SGMII_ENA BIT(0)#define TSE_PCS_IF_USE_SGMII 0x03 -#define SGMII_ADAPTER_CTRL_REG 0x00 -#define SGMII_ADAPTER_DISABLE 0x0001 -#define SGMII_ADAPTER_ENABLE 0x0000 -#define AUTONEGO_LINK_TIMER 20static int tse_pcs_reset (void __iomem *base,struct tse_pcs *pcs)
@@ -202,12 +198,8 @@ void tse_pcs_fix_mac_speed(struct tse_pcs *pcs, struct phy_device *phy_dev, unsigned int speed) {void __iomem *tse_pcs_base = pcs->tse_pcs_base; -void __iomem *sgmii_adapter_base = pcs->sgmii_adapter_base;u32 val; -writew (SGMII_ADAPTER_ENABLE , - sgmii_adapter_base +SGMII_ADAPTER_CTRL_REG ); - pcs->autoneg = phy_dev->autoneg;if (phy_dev->autoneg ==AUTONEG_ENABLE ) {
drivers/net/ethernet/stmicro/stmmac/altr_tse_pcs.h +4 -0
@@ -10,6 +10,10 @@#include <linux/phy.h> #include <linux/timer.h> +#define SGMII_ADAPTER_CTRL_REG 0x00 +#define SGMII_ADAPTER_ENABLE 0x0000 +#define SGMII_ADAPTER_DISABLE 0x0001 +struct tse_pcs {struct device *dev;void __iomem *tse_pcs_base;
drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c +5 -8
@@ -18,9 +18,6 @@#include "altr_tse_pcs.h" -#define SGMII_ADAPTER_CTRL_REG 0x00 -#define SGMII_ADAPTER_DISABLE 0x0001 -#define SYSMGR_EMACGRP_CTRL_PHYSEL_ENUM_GMII_MII 0x0#define SYSMGR_EMACGRP_CTRL_PHYSEL_ENUM_RGMII 0x1#define SYSMGR_EMACGRP_CTRL_PHYSEL_ENUM_RMII 0x2
@@ -62,16 +59,14 @@ static void socfpga_dwmac_fix_mac_speed(void *priv, unsigned int speed) {struct socfpga_dwmac *dwmac = (struct socfpga_dwmac *)priv;void __iomem *splitter_base = dwmac->splitter_base; -void __iomem *tse_pcs_base = dwmac->pcs.tse_pcs_base;void __iomem *sgmii_adapter_base = dwmac->pcs.sgmii_adapter_base;struct device *dev = dwmac->dev;struct net_device *ndev =dev_get_drvdata (dev);struct phy_device *phy_dev = ndev->phydev;u32 val; -if ((tse_pcs_base) && (sgmii_adapter_base)) -writew (SGMII_ADAPTER_DISABLE , - sgmii_adapter_base +SGMII_ADAPTER_CTRL_REG ); +writew (SGMII_ADAPTER_DISABLE , + sgmii_adapter_base +SGMII_ADAPTER_CTRL_REG );if (splitter_base) { val =readl (splitter_base +EMAC_SPLITTER_CTRL_REG );
@@ -93,7 +88,9 @@ static void socfpga_dwmac_fix_mac_speed(void *priv, unsigned int speed)writel (val, splitter_base +EMAC_SPLITTER_CTRL_REG ); } -if (tse_pcs_base && sgmii_adapter_base) +writew (SGMII_ADAPTER_ENABLE , + sgmii_adapter_base +SGMII_ADAPTER_CTRL_REG ); +if (phy_dev)tse_pcs_fix_mac_speed (&dwmac->pcs, phy_dev, speed); }
drivers/net/ethernet/xilinx/xilinx_axienet_main.c +6 -7
@@ -2060,15 +2060,14 @@ static int axienet_probe(struct platform_device *pdev)if (ret) goto cleanup_clk; - lp->phy_node =of_parse_phandle (pdev->dev.of_node,"phy-handle" ,0 ); -if (lp->phy_node) { - ret =axienet_mdio_setup (lp); -if (ret) -dev_warn (&pdev->dev, -"error registering MDIO bus: %d\n" , ret); - } + ret =axienet_mdio_setup (lp); +if (ret) +dev_warn (&pdev->dev, +"error registering MDIO bus: %d\n" , ret); +if (lp->phy_mode ==PHY_INTERFACE_MODE_SGMII || lp->phy_mode ==PHY_INTERFACE_MODE_1000BASEX ) { + lp->phy_node =of_parse_phandle (pdev->dev.of_node,"phy-handle" ,0 );if (!lp->phy_node) {dev_err (&pdev->dev,"phy-handle required for 1000BaseX/SGMII\n" ); ret = -EINVAL ;
drivers/net/hamradio/6pack.c +3 -2
@@ -311,7 +311,6 @@ static void sp_setup(struct net_device *dev) {/* Finish setting up the DEVICE info. */ dev->netdev_ops = &sp_netdev_ops; - dev->needs_free_netdev = true; dev->mtu =SIXP_MTU ; dev->hard_header_len =AX25_MAX_HEADER_LEN ; dev->header_ops = &ax25_header_ops;
@@ -679,9 +678,11 @@ static void sixpack_close(struct tty_struct *tty)del_timer_sync (&sp->tx_t);del_timer_sync (&sp->resync_t); -/* Free all 6pack frame buffers. */ +/* Free all 6pack frame buffers after unreg. */ kfree (sp->rbuff);kfree (sp->xbuff); + +free_netdev (sp->dev); }/* Perform I/O control on an active 6pack channel. */
drivers/net/mdio/mdio-bcm-unimac.c +7 -9
@@ -5,20 +5,18 @@* Copyright (C) 2014-2017 Broadcom */ +#include <linux/clk.h> +#include <linux/delay.h> +#include <linux/io.h> #include <linux/kernel.h> -#include <linux/phy.h> -#include <linux/platform_device.h> -#include <linux/sched.h> #include <linux/module.h> -#include <linux/io.h> -#include <linux/delay.h> -#include <linux/clk.h> -#include <linux/of.h> -#include <linux/of_platform.h> #include <linux/of_mdio.h> - +#include <linux/of_platform.h> +#include <linux/phy.h> #include <linux/platform_data/mdio-bcm-unimac.h> +#include <linux/platform_device.h> +#include <linux/sched.h> #define MDIO_CMD 0x00#define MDIO_START_BUSY (1 << 29)
drivers/net/mdio/mdio-bitbang.c +2 -2
@@ -14,10 +14,10 @@* Vitaly Bordug <[email protected]> */ -#include <linux/module.h> +#include <linux/delay.h> #include <linux/mdio-bitbang.h> +#include <linux/module.h> #include <linux/types.h> -#include <linux/delay.h> #define MDIO_READ 2#define MDIO_WRITE 1
drivers/net/mdio/mdio-cavium.c +1 -1
@@ -4,9 +4,9 @@*/ #include <linux/delay.h> +#include <linux/io.h> #include <linux/module.h> #include <linux/phy.h> -#include <linux/io.h> #include "mdio-cavium.h"
drivers/net/mdio/mdio-gpio.c +5 -5
@@ -17,15 +17,15 @@* Vitaly Bordug <[email protected]> */ -#include <linux/module.h> -#include <linux/slab.h> +#include <linux/gpio/consumer.h> #include <linux/interrupt.h> -#include <linux/platform_device.h> -#include <linux/platform_data/mdio-gpio.h> #include <linux/mdio-bitbang.h> #include <linux/mdio-gpio.h> -#include <linux/gpio/consumer.h> +#include <linux/module.h> #include <linux/of_mdio.h> +#include <linux/platform_data/mdio-gpio.h> +#include <linux/platform_device.h> +#include <linux/slab.h> struct mdio_gpio_info {struct mdiobb_ctrl ctrl;
drivers/net/mdio/mdio-ipq4019.c +2 -2
@@ -3,10 +3,10 @@/* Copyright (c) 2020 Sartura Ltd. */ #include <linux/delay.h> -#include <linux/kernel.h> -#include <linux/module.h> #include <linux/io.h> #include <linux/iopoll.h> +#include <linux/kernel.h> +#include <linux/module.h> #include <linux/of_address.h> #include <linux/of_mdio.h> #include <linux/phy.h>
drivers/net/mdio/mdio-ipq8064.c +2 -2
@@ -7,12 +7,12 @@#include <linux/delay.h> #include <linux/kernel.h> +#include <linux/mfd/syscon.h> #include <linux/module.h> -#include <linux/regmap.h> #include <linux/of_mdio.h> #include <linux/of_address.h> #include <linux/platform_device.h> -#include <linux/mfd/syscon.h> +#include <linux/regmap.h> /* MII address register definitions */ #define MII_ADDR_REG_ADDR 0x10
drivers/net/mdio/mdio-mscc-miim.c +4 -4
@@ -6,14 +6,14 @@* Copyright (c) 2017 Microsemi Corporation */ -#include <linux/kernel.h> -#include <linux/module.h> -#include <linux/phy.h> -#include <linux/platform_device.h> #include <linux/bitops.h> #include <linux/io.h> #include <linux/iopoll.h> +#include <linux/kernel.h> +#include <linux/module.h> #include <linux/of_mdio.h> +#include <linux/phy.h> +#include <linux/platform_device.h> #define MSCC_MIIM_REG_STATUS 0x0#define MSCC_MIIM_STATUS_STAT_PENDING BIT(2)
drivers/net/mdio/mdio-mux-bcm-iproc.c +5 -5
@@ -3,14 +3,14 @@* Copyright 2016 Broadcom */ #include <linux/clk.h> -#include <linux/platform_device.h> +#include <linux/delay.h> #include <linux/device.h> -#include <linux/of_mdio.h> +#include <linux/iopoll.h> +#include <linux/mdio-mux.h> #include <linux/module.h> +#include <linux/of_mdio.h> #include <linux/phy.h> -#include <linux/mdio-mux.h> -#include <linux/delay.h> -#include <linux/iopoll.h> +#include <linux/platform_device.h> #define MDIO_RATE_ADJ_EXT_OFFSET 0x000#define MDIO_RATE_ADJ_INT_OFFSET 0x004
drivers/net/mdio/mdio-mux-gpio.c +4 -4
@@ -3,13 +3,13 @@* Copyright (C) 2011, 2012 Cavium, Inc. */ -#include <linux/platform_device.h> #include <linux/device.h> -#include <linux/of_mdio.h> +#include <linux/gpio/consumer.h> +#include <linux/mdio-mux.h> #include <linux/module.h> +#include <linux/of_mdio.h> #include <linux/phy.h> -#include <linux/mdio-mux.h> -#include <linux/gpio/consumer.h> +#include <linux/platform_device.h> #define DRV_VERSION "1.1"#define DRV_DESCRIPTION "GPIO controlled MDIO bus multiplexer driver"
drivers/net/mdio/mdio-mux-mmioreg.c +3 -3
@@ -7,13 +7,13 @@* Copyright 2012 Freescale Semiconductor, Inc. */ -#include <linux/platform_device.h> #include <linux/device.h> +#include <linux/mdio-mux.h> +#include <linux/module.h> #include <linux/of_address.h> #include <linux/of_mdio.h> -#include <linux/module.h> #include <linux/phy.h> -#include <linux/mdio-mux.h> +#include <linux/platform_device.h> struct mdio_mux_mmioreg_state {void *mux_handle;
drivers/net/mdio/mdio-mux-multiplexer.c +1 -1
@@ -4,10 +4,10 @@* Copyright 2019 NXP */ -#include <linux/platform_device.h> #include <linux/mdio-mux.h> #include <linux/module.h> #include <linux/mux/consumer.h> +#include <linux/platform_device.h> struct mdio_mux_multiplexer_state {struct mux_control *muxc;
drivers/net/mdio/mdio-mux.c +3 -3
@@ -3,12 +3,12 @@* Copyright (C) 2011, 2012 Cavium, Inc. */ -#include <linux/platform_device.h> -#include <linux/mdio-mux.h> -#include <linux/of_mdio.h> #include <linux/device.h> +#include <linux/mdio-mux.h> #include <linux/module.h> +#include <linux/of_mdio.h> #include <linux/phy.h> +#include <linux/platform_device.h> #define DRV_DESCRIPTION "MDIO bus multiplexer driver"
drivers/net/mdio/mdio-octeon.c +4 -4
@@ -3,13 +3,13 @@* Copyright (C) 2009-2015 Cavium, Inc. */ -#include <linux/platform_device.h> +#include <linux/gfp.h> +#include <linux/io.h> +#include <linux/module.h> #include <linux/of_address.h> #include <linux/of_mdio.h> -#include <linux/module.h> -#include <linux/gfp.h> #include <linux/phy.h> -#include <linux/io.h> +#include <linux/platform_device.h> #include "mdio-cavium.h"
drivers/net/mdio/mdio-thunder.c +5 -5
@@ -3,14 +3,14 @@* Copyright (C) 2009-2016 Cavium, Inc. */ -#include <linux/of_address.h> -#include <linux/of_mdio.h> -#include <linux/module.h> +#include <linux/acpi.h> #include <linux/gfp.h> -#include <linux/phy.h> #include <linux/io.h> -#include <linux/acpi.h> +#include <linux/module.h> +#include <linux/of_address.h> +#include <linux/of_mdio.h> #include <linux/pci.h> +#include <linux/phy.h> #include "mdio-cavium.h"
drivers/net/mdio/mdio-xgene.c +3 -3
@@ -13,11 +13,11 @@#include <linux/io.h> #include <linux/mdio/mdio-xgene.h> #include <linux/module.h> -#include <linux/of_platform.h> -#include <linux/of_net.h> #include <linux/of_mdio.h> -#include <linux/prefetch.h> +#include <linux/of_net.h> +#include <linux/of_platform.h> #include <linux/phy.h> +#include <linux/prefetch.h> #include <net/ip.h> static bool xgene_mdio_status;
drivers/net/mdio/of_mdio.c +5 -5
@@ -8,17 +8,17 @@* out of the OpenFirmware device tree and using it to populate an mii_bus. */ -#include <linux/kernel.h> #include <linux/device.h> -#include <linux/netdevice.h> #include <linux/err.h> -#include <linux/phy.h> -#include <linux/phy_fixed.h> +#include <linux/kernel.h> +#include <linux/module.h> +#include <linux/netdevice.h> #include <linux/of.h> #include <linux/of_irq.h> #include <linux/of_mdio.h> #include <linux/of_net.h> -#include <linux/module.h> +#include <linux/phy.h> +#include <linux/phy_fixed.h> #define DEFAULT_GPIO_RESET_DELAY 10/* in microseconds */
drivers/net/slip/slip.c +1 -1
@@ -468,7 +468,7 @@ static void sl_tx_timeout(struct net_device *dev, unsigned int txqueue)spin_lock (&sl->lock);if (netif_queue_stopped (dev)) { -if (!netif_running (dev)) +if (!netif_running (dev) || !sl->tty) goto out;/* May be we must check transmitter timeout here ?
drivers/net/usb/aqc111.c +7 -2
@@ -1102,10 +1102,15 @@ static int aqc111_rx_fixup(struct usbnet *dev, struct sk_buff *skb)if (start_of_descs != desc_offset) goto err; -/* self check desc_offset from header*/ -if (desc_offset >= skb_len) +/* self check desc_offset from header and make sure that the +* bounds of the metadata array are inside the SKB +*/ +if (pkt_count *2 + desc_offset >= skb_len) goto err; +/* Packets must not overlap the metadata array */ +skb_trim (skb, desc_offset); +if (pkt_count ==0 ) goto err;
drivers/net/veth.c +1 -1
@@ -292,7 +292,7 @@ static netdev_tx_t veth_xmit(struct sk_buff *skb, struct net_device *dev)rcu_read_lock (); rcv =rcu_dereference (priv->peer); -if (unlikely (!rcv)) { +if (unlikely (!rcv) || !pskb_may_pull (skb,ETH_HLEN )) {kfree_skb (skb); goto drop; }
drivers/net/wireless/ath/ath9k/main.c +1 -1
@@ -839,7 +839,7 @@ static bool ath9k_txq_list_has_key(struct list_head *txq_list, u32 keyix)continue ; txinfo =IEEE80211_SKB_CB (bf->bf_mpdu); - fi = (struct ath_frame_info *)&txinfo->rate_driver_data[0 ]; + fi = (struct ath_frame_info *)&txinfo->status.status_driver_data[0 ];if (fi->keyix == keyix)return true; }
drivers/net/wireless/ath/ath9k/xmit.c +21 -12
@@ -141,8 +141,8 @@ static struct ath_frame_info *get_frame_info(struct sk_buff *skb) {struct ieee80211_tx_info *tx_info =IEEE80211_SKB_CB (skb);BUILD_BUG_ON (sizeof (struct ath_frame_info ) > -sizeof (tx_info->rate_driver_data)); -return (struct ath_frame_info *) &tx_info->rate_driver_data[0 ]; +sizeof (tx_info->status.status_driver_data)); +return (struct ath_frame_info *) &tx_info->status.status_driver_data[0 ]; }static void ath_send_bar (struct ath_atx_tid *tid,u16 seqno)
@@ -2501,6 +2501,16 @@ static void ath_tx_complete_buf(struct ath_softc *sc, struct ath_buf *bf,spin_unlock_irqrestore (&sc->tx.txbuflock, flags); } +static void ath_clear_tx_status (struct ieee80211_tx_info *tx_info) +{ +void *ptr = &tx_info->status; + +memset (ptr +sizeof (tx_info->status.rates),0 , +sizeof (tx_info->status) - +sizeof (tx_info->status.rates) - +sizeof (tx_info->status.status_driver_data)); +} +static void ath_tx_rc_status (struct ath_softc *sc,struct ath_buf *bf,struct ath_tx_status *ts,int nframes,int nbad,int txok)
@@ -2512,6 +2522,8 @@ static void ath_tx_rc_status(struct ath_softc *sc, struct ath_buf *bf,struct ath_hw *ah = sc->sc_ah;u8 i, tx_rateindex; +ath_clear_tx_status (tx_info); +if (txok) tx_info->status.ack_signal = ts->ts_rssi;
@@ -2526,6 +2538,13 @@ static void ath_tx_rc_status(struct ath_softc *sc, struct ath_buf *bf, tx_info->status.ampdu_len = nframes; tx_info->status.ampdu_ack_len = nframes - nbad; + tx_info->status.rates[tx_rateindex].count = ts->ts_longretry +1 ; + +for (i = tx_rateindex +1 ; i < hw->max_rates; i++) { + tx_info->status.rates[i].count =0 ; + tx_info->status.rates[i].idx =-1 ; + } +if ((ts->ts_status &ATH9K_TXERR_FILT ) ==0 && (tx_info->flags &IEEE80211_TX_CTL_NO_ACK ) ==0 ) {/*
@@ -2547,16 +2566,6 @@ static void ath_tx_rc_status(struct ath_softc *sc, struct ath_buf *bf, tx_info->status.rates[tx_rateindex].count = hw->max_rate_tries; } - -for (i = tx_rateindex +1 ; i < hw->max_rates; i++) { - tx_info->status.rates[i].count =0 ; - tx_info->status.rates[i].idx =-1 ; - } - - tx_info->status.rates[tx_rateindex].count = ts->ts_longretry +1 ; - -/* we report airtime in ath_tx_count_airtime(), don't report twice */ - tx_info->status.tx_time =0 ; }static void ath_tx_processq (struct ath_softc *sc,struct ath_txq *txq)
drivers/perf/fsl_imx8_ddr_perf.c +1 -1
@@ -29,7 +29,7 @@#define CNTL_OVER_MASK 0xFFFFFFFE#define CNTL_CSV_SHIFT 24 -#define CNTL_CSV_MASK (0xFF << CNTL_CSV_SHIFT) +#define CNTL_CSV_MASK (0xFFU << CNTL_CSV_SHIFT)#define EVENT_CYCLES_ID 0#define EVENT_CYCLES_COUNTER 0
drivers/regulator/wm8994-regulator.c +39 -3
54 lines not on this page · raw message
drivers/scsi/be2iscsi/be_iscsi.c +13 -6
@@ -182,6 +182,7 @@ int beiscsi_conn_bind(struct iscsi_cls_session *cls_session,struct beiscsi_endpoint *beiscsi_ep;struct iscsi_endpoint *ep;uint16_t cri_index; +int rc =0 ; ep =iscsi_lookup_endpoint (transport_fd);if (!ep)
@@ -189,15 +190,17 @@ int beiscsi_conn_bind(struct iscsi_cls_session *cls_session, beiscsi_ep = ep->dd_data; -if (iscsi_conn_bind (cls_session, cls_conn, is_leading)) -return -EINVAL ; +if (iscsi_conn_bind (cls_session, cls_conn, is_leading)) { + rc = -EINVAL ; + goto put_ep; + }if (beiscsi_ep->phba != phba) {beiscsi_log (phba,KERN_ERR ,BEISCSI_LOG_CONFIG ,"BS_%d : beiscsi_ep->hba=%p not equal to phba=%p\n" , beiscsi_ep->phba, phba); - -return -EEXIST ; + rc = -EEXIST ; + goto put_ep; } cri_index =BE_GET_CRI_FROM_CID (beiscsi_ep->ep_cid);if (phba->conn_table[cri_index]) {
@@ -209,7 +212,8 @@ int beiscsi_conn_bind(struct iscsi_cls_session *cls_session, beiscsi_ep->ep_cid, beiscsi_conn, phba->conn_table[cri_index]); -return -EINVAL ; + rc = -EINVAL ; + goto put_ep; } }
@@ -226,7 +230,10 @@ int beiscsi_conn_bind(struct iscsi_cls_session *cls_session,"BS_%d : cid %d phba->conn_table[%u]=%p\n" , beiscsi_ep->ep_cid, cri_index, beiscsi_conn); phba->conn_table[cri_index] = beiscsi_conn; -return 0 ; + +put_ep: +iscsi_put_endpoint (ep); +return rc; }static int beiscsi_iface_create_ipv4 (struct beiscsi_hba *phba)
drivers/scsi/be2iscsi/be_main.c +1 -0
@@ -5810,6 +5810,7 @@ struct iscsi_transport beiscsi_iscsi_transport = { .destroy_session = beiscsi_session_destroy, .create_conn = beiscsi_conn_create, .bind_conn = beiscsi_conn_bind, + .unbind_conn = iscsi_conn_unbind, .destroy_conn = iscsi_conn_teardown, .attr_is_visible = beiscsi_attr_is_visible, .set_iface_param = beiscsi_iface_set_param,
drivers/scsi/bnx2i/bnx2i_iscsi.c +17 -7
@@ -1422,17 +1422,23 @@ static int bnx2i_conn_bind(struct iscsi_cls_session *cls_session,* Forcefully terminate all in progress connection recovery at the * earliest, either in bind(), send_pdu(LOGIN), or conn_start() */ -if (bnx2i_adapter_ready (hba)) -return -EIO ; +if (bnx2i_adapter_ready (hba)) { + ret_code = -EIO ; + goto put_ep; + } bnx2i_ep = ep->dd_data;if ((bnx2i_ep->state ==EP_STATE_TCP_FIN_RCVD ) || - (bnx2i_ep->state ==EP_STATE_TCP_RST_RCVD )) + (bnx2i_ep->state ==EP_STATE_TCP_RST_RCVD )) {/* Peer disconnect via' FIN or RST */ -return -EINVAL ; + ret_code = -EINVAL ; + goto put_ep; + } -if (iscsi_conn_bind (cls_session, cls_conn, is_leading)) -return -EINVAL ; +if (iscsi_conn_bind (cls_session, cls_conn, is_leading)) { + ret_code = -EINVAL ; + goto put_ep; + }if (bnx2i_ep->hba != hba) {/* Error - TCP connection does not belong to this device
@@ -1443,7 +1449,8 @@ static int bnx2i_conn_bind(struct iscsi_cls_session *cls_session,iscsi_conn_printk (KERN_ALERT , cls_conn->dd_data,"belong to hba (%s)\n" , hba->netdev->name); -return -EEXIST ; + ret_code = -EEXIST ; + goto put_ep; } bnx2i_ep->conn = bnx2i_conn; bnx2i_conn->ep = bnx2i_ep;
@@ -1460,6 +1467,8 @@ static int bnx2i_conn_bind(struct iscsi_cls_session *cls_session,bnx2i_put_rq_buf (bnx2i_conn,0 );bnx2i_arm_cq_event_coalescing (bnx2i_conn->ep,CNIC_ARM_CQE ); +put_ep: +iscsi_put_endpoint (ep);return ret_code; }
@@ -2278,6 +2287,7 @@ struct iscsi_transport bnx2i_iscsi_transport = { .destroy_session = bnx2i_session_destroy, .create_conn = bnx2i_conn_create, .bind_conn = bnx2i_conn_bind, + .unbind_conn = iscsi_conn_unbind, .destroy_conn = bnx2i_conn_destroy, .attr_is_visible = bnx2i_attr_is_visible, .set_param = iscsi_set_param,
drivers/scsi/cxgbi/cxgb3i/cxgb3i.c +1 -0
@@ -117,6 +117,7 @@ static struct iscsi_transport cxgb3i_iscsi_transport = {/* connection management */ .create_conn = cxgbi_create_conn, .bind_conn = cxgbi_bind_conn, + .unbind_conn = iscsi_conn_unbind, .destroy_conn = iscsi_tcp_conn_teardown, .start_conn = iscsi_conn_start, .stop_conn = iscsi_conn_stop,
drivers/scsi/cxgbi/cxgb4i/cxgb4i.c +1 -0
@@ -134,6 +134,7 @@ static struct iscsi_transport cxgb4i_iscsi_transport = {/* connection management */ .create_conn = cxgbi_create_conn, .bind_conn = cxgbi_bind_conn, + .unbind_conn = iscsi_conn_unbind, .destroy_conn = iscsi_tcp_conn_teardown, .start_conn = iscsi_conn_start, .stop_conn = iscsi_conn_stop,
drivers/scsi/cxgbi/libcxgbi.c +8 -4
@@ -2690,11 +2690,13 @@ int cxgbi_bind_conn(struct iscsi_cls_session *cls_session, err = csk->cdev->csk_ddp_setup_pgidx (csk, csk->tid, ppm->tformat.pgsz_idx_dflt);if (err <0 ) -return err; + goto put_ep; err =iscsi_conn_bind (cls_session, cls_conn, is_leading); -if (err) -return -EINVAL ; +if (err) { + err = -EINVAL ; + goto put_ep; + }/* calculate the tag idx bits needed for this conn based on cmds_max */ cconn->task_idx_bits = (__ilog2_u32 (conn->session->cmds_max -1 )) +1 ;
@@ -2715,7 +2717,9 @@ int cxgbi_bind_conn(struct iscsi_cls_session *cls_session,/* init recv engine */ iscsi_tcp_hdr_recv_prep (tcp_conn); -return 0 ; +put_ep: +iscsi_put_endpoint (ep); +return err; }EXPORT_SYMBOL_GPL (cxgbi_bind_conn);
drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c +1 -1
@@ -35,7 +35,7 @@#define IBMVSCSIS_VERSION "v0.2" -#define INITIAL_SRP_LIMIT 800 +#define INITIAL_SRP_LIMIT 1024#define DEFAULT_MAX_SECTORS 256#define MAX_TXU 1024 * 1024
drivers/scsi/libiscsi.c +62 -8
91 lines not on this page · raw message
drivers/scsi/lpfc/lpfc_init.c +2 -0
@@ -13614,6 +13614,8 @@ lpfc_io_slot_reset_s4(struct pci_dev *pdev) psli->sli_flag &= ~LPFC_SLI_ACTIVE ;spin_unlock_irq (&phba->hbalock); +/* Init cpu_map array */ +lpfc_cpu_map_array_init (phba);/* Configure and enable interrupt */ intr_mode =lpfc_sli4_enable_intr (phba, phba->intr_mode);if (intr_mode ==LPFC_INTR_ERROR ) {
drivers/scsi/megaraid/megaraid_sas.h +3 -0
@@ -2554,6 +2554,9 @@ struct megasas_instance_template {#define MEGASAS_IS_LOGICAL (sdev) \ ((sdev->channel < MEGASAS_MAX_PD_CHANNELS) ? 0 : 1) +#define MEGASAS_IS_LUN_VALID (sdev) \ + (((sdev)->lun == 0) ? 1 : 0) +#define MEGASAS_DEV_INDEX (scp) \ (((scp->device->channel % 2) * MEGASAS_MAX_DEV_PER_CHANNEL) + \ scp->device->id)
drivers/scsi/megaraid/megaraid_sas_base.c +7 -0
@@ -2111,6 +2111,9 @@ static int megasas_slave_alloc(struct scsi_device *sdev) goto scan_target; }return -ENXIO ; + }else if (!MEGASAS_IS_LUN_VALID (sdev)) { +sdev_printk (KERN_INFO , sdev,"%s: invalid LUN\n" , __func__); +return -ENXIO ; } scan_target:
@@ -2141,6 +2144,10 @@ static void megasas_slave_destroy(struct scsi_device *sdev) instance =megasas_lookup_instance (sdev->host->host_no);if (MEGASAS_IS_LOGICAL (sdev)) { +if (!MEGASAS_IS_LUN_VALID (sdev)) { +sdev_printk (KERN_INFO , sdev,"%s: invalid LUN\n" , __func__); +return ; + } ld_tgt_id =MEGASAS_TARGET_ID (sdev); instance->ld_tgtid_status[ld_tgt_id] =LD_TARGET_ID_DELETED ;if (megasas_dbg_lvl &LD_PD_DEBUG )
drivers/scsi/mvsas/mv_init.c +1 -0
@@ -646,6 +646,7 @@ static struct pci_device_id mvs_pci_table[] = { { PCI_VDEVICE(ARECA, PCI_DEVICE_ID_ARECA_1300), chip_1300 }, { PCI_VDEVICE(ARECA, PCI_DEVICE_ID_ARECA_1320), chip_1320 }, { PCI_VDEVICE(ADAPTEC2, 0x0450), chip_6440 }, + { PCI_VDEVICE(TTI, 0x2640), chip_6440 }, { PCI_VDEVICE(TTI, 0x2710), chip_9480 }, { PCI_VDEVICE(TTI, 0x2720), chip_9480 }, { PCI_VDEVICE(TTI, 0x2721), chip_9480 },
drivers/scsi/pm8001/pm80xx_hwi.c +24 -9
@@ -765,6 +765,10 @@ static void init_default_table_values(struct pm8001_hba_info *pm8001_ha) pm8001_ha->main_cfg_tbl.pm80xx_tbl.pcs_event_log_severity =0x01 ; pm8001_ha->main_cfg_tbl.pm80xx_tbl.fatal_err_interrupt =0x01 ; +/* Enable higher IQs and OQs, 32 to 63, bit 16 */ +if (pm8001_ha->max_q_num >32 ) + pm8001_ha->main_cfg_tbl.pm80xx_tbl.fatal_err_interrupt |= +1 <<16 ;/* Disable end to end CRC checking */ pm8001_ha->main_cfg_tbl.pm80xx_tbl.crc_core_dump = (0x1 <<16 );
@@ -1024,6 +1028,13 @@ static int mpi_init_check(struct pm8001_hba_info *pm8001_ha)if (0x0000 != gst_len_mpistate)return -EBUSY ; +/* +* As per controller datasheet, after successful MPI +* initialization minimum 500ms delay is required before +* issuing commands. +*/ +msleep (500 ); +return 0 ; }
@@ -1682,10 +1693,11 @@ static void pm80xx_chip_interrupt_enable(struct pm8001_hba_info *pm8001_ha, u8 vec) {#ifdef PM8001_USE_MSIX -u32 mask; - mask = (u32)(1 << vec); - -pm8001_cw32 (pm8001_ha,0 ,MSGU_ODMR_CLR , (u32)(mask &0xFFFFFFFF )); +if (vec <32 ) +pm8001_cw32 (pm8001_ha,0 ,MSGU_ODMR_CLR ,1U << vec); +else +pm8001_cw32 (pm8001_ha,0 ,MSGU_ODMR_CLR_U , +1U << (vec -32 ));return ;#endif pm80xx_chip_intx_interrupt_enable (pm8001_ha);
@@ -1701,12 +1713,15 @@ static void pm80xx_chip_interrupt_disable(struct pm8001_hba_info *pm8001_ha, u8 vec) {#ifdef PM8001_USE_MSIX -u32 mask; -if (vec ==0xFF ) - mask =0xFFFFFFFF ; +if (vec ==0xFF ) { +/* disable all vectors 0-31, 32-63 */ +pm8001_cw32 (pm8001_ha,0 ,MSGU_ODMR ,0xFFFFFFFF ); +pm8001_cw32 (pm8001_ha,0 ,MSGU_ODMR_U ,0xFFFFFFFF ); + }else if (vec <32 ) +pm8001_cw32 (pm8001_ha,0 ,MSGU_ODMR ,1U << vec);else - mask = (u32)(1 << vec); -pm8001_cw32 (pm8001_ha,0 ,MSGU_ODMR , (u32)(mask &0xFFFFFFFF )); +pm8001_cw32 (pm8001_ha,0 ,MSGU_ODMR_U , +1U << (vec -32 ));return ;#endif pm80xx_chip_intx_interrupt_disable (pm8001_ha);
drivers/scsi/qedi/qedi_iscsi.c +19 -7
@@ -387,6 +387,7 @@ static int qedi_conn_bind(struct iscsi_cls_session *cls_session,struct qedi_ctx *qedi =iscsi_host_priv (shost);struct qedi_endpoint *qedi_ep;struct iscsi_endpoint *ep; +int rc =0 ; ep =iscsi_lookup_endpoint (transport_fd);if (!ep)
@@ -394,11 +395,16 @@ static int qedi_conn_bind(struct iscsi_cls_session *cls_session, qedi_ep = ep->dd_data;if ((qedi_ep->state ==EP_STATE_TCP_FIN_RCVD ) || - (qedi_ep->state ==EP_STATE_TCP_RST_RCVD )) -return -EINVAL ; + (qedi_ep->state ==EP_STATE_TCP_RST_RCVD )) { + rc = -EINVAL ; + goto put_ep; + } + +if (iscsi_conn_bind (cls_session, cls_conn, is_leading)) { + rc = -EINVAL ; + goto put_ep; + } -if (iscsi_conn_bind (cls_session, cls_conn, is_leading)) -return -EINVAL ; qedi_ep->conn = qedi_conn; qedi_conn->ep = qedi_ep;
@@ -408,13 +414,18 @@ static int qedi_conn_bind(struct iscsi_cls_session *cls_session, qedi_conn->cmd_cleanup_req =0 ; qedi_conn->cmd_cleanup_cmpl =0 ; -if (qedi_bind_conn_to_iscsi_cid (qedi, qedi_conn)) -return -EINVAL ; +if (qedi_bind_conn_to_iscsi_cid (qedi, qedi_conn)) { + rc = -EINVAL ; + goto put_ep; + } +spin_lock_init (&qedi_conn->tmf_work_lock);INIT_LIST_HEAD (&qedi_conn->tmf_work_list);init_waitqueue_head (&qedi_conn->wait_queue); -return 0 ; +put_ep: +iscsi_put_endpoint (ep); +return rc; } static int qedi_iscsi_update_conn(struct qedi_ctx *qedi,
@@ -1428,6 +1439,7 @@ struct iscsi_transport qedi_iscsi_transport = { .destroy_session = qedi_session_destroy, .create_conn = qedi_conn_create, .bind_conn = qedi_conn_bind, + .unbind_conn = iscsi_conn_unbind, .start_conn = qedi_conn_start, .stop_conn = iscsi_conn_stop, .destroy_conn = qedi_conn_destroy,
drivers/scsi/qla4xxx/ql4_os.c +2 -0
@@ -259,6 +259,7 @@ static struct iscsi_transport qla4xxx_iscsi_transport = { .start_conn = qla4xxx_conn_start, .create_conn = qla4xxx_conn_create, .bind_conn = qla4xxx_conn_bind, + .unbind_conn = iscsi_conn_unbind, .stop_conn = iscsi_conn_stop, .destroy_conn = qla4xxx_conn_destroy, .set_param = iscsi_set_param,
@@ -3237,6 +3238,7 @@ static int qla4xxx_conn_bind(struct iscsi_cls_session *cls_session, conn = cls_conn->dd_data; qla_conn = conn->dd_data; qla_conn->qla_ep = ep->dd_data; +iscsi_put_endpoint (ep);return 0 ; }
drivers/scsi/scsi_transport_iscsi.c +333 -208
710 lines not on this page · raw message
drivers/target/target_core_user.c +2 -1
@@ -1676,6 +1676,7 @@ static struct page *tcmu_try_get_block_page(struct tcmu_dev *udev, uint32_t dbi)mutex_lock (&udev->cmdr_lock); page =tcmu_get_block_page (udev, dbi);if (likely (page)) { +get_page (page);mutex_unlock (&udev->cmdr_lock);return page; }
@@ -1714,6 +1715,7 @@ static vm_fault_t tcmu_vma_fault(struct vm_fault *vmf)/* For the vmalloc()ed cmd area pages */ addr = (void *)(unsigned long )info->mem[mi].addr + offset; page =vmalloc_to_page (addr); +get_page (page); }else {uint32_t dbi;
@@ -1724,7 +1726,6 @@ static vm_fault_t tcmu_vma_fault(struct vm_fault *vmf)return VM_FAULT_SIGBUS ; } -get_page (page); vmf->page = page;return 0 ; }
fs/btrfs/block-group.c +0 -4
@@ -2570,7 +2570,6 @@ int btrfs_start_dirty_block_groups(struct btrfs_trans_handle *trans)struct btrfs_path *path =NULL ;LIST_HEAD (dirty);struct list_head *io = &cur_trans->io_bgs; -int num_started =0 ;int loops =0 ;spin_lock (&cur_trans->dirty_bgs_lock);
@@ -2636,7 +2635,6 @@ int btrfs_start_dirty_block_groups(struct btrfs_trans_handle *trans) cache->io_ctl.inode =NULL ; ret =btrfs_write_out_cache (trans, cache, path);if (ret ==0 && cache->io_ctl.inode) { - num_started++; should_put =0 ;/*
@@ -2737,7 +2735,6 @@ int btrfs_write_dirty_block_groups(struct btrfs_trans_handle *trans)int should_put;struct btrfs_path *path;struct list_head *io = &cur_trans->io_bgs; -int num_started =0 ; path =btrfs_alloc_path ();if (!path)
@@ -2795,7 +2792,6 @@ int btrfs_write_dirty_block_groups(struct btrfs_trans_handle *trans) cache->io_ctl.inode =NULL ; ret =btrfs_write_out_cache (trans, cache, path);if (ret ==0 && cache->io_ctl.inode) { - num_started++; should_put =0 ;list_add_tail (&cache->io_list, io); }else {
fs/btrfs/disk-io.c +3 -2
@@ -1596,9 +1596,10 @@ static struct btrfs_root *btrfs_get_root_ref(struct btrfs_fs_info *fs_info, ret =btrfs_insert_fs_root (fs_info, root);if (ret) { -btrfs_put_root (root); -if (ret == -EEXIST ) +if (ret == -EEXIST ) { +btrfs_put_root (root); goto again; + } goto fail; }return root;
fs/btrfs/file.c +11 -2
@@ -2833,8 +2833,9 @@ int btrfs_replace_file_extents(struct inode *inode, struct btrfs_path *path,return ret; } -static int btrfs_punch_hole (struct inode *inode,loff_t offset,loff_t len) +static int btrfs_punch_hole (struct file *file,loff_t offset,loff_t len) { +struct inode *inode =file_inode (file);struct btrfs_fs_info *fs_info =btrfs_sb (inode->i_sb);struct btrfs_root *root =BTRFS_I (inode)->root;struct extent_state *cached_state =NULL ;
@@ -2866,6 +2867,10 @@ static int btrfs_punch_hole(struct inode *inode, loff_t offset, loff_t len) goto out_only_mutex; } + ret =file_modified (file); +if (ret) + goto out_only_mutex; + lockstart =round_up (offset,btrfs_inode_sectorsize (BTRFS_I (inode))); lockend =round_down (offset + len,btrfs_inode_sectorsize (BTRFS_I (inode))) -1 ;
@@ -3301,7 +3306,7 @@ static long btrfs_fallocate(struct file *file, int mode,return -EOPNOTSUPP ;if (mode &FALLOC_FL_PUNCH_HOLE ) -return btrfs_punch_hole (inode, offset, len); +return btrfs_punch_hole (file, offset, len);/* * Only trigger disk allocation, don't trigger qgroup reserve
@@ -3323,6 +3328,10 @@ static long btrfs_fallocate(struct file *file, int mode, goto out; } + ret =file_modified (file); +if (ret) + goto out; +/* * TODO: Move these two operations after we have checked * accurate reserved space, or fallocate can still fail but
fs/btrfs/inode.c +0 -1
@@ -995,7 +995,6 @@ static noinline int cow_file_range(struct btrfs_inode *inode,int ret =0 ;if (btrfs_is_free_space_inode (inode)) { -WARN_ON_ONCE (1 ); ret = -EINVAL ; goto out_unlock; }
fs/btrfs/volumes.c +2 -0
@@ -4220,10 +4220,12 @@ static int balance_kthread(void *data)struct btrfs_fs_info *fs_info = data;int ret =0 ; +sb_start_write (fs_info->sb);mutex_lock (&fs_info->balance_mutex);if (fs_info->balance_ctl) ret =btrfs_balance (fs_info, fs_info->balance_ctl,NULL );mutex_unlock (&fs_info->balance_mutex); +sb_end_write (fs_info->sb);return ret; }
fs/cifs/link.c +3 -0
@@ -97,6 +97,9 @@ parse_mf_symlink(const u8 *buf, unsigned int buf_len, unsigned int *_link_len,if (rc !=1 )return -EINVAL ; +if (link_len >CIFS_MF_SYMLINK_LINK_MAXLEN ) +return -EINVAL ; + rc =symlink_hash (link_len, link_str, md5_hash);if (rc) {cifs_dbg (FYI ,"%s: MD5 hash failure: %d\n" , __func__, rc);
include/asm-generic/tlb.h +7 -3
@@ -563,10 +563,14 @@ static inline void tlb_flush_p4d_range(struct mmu_gather *tlb,#define tlb_remove_huge_tlb_entry (h, tlb, ptep, address) \ do { \ unsigned long _sz = huge_page_size(h); \ - if (_sz == PMD_SIZE) \ - tlb_flush_pmd_range(tlb, address, _sz); \ - else if (_sz == PUD_SIZE) \ + if (_sz >= P4D_SIZE) \ + tlb_flush_p4d_range(tlb, address, _sz); \ + else if (_sz >= PUD_SIZE) \ tlb_flush_pud_range(tlb, address, _sz); \ + else if (_sz >= PMD_SIZE) \ + tlb_flush_pmd_range(tlb, address, _sz); \ + else \ + tlb_flush_pte_range(tlb, address, _sz); \ __tlb_remove_tlb_entry(tlb, ptep, address); \ } while (0)
include/net/ax25.h +12 -0
@@ -236,6 +236,7 @@ typedef struct ax25_dev {#if defined(CONFIG_AX25_DAMA_SLAVE ) || defined(CONFIG_AX25_DAMA_MASTER )ax25_dama_info dama;#endif +refcount_t refcount; } ax25_dev; typedef struct ax25_cb {
@@ -290,6 +291,17 @@ static __inline__ void ax25_cb_put(ax25_cb *ax25) } } +static inline void ax25_dev_hold (ax25_dev *ax25_dev) +{ +refcount_inc (&ax25_dev->refcount); +} + +static inline void ax25_dev_put (ax25_dev *ax25_dev) +{ +if (refcount_dec_and_test (&ax25_dev->refcount)) { +kfree (ax25_dev); + } +}static inline __be16 ax25_type_trans (struct sk_buff *skb,struct net_device *dev) { skb->dev = dev;
include/net/flow_dissector.h +2 -0
@@ -59,6 +59,8 @@ struct flow_dissector_key_vlan {__be16 vlan_tci; };__be16 vlan_tpid; +__be16 vlan_eth_type; +u16 padding; };struct flow_dissector_mpls_lse {
include/scsi/libiscsi.h +1 -0
@@ -421,6 +421,7 @@ extern int iscsi_conn_start(struct iscsi_cls_conn *);extern void iscsi_conn_stop (struct iscsi_cls_conn *,int );extern int iscsi_conn_bind (struct iscsi_cls_session *,struct iscsi_cls_conn *,int ); +extern void iscsi_conn_unbind (struct iscsi_cls_conn *cls_conn,bool is_active);extern void iscsi_conn_failure (struct iscsi_conn *conn,enum iscsi_err err);extern void iscsi_session_failure (struct iscsi_session *session,enum iscsi_err err);
include/scsi/scsi_transport_iscsi.h +13 -1
@@ -82,6 +82,7 @@ struct iscsi_transport {void (*destroy_session) (struct iscsi_cls_session *session);struct iscsi_cls_conn *(*create_conn) (struct iscsi_cls_session *sess,uint32_t cid); +void (*unbind_conn) (struct iscsi_cls_conn *conn,bool is_active);int (*bind_conn) (struct iscsi_cls_session *session,struct iscsi_cls_conn *cls_conn,uint64_t transport_eph,int is_leading);
@@ -196,15 +197,25 @@ enum iscsi_connection_state { ISCSI_CONN_BOUND, }; +#define ISCSI_CLS_CONN_BIT_CLEANUP 1 +struct iscsi_cls_conn {struct list_head conn_list;/* item in connlist */ -struct list_head conn_list_err;/* item in connlist_err */ void *dd_data;/* LLD private data */ struct iscsi_transport *transport;uint32_t cid;/* connection id */ +/* +* This protects the conn startup and binding/unbinding of the ep to +* the conn. Unbinding includes ep_disconnect and stop_conn. +*/ struct mutex ep_mutex;struct iscsi_endpoint *ep; +/* Used when accessing flags and queueing work. */ +spinlock_t lock; +unsigned long flags; +struct work_struct cleanup_work; +struct device dev;/* sysfs transport/container device */ enum iscsi_connection_state state; };
@@ -443,6 +454,7 @@ extern int iscsi_scan_finished(struct Scsi_Host *shost, unsigned long time);extern struct iscsi_endpoint *iscsi_create_endpoint (int dd_size);extern void iscsi_destroy_endpoint (struct iscsi_endpoint *ep);extern struct iscsi_endpoint *iscsi_lookup_endpoint (u64 handle); +extern void iscsi_put_endpoint (struct iscsi_endpoint *ep);extern int iscsi_block_scsi_eh (struct scsi_cmnd *cmd); extern struct iscsi_iface *iscsi_create_iface(struct Scsi_Host *shost, struct iscsi_transport *t,
include/trace/events/sunrpc.h +4 -3
@@ -1874,17 +1874,18 @@ DECLARE_EVENT_CLASS(svc_deferred_event,TP_STRUCT__entry (__field (const void *,dr )__field (u32, xid) - __string(addr, dr->xprt->xpt_remotebuf) +__array (__u8, addr,INET6_ADDRSTRLEN +10 ) ),TP_fast_assign ( __entry->dr = dr; __entry->xid =be32_to_cpu (*(__be32 *)(dr->args + (dr->xprt_hlen>>2 ))); -__assign_str (addr, dr->xprt->xpt_remotebuf); +snprintf (__entry->addr,sizeof (__entry->addr) -1 , +"%pISpc" , (struct sockaddr *)&dr->addr); ), -TP_printk ("addr=%s dr=%p xid=0x%08x" ,__get_str (addr), __entry->dr, +TP_printk ("addr=%s dr=%p xid=0x%08x" , __entry->addr, __entry->dr, __entry->xid) );
kernel/dma/direct.h +2 -1
@@ -114,6 +114,7 @@ static inline void dma_direct_unmap_page(struct device *dev, dma_addr_t addr,dma_direct_sync_single_for_cpu (dev, addr, size, dir);if (unlikely (is_swiotlb_buffer (phys))) - swiotlb_tbl_unmap_single(dev, phys, size, size, dir, attrs); +swiotlb_tbl_unmap_single (dev, phys, size, size, dir, + attrs | DMA_ATTR_SKIP_CPU_SYNC); }#endif /* _KERNEL_DMA_DIRECT_H */
kernel/irq/affinity.c +3 -2
@@ -269,8 +269,9 @@ static int __irq_build_affinity_masks(unsigned int startvec,*/ if (numvecs <= nodes) {for_each_node_mask (n, nodemsk) { -cpumask_or (&masks[curvec].mask, &masks[curvec].mask, - node_to_cpumask[n]); +/* Ensure that only CPUs which are in both masks are set */ +cpumask_and (nmsk, cpu_mask, node_to_cpumask[n]); +cpumask_or (&masks[curvec].mask, &masks[curvec].mask, nmsk);if (++curvec == last_affv) curvec = firstvec; }
kernel/smp.c +1 -1
@@ -346,7 +346,7 @@ static void flush_smp_call_function_queue(bool warn_cpu_offline)/* There shouldn't be any pending callbacks on an offline CPU. */ if (unlikely (warn_cpu_offline && !cpu_online (smp_processor_id ()) && - !warned && !llist_empty (head))) { + !warned && entry !=NULL )) { warned = true;WARN (1 ,"IPI on offline CPU %d\n" ,smp_processor_id ());
kernel/time/tick-sched.c +1 -1
@@ -136,7 +136,7 @@ static void tick_sched_do_timer(struct tick_sched *ts, ktime_t now)*/ if (unlikely (tick_do_timer_cpu ==TICK_DO_TIMER_NONE )) {#ifdef CONFIG_NO_HZ_FULL -WARN_ON (tick_nohz_full_running); +WARN_ON_ONCE (tick_nohz_full_running);#endif tick_do_timer_cpu = cpu; }
kernel/time/timer.c +7 -4
@@ -1738,11 +1738,14 @@ static inline void __run_timers(struct timer_base *base) time_after_eq(jiffies, base->next_expiry)) { levels =collect_expired_timers (base, heads);/* -* The only possible reason for not finding any expired -* timer at this clk is that all matching timers have been -* dequeued. +* The two possible reasons for not finding any expired +* timer at this clk are that all matching timers have been +* dequeued or no timer has been queued since +* base::next_expiry was set to base::clk + +* NEXT_TIMER_MAX_DELTA. */ -WARN_ON_ONCE (!levels && !base->next_expiry_recalc); +WARN_ON_ONCE (!levels && !base->next_expiry_recalc + && base->timers_pending); base->clk++; base->next_expiry =__next_timer_interrupt (base);
mm/kmemleak.c +4 -4
@@ -1123,7 +1123,7 @@ EXPORT_SYMBOL(kmemleak_no_scan);void __ref kmemleak_alloc_phys (phys_addr_t phys,size_t size,int min_count,gfp_t gfp) { -if (!IS_ENABLED (CONFIG_HIGHMEM ) ||PHYS_PFN (phys) < max_low_pfn) +if (PHYS_PFN (phys) >= min_low_pfn &&PHYS_PFN (phys) < max_low_pfn)kmemleak_alloc (__va (phys), size, min_count, gfp); }EXPORT_SYMBOL (kmemleak_alloc_phys);
@@ -1137,7 +1137,7 @@ EXPORT_SYMBOL(kmemleak_alloc_phys);*/ void __ref kmemleak_free_part_phys (phys_addr_t phys,size_t size) { -if (!IS_ENABLED (CONFIG_HIGHMEM ) ||PHYS_PFN (phys) < max_low_pfn) +if (PHYS_PFN (phys) >= min_low_pfn &&PHYS_PFN (phys) < max_low_pfn)kmemleak_free_part (__va (phys), size); }EXPORT_SYMBOL (kmemleak_free_part_phys);
@@ -1149,7 +1149,7 @@ EXPORT_SYMBOL(kmemleak_free_part_phys);*/ void __ref kmemleak_not_leak_phys (phys_addr_t phys) { -if (!IS_ENABLED (CONFIG_HIGHMEM ) ||PHYS_PFN (phys) < max_low_pfn) +if (PHYS_PFN (phys) >= min_low_pfn &&PHYS_PFN (phys) < max_low_pfn)kmemleak_not_leak (__va (phys)); }EXPORT_SYMBOL (kmemleak_not_leak_phys);
@@ -1161,7 +1161,7 @@ EXPORT_SYMBOL(kmemleak_not_leak_phys);*/ void __ref kmemleak_ignore_phys (phys_addr_t phys) { -if (!IS_ENABLED (CONFIG_HIGHMEM ) ||PHYS_PFN (phys) < max_low_pfn) +if (PHYS_PFN (phys) >= min_low_pfn &&PHYS_PFN (phys) < max_low_pfn)kmemleak_ignore (__va (phys)); }EXPORT_SYMBOL (kmemleak_ignore_phys);
mm/page_alloc.c +1 -1
@@ -5653,7 +5653,7 @@ static int build_zonerefs_node(pg_data_t *pgdat, struct zoneref *zonerefs) do { zone_type--; zone = pgdat->node_zones + zone_type; - if (managed_zone(zone)) { + if (populated_zone(zone)) { zoneref_set_zone(zone, &zonerefs[nr_zones++]); check_highest_zone(zone_type); }
mm/page_io.c +0 -54
72 lines not on this page · raw message
net/ax25/af_ax25.c +30 -8
@@ -89,17 +89,21 @@ static void ax25_kill_by_device(struct net_device *dev) sk = s->sk;if (!sk) {spin_unlock_bh (&ax25_list_lock); - s->ax25_dev =NULL ;ax25_disconnect (s,ENETUNREACH ); + s->ax25_dev =NULL ;spin_lock_bh (&ax25_list_lock); goto again; }sock_hold (sk);spin_unlock_bh (&ax25_list_lock);lock_sock (sk); +ax25_disconnect (s,ENETUNREACH ); s->ax25_dev =NULL ; +if (sk->sk_socket) { +dev_put (ax25_dev->dev); +ax25_dev_put (ax25_dev); + }release_sock (sk); -ax25_disconnect (s,ENETUNREACH );spin_lock_bh (&ax25_list_lock);sock_put (sk);/* The entry could have been deleted from the
@@ -365,21 +369,25 @@ static int ax25_ctl_ioctl(const unsigned int cmd, void __user *arg)if (copy_from_user (&ax25_ctl, arg,sizeof (ax25_ctl)))return -EFAULT ; -if ((ax25_dev =ax25_addr_ax25dev (&ax25_ctl.port_addr)) ==NULL ) -return -ENODEV ; -if (ax25_ctl.digi_count >AX25_MAX_DIGIS )return -EINVAL ;if (ax25_ctl.arg >ULONG_MAX /HZ && ax25_ctl.cmd !=AX25_KILL )return -EINVAL ; + ax25_dev =ax25_addr_ax25dev (&ax25_ctl.port_addr); +if (!ax25_dev) +return -ENODEV ; + digi.ndigi = ax25_ctl.digi_count;for (k =0 ; k < digi.ndigi; k++) digi.calls[k] = ax25_ctl.digi_addr[k]; -if ((ax25 =ax25_find_cb (&ax25_ctl.source_addr, &ax25_ctl.dest_addr, &digi, ax25_dev->dev)) ==NULL ) + ax25 =ax25_find_cb (&ax25_ctl.source_addr, &ax25_ctl.dest_addr, &digi, ax25_dev->dev); +if (!ax25) { +ax25_dev_put (ax25_dev);return -ENOTCONN ; + }switch (ax25_ctl.cmd) {case AX25_KILL :
@@ -446,6 +454,7 @@ static int ax25_ctl_ioctl(const unsigned int cmd, void __user *arg) } out_put: +ax25_dev_put (ax25_dev);ax25_cb_put (ax25);return ret;
@@ -971,14 +980,16 @@ static int ax25_release(struct socket *sock) {struct sock *sk = sock->sk;ax25_cb *ax25; +ax25_dev *ax25_dev;if (sk ==NULL )return 0 ;sock_hold (sk); -sock_orphan (sk);lock_sock (sk); +sock_orphan (sk); ax25 =sk_to_ax25 (sk); + ax25_dev = ax25->ax25_dev;if (sk->sk_type ==SOCK_SEQPACKET ) {switch (ax25->state) {
@@ -1040,6 +1051,15 @@ static int ax25_release(struct socket *sock) sk->sk_state_change (sk);ax25_destroy_socket (ax25); } +if (ax25_dev) { +del_timer_sync (&ax25->timer); +del_timer_sync (&ax25->t1timer); +del_timer_sync (&ax25->t2timer); +del_timer_sync (&ax25->t3timer); +del_timer_sync (&ax25->idletimer); +dev_put (ax25_dev->dev); +ax25_dev_put (ax25_dev); + } sock->sk =NULL ;release_sock (sk);
@@ -1116,8 +1136,10 @@ static int ax25_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) } } -if (ax25_dev !=NULL ) +if (ax25_dev) {ax25_fillin_cb (ax25, ax25_dev); +dev_hold (ax25_dev->dev); + } done:ax25_cb_add (ax25);
net/ax25/ax25_dev.c +23 -5
@@ -37,6 +37,7 @@ ax25_dev *ax25_addr_ax25dev(ax25_address *addr)for (ax25_dev = ax25_dev_list; ax25_dev !=NULL ; ax25_dev = ax25_dev->next)if (ax25cmp (addr, (ax25_address *)ax25_dev->dev->dev_addr) ==0 ) { res = ax25_dev; +ax25_dev_hold (ax25_dev); }spin_unlock_bh (&ax25_dev_lock);
@@ -56,6 +57,7 @@ void ax25_dev_device_up(struct net_device *dev)return ; } +refcount_set (&ax25_dev->refcount,1 ); dev->ax25_ptr = ax25_dev; ax25_dev->dev = dev;dev_hold (dev);
@@ -84,6 +86,7 @@ void ax25_dev_device_up(struct net_device *dev) ax25_dev->next = ax25_dev_list; ax25_dev_list = ax25_dev;spin_unlock_bh (&ax25_dev_lock); +ax25_dev_hold (ax25_dev);ax25_register_dev_sysctl (ax25_dev); }
@@ -113,9 +116,10 @@ void ax25_dev_device_down(struct net_device *dev)if ((s = ax25_dev_list) == ax25_dev) { ax25_dev_list = s->next;spin_unlock_bh (&ax25_dev_lock); +ax25_dev_put (ax25_dev); dev->ax25_ptr =NULL ;dev_put (dev); -kfree (ax25_dev); +ax25_dev_put (ax25_dev);return ; }
@@ -123,9 +127,10 @@ void ax25_dev_device_down(struct net_device *dev)if (s->next == ax25_dev) { s->next = ax25_dev->next;spin_unlock_bh (&ax25_dev_lock); +ax25_dev_put (ax25_dev); dev->ax25_ptr =NULL ;dev_put (dev); -kfree (ax25_dev); +ax25_dev_put (ax25_dev);return ; }
@@ -133,6 +138,7 @@ void ax25_dev_device_down(struct net_device *dev) }spin_unlock_bh (&ax25_dev_lock); dev->ax25_ptr =NULL ; +ax25_dev_put (ax25_dev); }int ax25_fwd_ioctl (unsigned int cmd,struct ax25_fwd_struct *fwd)
@@ -144,20 +150,32 @@ int ax25_fwd_ioctl(unsigned int cmd, struct ax25_fwd_struct *fwd)switch (cmd) {case SIOCAX25ADDFWD : -if ((fwd_dev =ax25_addr_ax25dev (&fwd->port_to)) ==NULL ) + fwd_dev =ax25_addr_ax25dev (&fwd->port_to); +if (!fwd_dev) { +ax25_dev_put (ax25_dev);return -EINVAL ; -if (ax25_dev->forward !=NULL ) + } +if (ax25_dev->forward) { +ax25_dev_put (fwd_dev); +ax25_dev_put (ax25_dev);return -EINVAL ; + } ax25_dev->forward = fwd_dev->dev; +ax25_dev_put (fwd_dev); +ax25_dev_put (ax25_dev);break ;case SIOCAX25DELFWD : -if (ax25_dev->forward ==NULL ) +if (!ax25_dev->forward) { +ax25_dev_put (ax25_dev);return -EINVAL ; + } ax25_dev->forward =NULL ; +ax25_dev_put (ax25_dev);break ;default : +ax25_dev_put (ax25_dev);return -EINVAL ; }
net/ax25/ax25_route.c +11 -2
@@ -75,11 +75,13 @@ static int __must_check ax25_rt_add(struct ax25_routes_struct *route)ax25_dev *ax25_dev;int i; -if ((ax25_dev =ax25_addr_ax25dev (&route->port_addr)) ==NULL ) -return -EINVAL ;if (route->digi_count >AX25_MAX_DIGIS )return -EINVAL ; + ax25_dev =ax25_addr_ax25dev (&route->port_addr); +if (!ax25_dev) +return -EINVAL ; +write_lock_bh (&ax25_route_lock); ax25_rt = ax25_route_list;
@@ -91,6 +93,7 @@ static int __must_check ax25_rt_add(struct ax25_routes_struct *route)if (route->digi_count !=0 ) {if ((ax25_rt->digipeat =kmalloc (sizeof (ax25_digi),GFP_ATOMIC )) ==NULL ) {write_unlock_bh (&ax25_route_lock); +ax25_dev_put (ax25_dev);return -ENOMEM ; } ax25_rt->digipeat->lastrepeat =-1 ;
@@ -101,6 +104,7 @@ static int __must_check ax25_rt_add(struct ax25_routes_struct *route) } }write_unlock_bh (&ax25_route_lock); +ax25_dev_put (ax25_dev);return 0 ; } ax25_rt = ax25_rt->next;
@@ -108,6 +112,7 @@ static int __must_check ax25_rt_add(struct ax25_routes_struct *route)if ((ax25_rt =kmalloc (sizeof (ax25_route),GFP_ATOMIC )) ==NULL ) {write_unlock_bh (&ax25_route_lock); +ax25_dev_put (ax25_dev);return -ENOMEM ; }
@@ -120,6 +125,7 @@ static int __must_check ax25_rt_add(struct ax25_routes_struct *route)if ((ax25_rt->digipeat =kmalloc (sizeof (ax25_digi),GFP_ATOMIC )) ==NULL ) {write_unlock_bh (&ax25_route_lock);kfree (ax25_rt); +ax25_dev_put (ax25_dev);return -ENOMEM ; } ax25_rt->digipeat->lastrepeat =-1 ;
@@ -132,6 +138,7 @@ static int __must_check ax25_rt_add(struct ax25_routes_struct *route) ax25_rt->next = ax25_route_list; ax25_route_list = ax25_rt;write_unlock_bh (&ax25_route_lock); +ax25_dev_put (ax25_dev);return 0 ; }
@@ -173,6 +180,7 @@ static int ax25_rt_del(struct ax25_routes_struct *route) } }write_unlock_bh (&ax25_route_lock); +ax25_dev_put (ax25_dev);return 0 ; }
@@ -215,6 +223,7 @@ static int ax25_rt_opt(struct ax25_route_opt_struct *rt_option) out:write_unlock_bh (&ax25_route_lock); +ax25_dev_put (ax25_dev);return err; }
net/ax25/ax25_subr.c +14 -6
@@ -261,12 +261,20 @@ void ax25_disconnect(ax25_cb *ax25, int reason) {ax25_clear_queues (ax25); -if (!ax25->sk || !sock_flag (ax25->sk,SOCK_DESTROY )) -ax25_stop_heartbeat (ax25); -ax25_stop_t1timer (ax25); -ax25_stop_t2timer (ax25); -ax25_stop_t3timer (ax25); -ax25_stop_idletimer (ax25); +if (reason ==ENETUNREACH ) { +del_timer_sync (&ax25->timer); +del_timer_sync (&ax25->t1timer); +del_timer_sync (&ax25->t2timer); +del_timer_sync (&ax25->t3timer); +del_timer_sync (&ax25->idletimer); + }else { +if (!ax25->sk || !sock_flag (ax25->sk,SOCK_DESTROY )) +ax25_stop_heartbeat (ax25); +ax25_stop_t1timer (ax25); +ax25_stop_t2timer (ax25); +ax25_stop_t3timer (ax25); +ax25_stop_idletimer (ax25); + } ax25->state =AX25_STATE_0 ;
net/core/flow_dissector.c +1 -0
@@ -1171,6 +1171,7 @@ bool __skb_flow_dissect(const struct net *net, VLAN_PRIO_MASK) >> VLAN_PRIO_SHIFT; } key_vlan->vlan_tpid = saved_vlan_tpid; + key_vlan->vlan_eth_type = proto; } fdret =FLOW_DISSECT_RET_PROTO_AGAIN ;
net/ipv6/ip6_output.c +1 -1
@@ -508,7 +508,7 @@ int ip6_forward(struct sk_buff *skb) goto drop;if (!net->ipv6.devconf_all->disable_policy && - !idev->cnf.disable_policy && + (!idev || !idev->cnf.disable_policy) && !xfrm6_policy_check (NULL ,XFRM_POLICY_FWD , skb)) {__IP6_INC_STATS (net, idev,IPSTATS_MIB_INDISCARDS ); goto drop;
net/nfc/nci/core.c +4 -0
@@ -548,6 +548,10 @@ static int nci_close_device(struct nci_dev *ndev)mutex_lock (&ndev->req_lock);if (!test_and_clear_bit (NCI_UP , &ndev->flags)) { +/* Need to flush the cmd wq in case +* there is a queued/running cmd_work +*/ +flush_workqueue (ndev->cmd_wq);del_timer_sync (&ndev->cmd_timer);del_timer_sync (&ndev->data_timer);mutex_unlock (&ndev->req_lock);
net/sched/cls_api.c +1 -1
@@ -1656,10 +1656,10 @@ static int tcf_chain_tp_insert(struct tcf_chain *chain,if (chain->flushing)return -EAGAIN ; +RCU_INIT_POINTER (tp->next,tcf_chain_tp_prev (chain, chain_info));if (*chain_info->pprev == chain->filter_chain)tcf_chain0_head_change (chain, tp);tcf_proto_get (tp); -RCU_INIT_POINTER (tp->next,tcf_chain_tp_prev (chain, chain_info));
Lines of this file are not shown. View the raw message.
scripts/gcc-plugins/latent_entropy_plugin.c +27 -17
44 lines not on this page · raw message
tools/testing/selftests/mqueue/mq_perf_tests.c +17 -8
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.