diff --git a/android/abi_gki_aarch64.xml b/android/abi_gki_aarch64.xml
index c7c5df0e8900..23ebcfe434ba 100644
--- a/android/abi_gki_aarch64.xml
+++ b/android/abi_gki_aarch64.xml
@@ -1418,6 +1418,7 @@
+
@@ -1480,12 +1481,15 @@
+
+
+
@@ -2680,6 +2684,12 @@
+
+
+
+
+
+
@@ -4677,6 +4687,7 @@
+
@@ -16473,13 +16484,13 @@
-
+
-
+
@@ -22940,102 +22951,102 @@
-
-
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
+
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
-
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
@@ -23660,26 +23671,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -31456,14 +31447,6 @@
-
-
-
-
-
-
-
-
@@ -38234,6 +38217,11 @@
+
+
+
+
+
@@ -38278,38 +38266,46 @@
+
+
+
+
+
+
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -43520,17 +43516,6 @@
-
-
-
-
-
-
-
-
-
-
-
@@ -48823,7 +48808,7 @@
-
+
@@ -49336,7 +49321,7 @@
-
+
@@ -49460,7 +49445,7 @@
-
+
@@ -49969,7 +49954,7 @@
-
+
@@ -50033,7 +50018,7 @@
-
+
@@ -50090,7 +50075,7 @@
-
+
@@ -50229,7 +50214,7 @@
-
+
@@ -50260,7 +50245,7 @@
-
+
@@ -50271,7 +50256,7 @@
-
+
@@ -50530,7 +50515,7 @@
-
+
@@ -50549,7 +50534,7 @@
-
+
@@ -50586,7 +50571,7 @@
-
+
@@ -50710,7 +50695,7 @@
-
+
@@ -50731,7 +50716,7 @@
-
+
@@ -50768,7 +50753,7 @@
-
+
@@ -50862,7 +50847,7 @@
-
+
@@ -50921,7 +50906,7 @@
-
+
@@ -55095,8 +55080,8 @@
-
-
+
+
@@ -55161,17 +55146,17 @@
-
-
+
+
-
-
+
+
-
-
-
+
+
+
@@ -57259,6 +57244,17 @@
+
+
+
+
+
+
+
+
+
+
+
@@ -65356,7 +65352,7 @@
-
+
@@ -65413,7 +65409,7 @@
-
+
@@ -65699,7 +65695,7 @@
-
+
@@ -66077,6 +66073,279 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -66088,6 +66357,109 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -66154,17 +66526,10 @@
-
-
-
-
-
-
-
@@ -66515,244 +66880,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -66780,36 +66907,17 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -66819,14 +66927,9 @@
-
-
-
-
-
@@ -66834,10 +66937,6 @@
-
-
-
-
@@ -66965,74 +67064,10 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -67115,26 +67150,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -67151,6 +67166,49 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -75418,17 +75476,17 @@
-
-
-
+
+
+
-
-
+
+
-
-
+
+
@@ -80537,6 +80595,17 @@
+
+
+
+
+
+
+
+
+
+
+
@@ -89323,23 +89392,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -89395,17 +89447,6 @@
-
-
-
-
-
-
-
-
-
-
-
@@ -89621,6 +89662,16 @@
+
+
+
+
+
+
+
+
+
+
@@ -89843,7 +89894,7 @@
-
+
@@ -90686,7 +90737,6 @@
-
@@ -90701,8 +90751,6 @@
-
-
@@ -90870,7 +90918,7 @@
-
+
@@ -90884,7 +90932,7 @@
-
+
@@ -90896,16 +90944,17 @@
-
+
-
+
-
+
-
-
+
+
+
@@ -91265,7 +91314,7 @@
-
+
@@ -91464,6 +91513,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -93644,6 +93710,17 @@
+
+
+
+
+
+
+
+
+
+
+
@@ -94396,7 +94473,7 @@
-
+
@@ -95257,7 +95334,7 @@
-
+
@@ -100224,7 +100301,7 @@
-
+
@@ -103576,7 +103653,7 @@
-
+
@@ -103701,7 +103778,7 @@
-
+
@@ -108241,6 +108318,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -109531,33 +109625,33 @@
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
+
+
+
+
-
-
-
+
+
+
-
-
+
+
@@ -115464,8 +115558,8 @@
-
-
+
+
@@ -117704,17 +117798,6 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/android/abi_gki_aarch64_exynosauto b/android/abi_gki_aarch64_exynosauto
index 52ac68379854..084429b560c2 100644
--- a/android/abi_gki_aarch64_exynosauto
+++ b/android/abi_gki_aarch64_exynosauto
@@ -29,6 +29,7 @@
clk_bulk_unprepare
clk_disable
clk_enable
+ clk_get
clk_get_rate
clk_prepare
clk_put
@@ -37,12 +38,14 @@
complete
complete_all
__const_udelay
+ cpu_bit_bitmap
cpu_hwcap_keys
cpu_hwcaps
cpumask_next
cpu_number
__cpu_online_mask
__cpu_possible_mask
+ crc32_le
delayed_work_timer_fn
del_timer
del_timer_sync
@@ -50,7 +53,9 @@
dev_driver_string
_dev_emerg
_dev_err
+ device_create
device_create_file
+ device_destroy
device_for_each_child
device_initialize
device_init_wakeup
@@ -64,6 +69,7 @@
devm_gpiod_get_optional
devm_gpio_request_one
devm_ioremap
+ devm_ioremap_nocache
devm_ioremap_resource
devm_kfree
devm_kmalloc
@@ -116,7 +122,9 @@
dma_request_slave_channel
dma_set_coherent_mask
dma_set_mask
+ down
down_read
+ down_trylock
drm_add_edid_modes
drm_atomic_helper_connector_destroy_state
drm_atomic_helper_connector_duplicate_state
@@ -156,6 +164,7 @@
generic_handle_irq
get_device
__get_free_pages
+ get_random_bytes
get_task_mm
get_unused_fd_flags
get_user_pages
@@ -167,12 +176,14 @@
gpiod_to_irq
gpio_free
gpio_request
+ gpio_request_one
gpio_to_desc
handle_edge_irq
handle_level_irq
handle_nested_irq
i2c_add_numbered_adapter
i2c_del_driver
+ i2c_get_adapter
i2c_new_dummy
i2c_register_driver
i2c_transfer
@@ -209,17 +220,23 @@
__kmalloc
kmalloc_caches
kmalloc_order_trace
+ kmem_cache_alloc
kmem_cache_alloc_trace
+ kmem_cache_free
kmemdup
kobject_create_and_add
krealloc
kstrdup
kstrtobool
kstrtoint
+ kstrtou8
kstrtouint
kstrtoull
kthread_create_on_node
+ __kthread_init_worker
+ kthread_queue_work
kthread_stop
+ kthread_worker_fn
ktime_get
ktime_get_mono_fast_ns
ktime_get_raw_ts64
@@ -229,6 +246,7 @@
mdiobus_read
mdiobus_write
memcpy
+ memdup_user
memset
mfd_add_devices
mfd_remove_devices
@@ -247,9 +265,12 @@
__msecs_to_jiffies
msleep
__mutex_init
+ mutex_is_locked
mutex_lock
mutex_unlock
+ names_cachep
netif_carrier_off
+ no_llseek
nr_cpu_ids
__num_online_cpus
of_address_to_resource
@@ -360,6 +381,7 @@
refcount_inc_not_zero_checked
__refrigerator
register_pm_notifier
+ register_reboot_notifier
register_restart_handler
register_syscore_ops
regmap_read
@@ -367,8 +389,10 @@
regmap_write
regulator_disable
regulator_enable
+ regulator_get_optional
regulator_list_voltage_linear
regulator_map_voltage_linear
+ regulator_put
regulator_register
regulator_unregister
release_firmware
@@ -382,6 +406,7 @@
schedule_timeout
scnprintf
seq_printf
+ set_cpus_allowed_ptr
set_page_dirty_lock
sg_alloc_table
sg_alloc_table_from_pages
@@ -417,6 +442,9 @@
sysfs_remove_group
system_freezing_cnt
system_wq
+ tasklet_init
+ tasklet_kill
+ __tasklet_schedule
_totalram_pages
trace_define_field
trace_event_buffer_commit
@@ -431,6 +459,7 @@
__udelay
unregister_chrdev_region
unregister_pm_notifier
+ up
up_read
usb_add_hcd
usb_disabled
@@ -445,11 +474,15 @@
v4l2_fh_del
v4l2_fh_exit
v4l2_fh_init
+ v4l2_subdev_init
vabits_actual
vb2_buffer_done
vb2_dqbuf
vb2_mmap
vb2_plane_cookie
+ vb2_plane_vaddr
+ vb2_poll
+ vb2_prepare_buf
vb2_qbuf
vb2_querybuf
vb2_queue_init
@@ -786,6 +819,7 @@
drm_mode_object_put
drm_object_attach_property
drm_of_component_match_add
+ drm_of_crtc_port_mask
drm_of_find_possible_crtcs
drm_open
drm_panel_attach
@@ -807,10 +841,8 @@
drm_release
drm_universal_plane_init
drm_vblank_init
- kstrtou8
mipi_dsi_host_register
mipi_dsi_host_unregister
- mutex_is_locked
of_drm_find_bridge
of_drm_find_panel
of_get_next_available_child
@@ -838,20 +870,16 @@
dev_pm_opp_disable
dev_pm_opp_get_freq
dev_pm_opp_put
- register_reboot_notifier
unregister_reboot_notifier
update_devfreq
# required by exynos_mfc.ko
- clk_get
iommu_dma_reserve_iova
iommu_get_domain_for_dev
iommu_map_sg
iommu_unmap
mutex_lock_interruptible
ns_to_timeval
- vb2_plane_vaddr
- vb2_poll
# required by exynos_pm_qos.ko
kstrtoint_from_user
@@ -891,7 +919,6 @@
# required by exynosauto9-itmon.ko
atomic_notifier_chain_unregister
- devm_ioremap_nocache
# required by g2d.ko
__arch_copy_in_user
@@ -911,17 +938,13 @@
i2c_adapter_type
i2c_bus_type
i2c_for_each_dev
- i2c_get_adapter
i2c_put_adapter
i2c_smbus_xfer
i2c_transfer_buffer_flags
i2c_verify_client
- memdup_user
- no_llseek
register_chrdev_region
# required by i2c-exynosauto.ko
- cpu_bit_bitmap
i2c_del_adapter
# required by ion_exynos_mod.ko
@@ -954,6 +977,7 @@
# required by mali_kbase.ko
anon_inode_getfd
+ __arch_clear_user
__bitmap_weight
bpf_trace_run5
cache_line_size
@@ -965,9 +989,7 @@
dev_pm_opp_put_regulators
dev_pm_opp_set_regulators
dma_fence_get_status
- down
downgrade_write
- down_trylock
down_write
dump_stack
__get_task_comm
@@ -978,6 +1000,7 @@
hrtimer_forward
hrtimer_init
hrtimer_start_range_ns
+ kfree_call_rcu
kobject_put
ktime_get_raw
__mmdrop
@@ -991,10 +1014,10 @@
rb_prev
rb_replace_node
register_shrinker
- regulator_get_optional
- regulator_put
remap_pfn_range
remap_vmalloc_range
+ static_key_slow_dec
+ static_key_slow_inc
strcspn
strncasecmp
synchronize_rcu
@@ -1002,12 +1025,12 @@
sysfs_streq
system_highpri_wq
trace_output_call
+ __tracepoint_gpu_mem_total
trace_print_array_seq
trace_print_flags_seq
try_module_get
unmap_mapping_range
unregister_shrinker
- up
up_write
vmalloc_user
vmf_insert_pfn_prot
@@ -1044,16 +1067,10 @@
crypto_destroy_tfm
crypto_shash_final
crypto_shash_update
- device_create
- device_destroy
d_path
get_task_exe_file
get_zeroed_page
- __kthread_init_worker
- kthread_queue_work
- kthread_worker_fn
release_pages
- set_cpus_allowed_ptr
sg_miter_next
sg_miter_start
sg_miter_stop
@@ -1066,6 +1083,17 @@
drm_panel_remove
videomode_from_timing
+# required by pcie-exynos-dw-ep.ko
+ dw_pcie_ep_init
+ dw_pcie_read_dbi
+ dw_pcie_write_dbi
+ pci_epc_clear_bar
+ pci_epc_map_addr
+ pci_epc_mem_alloc_addr
+ pci_epc_mem_free_addr
+ pci_epc_set_bar
+ pci_epc_unmap_addr
+
# required by pcie-exynos-dw-rc.ko
bitmap_find_free_region
bitmap_release_region
@@ -1150,9 +1178,6 @@
of_dma_controller_free
of_dma_controller_register
pm_runtime_irq_safe
- tasklet_init
- tasklet_kill
- __tasklet_schedule
# required by rtc-s2vps01.ko
devm_rtc_device_register
@@ -1171,6 +1196,38 @@
watchdog_set_restart_priority
watchdog_unregister_device
+# required by sam-is-cis-4ec.ko
+ v4l2_i2c_subdev_init
+
+# required by sam-is.ko
+ down_interruptible
+ filp_close
+ filp_open
+ get_random_u32
+ get_task_pid
+ i2c_new_device
+ jiffies_to_msecs
+ kstrtou16
+ kthread_flush_work
+ kthread_flush_worker
+ ktime_get_ts64
+ ktime_get_with_offset
+ mutex_trylock
+ ns_to_timespec
+ param_ops_string
+ phy_configure
+ pm_relax
+ pm_stay_awake
+ regulator_get_voltage
+ regulator_is_enabled
+ regulator_set_voltage
+ sched_setscheduler_nocheck
+ v4l2_device_register_subdev
+ v4l2_device_set_name
+ v4l2_device_unregister_subdev
+ v4l2_subdev_call_wrappers
+ vscnprintf
+
# required by samsung-iommu-group.ko
iommu_group_alloc
iommu_group_set_name
@@ -1179,7 +1236,6 @@
alloc_etherdev_mqs
capable
consume_skb
- crc32_le
dev_close
device_set_wakeup_capable
device_set_wakeup_enable
@@ -1192,7 +1248,6 @@
ethtool_op_get_ts_info
eth_type_trans
free_netdev
- get_random_bytes
in4_pton
in6_pton
jiffies_to_usecs
@@ -1274,10 +1329,8 @@
iommu_group_set_iommudata
iommu_put_dma_cookie
iommu_report_device_fault
- kmem_cache_alloc
kmem_cache_create
kmem_cache_destroy
- kmem_cache_free
of_get_dma_window
pm_runtime_get_if_in_use
@@ -1292,11 +1345,7 @@
v4l2_ctrl_new_std
v4l_bound_align_image
-# required by sfi_ipc_test.ko
- nsecs_to_jiffies
-
# required by spi-exynosauto.ko
- gpio_request_one
loops_per_jiffy
__spi_alloc_controller
spi_controller_resume
@@ -1305,6 +1354,16 @@
spi_register_controller
spi_unregister_controller
+# required by spidev.ko
+ driver_unregister
+ find_next_zero_bit
+ __register_chrdev
+ __spi_register_driver
+ spi_setup
+ spi_sync
+ stream_open
+ __unregister_chrdev
+
# required by ufs-exynos-core.ko
ufshcd_config_pwr_mode
ufshcd_dme_get_attr
@@ -1328,7 +1387,6 @@
v4l2_event_pending
vb2_create_bufs
vb2_expbuf
- vb2_prepare_buf
vb2_request_object_is_buffer
# required by videobuf2-dma-sg.ko
diff --git a/android/abi_gki_aarch64_qcom b/android/abi_gki_aarch64_qcom
index 90d04aded65a..1e6e35d4f546 100644
--- a/android/abi_gki_aarch64_qcom
+++ b/android/abi_gki_aarch64_qcom
@@ -1883,6 +1883,8 @@
register_shrinker
register_syscore_ops
register_sysctl_table
+ register_virtio_device
+ register_virtio_driver
regmap_bulk_read
regmap_bulk_write
regmap_field_read
@@ -2486,6 +2488,8 @@
unregister_shrinker
unregister_syscore_ops
unregister_sysctl_table
+ unregister_virtio_device
+ unregister_virtio_driver
up
update_devfreq
up_read
@@ -2742,6 +2746,29 @@
video_ioctl2
__video_register_device
video_unregister_device
+ virtio_check_driver_offered_feature
+ virtio_config_changed
+ virtio_max_dma_size
+ virtqueue_add_inbuf
+ virtqueue_add_inbuf_ctx
+ virtqueue_add_outbuf
+ virtqueue_add_sgs
+ virtqueue_detach_unused_buf
+ virtqueue_disable_cb
+ virtqueue_enable_cb
+ virtqueue_enable_cb_delayed
+ virtqueue_enable_cb_prepare
+ virtqueue_get_avail_addr
+ virtqueue_get_buf
+ virtqueue_get_buf_ctx
+ virtqueue_get_desc_addr
+ virtqueue_get_used_addr
+ virtqueue_get_vring_size
+ virtqueue_is_broken
+ virtqueue_kick
+ virtqueue_kick_prepare
+ virtqueue_notify
+ virtqueue_poll
vmalloc
vmalloc_to_page
vmalloc_user
@@ -2755,6 +2782,10 @@
vm_map_ram
vm_unmap_ram
vprintk
+ vring_create_virtqueue
+ vring_del_virtqueue
+ vring_interrupt
+ vring_transport_features
vscnprintf
vsnprintf
vunmap
diff --git a/arch/arm/configs/bcm2835_defconfig b/arch/arm/configs/bcm2835_defconfig
index 519ff58e67b3..0afcae9f7cf8 100644
--- a/arch/arm/configs/bcm2835_defconfig
+++ b/arch/arm/configs/bcm2835_defconfig
@@ -178,6 +178,7 @@ CONFIG_SCHED_TRACER=y
CONFIG_STACK_TRACER=y
CONFIG_FUNCTION_PROFILER=y
CONFIG_TEST_KSTRTOX=y
+CONFIG_DEBUG_FS=y
CONFIG_KGDB=y
CONFIG_KGDB_KDB=y
CONFIG_STRICT_DEVMEM=y
diff --git a/arch/arm/configs/socfpga_defconfig b/arch/arm/configs/socfpga_defconfig
index fe2e1e82e233..e73c97b0f5b0 100644
--- a/arch/arm/configs/socfpga_defconfig
+++ b/arch/arm/configs/socfpga_defconfig
@@ -157,6 +157,7 @@ CONFIG_NLS_ISO8859_1=y
CONFIG_PRINTK_TIME=y
CONFIG_DEBUG_INFO=y
CONFIG_MAGIC_SYSRQ=y
+CONFIG_DEBUG_FS=y
CONFIG_DETECT_HUNG_TASK=y
# CONFIG_SCHED_DEBUG is not set
CONFIG_FUNCTION_TRACER=y
diff --git a/arch/mips/vdso/Makefile b/arch/mips/vdso/Makefile
index 996a934ece7d..267bd182946d 100644
--- a/arch/mips/vdso/Makefile
+++ b/arch/mips/vdso/Makefile
@@ -18,6 +18,10 @@ ccflags-vdso := \
$(filter -mno-loongson-%,$(KBUILD_CFLAGS)) \
-D__VDSO__
+ifndef CONFIG_64BIT
+ccflags-vdso += -DBUILD_VDSO32
+endif
+
ifdef CONFIG_CC_IS_CLANG
ccflags-vdso += $(filter --target=%,$(KBUILD_CFLAGS))
endif
diff --git a/arch/x86/include/asm/vgtod.h b/arch/x86/include/asm/vgtod.h
index a2638c6124ed..f3fe0057647c 100644
--- a/arch/x86/include/asm/vgtod.h
+++ b/arch/x86/include/asm/vgtod.h
@@ -2,6 +2,11 @@
#ifndef _ASM_X86_VGTOD_H
#define _ASM_X86_VGTOD_H
+/*
+ * This check is required to prevent ARCH=um to include
+ * unwanted headers.
+ */
+#ifdef CONFIG_GENERIC_GETTIMEOFDAY
#include
#include
#include
@@ -14,6 +19,7 @@ typedef u64 gtod_long_t;
#else
typedef unsigned long gtod_long_t;
#endif
+#endif /* CONFIG_GENERIC_GETTIMEOFDAY */
extern int vclocks_used;
static inline bool vclock_was_used(int vclock)
diff --git a/drivers/base/core.c b/drivers/base/core.c
index 35f63f7ef287..81e5265c2cb5 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -804,9 +804,7 @@ static void device_link_put_kref(struct device_link *link)
void device_link_del(struct device_link *link)
{
device_links_write_lock();
- device_pm_lock();
device_link_put_kref(link);
- device_pm_unlock();
device_links_write_unlock();
}
EXPORT_SYMBOL_GPL(device_link_del);
@@ -827,7 +825,6 @@ void device_link_remove(void *consumer, struct device *supplier)
return;
device_links_write_lock();
- device_pm_lock();
list_for_each_entry(link, &supplier->links.consumers, s_node) {
if (link->consumer == consumer) {
@@ -836,7 +833,6 @@ void device_link_remove(void *consumer, struct device *supplier)
}
}
- device_pm_unlock();
device_links_write_unlock();
}
EXPORT_SYMBOL_GPL(device_link_remove);
diff --git a/drivers/mfd/sprd-sc27xx-spi.c b/drivers/mfd/sprd-sc27xx-spi.c
index ebdf2f11ae28..bb502f4c56df 100644
--- a/drivers/mfd/sprd-sc27xx-spi.c
+++ b/drivers/mfd/sprd-sc27xx-spi.c
@@ -256,7 +256,7 @@ static int sprd_pmic_probe(struct spi_device *spi)
}
ret = devm_regmap_add_irq_chip(&spi->dev, ddata->regmap, ddata->irq,
- IRQF_ONESHOT | IRQF_NO_SUSPEND, 0,
+ IRQF_ONESHOT, 0,
&ddata->irq_chip, &ddata->irq_data);
if (ret) {
dev_err(&spi->dev, "Failed to add PMIC irq chip %d\n", ret);
@@ -272,9 +272,34 @@ static int sprd_pmic_probe(struct spi_device *spi)
return ret;
}
+ device_init_wakeup(&spi->dev, true);
return 0;
}
+#ifdef CONFIG_PM_SLEEP
+static int sprd_pmic_suspend(struct device *dev)
+{
+ struct sprd_pmic *ddata = dev_get_drvdata(dev);
+
+ if (device_may_wakeup(dev))
+ enable_irq_wake(ddata->irq);
+
+ return 0;
+}
+
+static int sprd_pmic_resume(struct device *dev)
+{
+ struct sprd_pmic *ddata = dev_get_drvdata(dev);
+
+ if (device_may_wakeup(dev))
+ disable_irq_wake(ddata->irq);
+
+ return 0;
+}
+#endif
+
+static SIMPLE_DEV_PM_OPS(sprd_pmic_pm_ops, sprd_pmic_suspend, sprd_pmic_resume);
+
static const struct of_device_id sprd_pmic_match[] = {
{ .compatible = "sprd,sc2731", .data = &sc2731_data },
{},
@@ -286,6 +311,7 @@ static struct spi_driver sprd_pmic_driver = {
.name = "sc27xx-pmic",
.bus = &spi_bus_type,
.of_match_table = sprd_pmic_match,
+ .pm = &sprd_pmic_pm_ops,
},
.probe = sprd_pmic_probe,
};
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 9efc311b623e..cc97ed61b71d 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -3898,9 +3898,6 @@ int sdhci_setup_host(struct sdhci_host *host)
mmc_hostname(mmc), host->version);
}
- if (host->quirks & SDHCI_QUIRK_BROKEN_CQE)
- mmc->caps2 &= ~MMC_CAP2_CQE;
-
if (host->quirks & SDHCI_QUIRK_FORCE_DMA)
host->flags |= SDHCI_USE_SDMA;
else if (!(host->caps & SDHCI_CAN_DO_SDMA))
@@ -4420,6 +4417,12 @@ int __sdhci_add_host(struct sdhci_host *host)
struct mmc_host *mmc = host->mmc;
int ret;
+ if ((mmc->caps2 & MMC_CAP2_CQE) &&
+ (host->quirks & SDHCI_QUIRK_BROKEN_CQE)) {
+ mmc->caps2 &= ~MMC_CAP2_CQE;
+ mmc->cqe_ops = NULL;
+ }
+
host->complete_wq = alloc_workqueue("sdhci", flags, 0);
if (!host->complete_wq)
return -ENOMEM;
diff --git a/drivers/net/wireless/ath/wil6210/txrx.c b/drivers/net/wireless/ath/wil6210/txrx.c
index 598c1fba9dac..579bfa267041 100644
--- a/drivers/net/wireless/ath/wil6210/txrx.c
+++ b/drivers/net/wireless/ath/wil6210/txrx.c
@@ -907,7 +907,6 @@ static void wil_rx_handle_eapol(struct wil6210_vif *vif, struct sk_buff *skb)
void wil_netif_rx(struct sk_buff *skb, struct net_device *ndev, int cid,
struct wil_net_stats *stats, bool gro)
{
- gro_result_t rc = GRO_NORMAL;
struct wil6210_vif *vif = ndev_to_vif(ndev);
struct wil6210_priv *wil = ndev_to_wil(ndev);
struct wireless_dev *wdev = vif_to_wdev(vif);
@@ -918,22 +917,16 @@ void wil_netif_rx(struct sk_buff *skb, struct net_device *ndev, int cid,
*/
int mcast = is_multicast_ether_addr(da);
struct sk_buff *xmit_skb = NULL;
- static const char * const gro_res_str[] = {
- [GRO_MERGED] = "GRO_MERGED",
- [GRO_MERGED_FREE] = "GRO_MERGED_FREE",
- [GRO_HELD] = "GRO_HELD",
- [GRO_NORMAL] = "GRO_NORMAL",
- [GRO_DROP] = "GRO_DROP",
- [GRO_CONSUMED] = "GRO_CONSUMED",
- };
if (wdev->iftype == NL80211_IFTYPE_STATION) {
sa = wil_skb_get_sa(skb);
if (mcast && ether_addr_equal(sa, ndev->dev_addr)) {
/* mcast packet looped back to us */
- rc = GRO_DROP;
dev_kfree_skb(skb);
- goto stats;
+ ndev->stats.rx_dropped++;
+ stats->rx_dropped++;
+ wil_dbg_txrx(wil, "Rx drop %d bytes\n", len);
+ return;
}
} else if (wdev->iftype == NL80211_IFTYPE_AP && !vif->ap_isolate) {
if (mcast) {
@@ -977,26 +970,16 @@ void wil_netif_rx(struct sk_buff *skb, struct net_device *ndev, int cid,
wil_rx_handle_eapol(vif, skb);
if (gro)
- rc = napi_gro_receive(&wil->napi_rx, skb);
+ napi_gro_receive(&wil->napi_rx, skb);
else
netif_rx_ni(skb);
- wil_dbg_txrx(wil, "Rx complete %d bytes => %s\n",
- len, gro_res_str[rc]);
- }
-stats:
- /* statistics. rc set to GRO_NORMAL for AP bridging */
- if (unlikely(rc == GRO_DROP)) {
- ndev->stats.rx_dropped++;
- stats->rx_dropped++;
- wil_dbg_txrx(wil, "Rx drop %d bytes\n", len);
- } else {
- ndev->stats.rx_packets++;
- stats->rx_packets++;
- ndev->stats.rx_bytes += len;
- stats->rx_bytes += len;
- if (mcast)
- ndev->stats.multicast++;
}
+ ndev->stats.rx_packets++;
+ stats->rx_packets++;
+ ndev->stats.rx_bytes += len;
+ stats->rx_bytes += len;
+ if (mcast)
+ ndev->stats.multicast++;
}
void wil_netif_rx_any(struct sk_buff *skb, struct net_device *ndev)
diff --git a/drivers/nvmem/sprd-efuse.c b/drivers/nvmem/sprd-efuse.c
index 925feb21d5ad..59523245db8a 100644
--- a/drivers/nvmem/sprd-efuse.c
+++ b/drivers/nvmem/sprd-efuse.c
@@ -378,8 +378,8 @@ static int sprd_efuse_probe(struct platform_device *pdev)
return -ENOMEM;
efuse->base = devm_platform_ioremap_resource(pdev, 0);
- if (!efuse->base)
- return -ENOMEM;
+ if (IS_ERR(efuse->base))
+ return PTR_ERR(efuse->base);
ret = of_hwspin_lock_get_id(np, 0);
if (ret < 0) {
diff --git a/drivers/of/platform.c b/drivers/of/platform.c
index c616c4d9f082..55d719347810 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -518,10 +518,11 @@ static int __init of_platform_default_populate_init(void)
{
struct device_node *node;
+ device_links_supplier_sync_state_pause();
+
if (!of_have_populated_dt())
return -ENODEV;
- device_links_supplier_sync_state_pause();
/*
* Handle certain compatibles explicitly, since we don't want to create
* platform_devices for every node in /reserved-memory with a
@@ -547,8 +548,7 @@ arch_initcall_sync(of_platform_default_populate_init);
static int __init of_platform_sync_state_init(void)
{
- if (of_have_populated_dt())
- device_links_supplier_sync_state_resume();
+ device_links_supplier_sync_state_resume();
return 0;
}
late_initcall_sync(of_platform_sync_state_init);
diff --git a/drivers/of/property.c b/drivers/of/property.c
index 277d2d854ad5..c3cca636e8ea 100644
--- a/drivers/of/property.c
+++ b/drivers/of/property.c
@@ -1031,8 +1031,20 @@ static int of_link_to_phandle(struct device *dev, struct device_node *sup_np,
* Find the device node that contains the supplier phandle. It may be
* @sup_np or it may be an ancestor of @sup_np.
*/
- while (sup_np && !of_find_property(sup_np, "compatible", NULL))
+ while (sup_np) {
+
+ /* Don't allow linking to a disabled supplier */
+ if (!of_device_is_available(sup_np)) {
+ of_node_put(sup_np);
+ sup_np = NULL;
+ }
+
+ if (of_find_property(sup_np, "compatible", NULL))
+ break;
+
sup_np = of_get_next_parent(sup_np);
+ }
+
if (!sup_np) {
dev_dbg(dev, "Not linking to %pOFP - No device\n", tmp_np);
return -ENODEV;
@@ -1311,7 +1323,7 @@ static int of_link_to_suppliers(struct device *dev,
if (of_link_property(dev, con_np, p->name))
ret = -ENODEV;
- for_each_child_of_node(con_np, child)
+ for_each_available_child_of_node(con_np, child)
if (of_link_to_suppliers(dev, child) && !ret)
ret = -EAGAIN;
diff --git a/drivers/scsi/ufs/ufs-mediatek.c b/drivers/scsi/ufs/ufs-mediatek.c
index f435c938455e..e22f91695b04 100644
--- a/drivers/scsi/ufs/ufs-mediatek.c
+++ b/drivers/scsi/ufs/ufs-mediatek.c
@@ -129,7 +129,10 @@ static int ufs_mtk_bind_mphy(struct ufs_hba *hba)
__func__, err);
} else if (IS_ERR(host->mphy)) {
err = PTR_ERR(host->mphy);
- dev_info(dev, "%s: PHY get failed %d\n", __func__, err);
+ if (err != -ENODEV) {
+ dev_info(dev, "%s: PHY get failed %d\n", __func__,
+ err);
+ }
}
if (err)
@@ -669,13 +672,7 @@ static int ufs_mtk_apply_dev_quirks(struct ufs_hba *hba)
static void ufs_mtk_fixup_dev_quirks(struct ufs_hba *hba)
{
- struct ufs_dev_info *dev_info = &hba->dev_info;
- u16 mid = dev_info->wmanufacturerid;
-
ufshcd_fixup_dev_quirks(hba, ufs_mtk_dev_fixups);
-
- if (mid == UFS_VENDOR_SAMSUNG)
- hba->dev_quirks &= ~UFS_DEVICE_QUIRK_HOST_PA_TACTIVATE;
}
/**
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index b3ddac110794..84dbfd145271 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -6258,7 +6258,7 @@ static irqreturn_t ufshcd_intr(int irq, void *__hba)
intr_status = ufshcd_readl(hba, REG_INTERRUPT_STATUS);
}
- if (retval == IRQ_NONE) {
+ if (enabled_intr_status && retval == IRQ_NONE) {
dev_err(hba->dev, "%s: Unhandled interrupt 0x%08x\n",
__func__, intr_status);
ufshcd_dump_regs(hba, 0, UFSHCI_REG_SPACE_SIZE, "host_regs: ");
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index 2c2583c49dc1..9c508541325c 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -3124,6 +3124,15 @@ int spi_setup(struct spi_device *spi)
status);
return status;
}
+
+ /*
+ * We do not want to return positive value from pm_runtime_get,
+ * there are many instances of devices calling spi_setup() and
+ * checking for a non-zero return value instead of a negative
+ * return value.
+ */
+ status = 0;
+
spi_set_cs(spi, false);
pm_runtime_mark_last_busy(spi->controller->dev.parent);
pm_runtime_put_autosuspend(spi->controller->dev.parent);
diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig
index 47e1fb30aef4..f08f46533aa8 100644
--- a/drivers/thermal/Kconfig
+++ b/drivers/thermal/Kconfig
@@ -108,7 +108,7 @@ config THERMAL_DEFAULT_GOV_USER_SPACE
config THERMAL_DEFAULT_GOV_POWER_ALLOCATOR
bool "power_allocator"
- select THERMAL_GOV_POWER_ALLOCATOR
+ depends on THERMAL_GOV_POWER_ALLOCATOR
help
Select this if you want to control temperature based on
system and device power allocation. This governor can only
diff --git a/drivers/thermal/sprd_thermal.c b/drivers/thermal/sprd_thermal.c
index a340374e8c51..4cde70dcf655 100644
--- a/drivers/thermal/sprd_thermal.c
+++ b/drivers/thermal/sprd_thermal.c
@@ -348,8 +348,8 @@ static int sprd_thm_probe(struct platform_device *pdev)
thm->var_data = pdata;
thm->base = devm_platform_ioremap_resource(pdev, 0);
- if (!thm->base)
- return -ENOMEM;
+ if (IS_ERR(thm->base))
+ return PTR_ERR(thm->base);
thm->nr_sensors = of_get_child_count(np);
if (thm->nr_sensors == 0 || thm->nr_sensors > SPRD_THM_MAX_SENSOR) {
diff --git a/drivers/thermal/thermal_sysfs.c b/drivers/thermal/thermal_sysfs.c
index aa99edb4dff7..4dce4a8f71ed 100644
--- a/drivers/thermal/thermal_sysfs.c
+++ b/drivers/thermal/thermal_sysfs.c
@@ -770,6 +770,9 @@ void thermal_cooling_device_stats_update(struct thermal_cooling_device *cdev,
{
struct cooling_dev_stats *stats = cdev->stats;
+ if (!stats)
+ return;
+
spin_lock(&stats->lock);
if (stats->state == new_state)
diff --git a/drivers/usb/host/xhci-pci-renesas.c b/drivers/usb/host/xhci-pci-renesas.c
index be2e7eff492f..02fcb01bc2b9 100644
--- a/drivers/usb/host/xhci-pci-renesas.c
+++ b/drivers/usb/host/xhci-pci-renesas.c
@@ -7,7 +7,7 @@
#include
#include
#include
-#include
+#include
#include "xhci.h"
#include "xhci-trace.h"
diff --git a/fs/crypto/fscrypt_private.h b/fs/crypto/fscrypt_private.h
index ea28dd500d2b..688ae13f8f5f 100644
--- a/fs/crypto/fscrypt_private.h
+++ b/fs/crypto/fscrypt_private.h
@@ -363,13 +363,16 @@ fscrypt_is_key_prepared(struct fscrypt_prepared_key *prep_key,
const struct fscrypt_info *ci)
{
/*
- * The READ_ONCE() here pairs with the smp_store_release() in
- * fscrypt_prepare_key(). (This only matters for the per-mode keys,
- * which are shared by multiple inodes.)
+ * The two smp_load_acquire()'s here pair with the smp_store_release()'s
+ * in fscrypt_prepare_inline_crypt_key() and fscrypt_prepare_key().
+ * I.e., in some cases (namely, if this prep_key is a per-mode
+ * encryption key) another task can publish blk_key or tfm concurrently,
+ * executing a RELEASE barrier. We need to use smp_load_acquire() here
+ * to safely ACQUIRE the memory the other task published.
*/
if (fscrypt_using_inline_encryption(ci))
- return READ_ONCE(prep_key->blk_key) != NULL;
- return READ_ONCE(prep_key->tfm) != NULL;
+ return smp_load_acquire(&prep_key->blk_key) != NULL;
+ return smp_load_acquire(&prep_key->tfm) != NULL;
}
#else /* CONFIG_FS_ENCRYPTION_INLINE_CRYPT */
@@ -416,7 +419,7 @@ static inline bool
fscrypt_is_key_prepared(struct fscrypt_prepared_key *prep_key,
const struct fscrypt_info *ci)
{
- return READ_ONCE(prep_key->tfm) != NULL;
+ return smp_load_acquire(&prep_key->tfm) != NULL;
}
#endif /* !CONFIG_FS_ENCRYPTION_INLINE_CRYPT */
diff --git a/fs/crypto/inline_crypt.c b/fs/crypto/inline_crypt.c
index 6504f053ae57..3b3a684c19d5 100644
--- a/fs/crypto/inline_crypt.c
+++ b/fs/crypto/inline_crypt.c
@@ -202,8 +202,10 @@ int fscrypt_prepare_inline_crypt_key(struct fscrypt_prepared_key *prep_key,
}
}
/*
- * Pairs with READ_ONCE() in fscrypt_is_key_prepared(). (Only matters
- * for the per-mode keys, which are shared by multiple inodes.)
+ * Pairs with the smp_load_acquire() in fscrypt_is_key_prepared().
+ * I.e., here we publish ->blk_key with a RELEASE barrier so that
+ * concurrent tasks can ACQUIRE it. Note that this concurrency is only
+ * possible for per-mode keys, not for per-file keys.
*/
smp_store_release(&prep_key->blk_key, blk_key);
return 0;
diff --git a/fs/crypto/keysetup.c b/fs/crypto/keysetup.c
index 2ce4d48b6655..96609a5c3843 100644
--- a/fs/crypto/keysetup.c
+++ b/fs/crypto/keysetup.c
@@ -134,8 +134,10 @@ int fscrypt_prepare_key(struct fscrypt_prepared_key *prep_key,
if (IS_ERR(tfm))
return PTR_ERR(tfm);
/*
- * Pairs with READ_ONCE() in fscrypt_is_key_prepared(). (Only matters
- * for the per-mode keys, which are shared by multiple inodes.)
+ * Pairs with the smp_load_acquire() in fscrypt_is_key_prepared().
+ * I.e., here we publish ->tfm with a RELEASE barrier so that
+ * concurrent tasks can ACQUIRE it. Note that this concurrency is only
+ * possible for per-mode keys, not for per-file keys.
*/
smp_store_release(&prep_key->tfm, tfm);
return 0;
diff --git a/fs/crypto/policy.c b/fs/crypto/policy.c
index d23ff162c78b..026dbb2fa36f 100644
--- a/fs/crypto/policy.c
+++ b/fs/crypto/policy.c
@@ -77,6 +77,20 @@ static bool supported_iv_ino_lblk_policy(const struct fscrypt_policy_v2 *policy,
struct super_block *sb = inode->i_sb;
int ino_bits = 64, lblk_bits = 64;
+ /*
+ * IV_INO_LBLK_* exist only because of hardware limitations, and
+ * currently the only known use case for them involves AES-256-XTS.
+ * That's also all we test currently. For these reasons, for now only
+ * allow AES-256-XTS here. This can be relaxed later if a use case for
+ * IV_INO_LBLK_* with other encryption modes arises.
+ */
+ if (policy->contents_encryption_mode != FSCRYPT_MODE_AES_256_XTS) {
+ fscrypt_warn(inode,
+ "Can't use %s policy with contents mode other than AES-256-XTS",
+ type);
+ return false;
+ }
+
/*
* It's unsafe to include inode numbers in the IVs if the filesystem can
* potentially renumber inodes, e.g. via filesystem shrinking.
@@ -178,10 +192,15 @@ static bool fscrypt_supported_v2_policy(const struct fscrypt_policy_v2 *policy,
32, 32))
return false;
+ /*
+ * IV_INO_LBLK_32 hashes the inode number, so in principle it can
+ * support any ino_bits. However, currently the inode number is gotten
+ * from inode::i_ino which is 'unsigned long'. So for now the
+ * implementation limit is 32 bits.
+ */
if ((policy->flags & FSCRYPT_POLICY_FLAG_IV_INO_LBLK_32) &&
- /* This uses hashed inode numbers, so ino_bits doesn't matter. */
!supported_iv_ino_lblk_policy(policy, inode, "IV_INO_LBLK_32",
- INT_MAX, 32))
+ 32, 32))
return false;
if (memchr_inv(policy->__reserved, 0, sizeof(policy->__reserved))) {
diff --git a/include/linux/mfd/syscon.h b/include/linux/mfd/syscon.h
index 714cab1e09d3..7f20e9b502a5 100644
--- a/include/linux/mfd/syscon.h
+++ b/include/linux/mfd/syscon.h
@@ -51,7 +51,7 @@ static inline struct regmap *syscon_regmap_lookup_by_phandle(
return ERR_PTR(-ENOTSUPP);
}
-static struct regmap *syscon_regmap_lookup_by_phandle_args(
+static inline struct regmap *syscon_regmap_lookup_by_phandle_args(
struct device_node *np,
const char *property,
int arg_count,
diff --git a/include/net/ndisc.h b/include/net/ndisc.h
index 5ffba5a4e5c5..6cb3e6c11132 100644
--- a/include/net/ndisc.h
+++ b/include/net/ndisc.h
@@ -41,7 +41,7 @@ enum {
ND_OPT_DNSSL = 31, /* RFC6106 */
ND_OPT_6CO = 34, /* RFC6775 */
ND_OPT_CAPTIVE_PORTAL = 37, /* RFC7710 */
- ND_OPT_PREF64 = 38, /* RFC-ietf-6man-ra-pref64-09 */
+ ND_OPT_PREF64 = 38, /* RFC8781 */
__ND_OPT_MAX
};
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index aea9c93aae3a..cab0e196f299 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -6493,7 +6493,8 @@ static int find_energy_efficient_cpu(struct task_struct *p, int prev_cpu, int sy
util = cpu_util_next(cpu, p, cpu);
cpu_cap = capacity_of(cpu);
- spare_cap = cpu_cap - util;
+ spare_cap = cpu_cap;
+ lsub_positive(&spare_cap, util);
/*
* Skip CPUs that cannot satisfy the capacity request.
diff --git a/kernel/time/tick-common.c b/kernel/time/tick-common.c
index 59225b484e4e..7e5d3524e924 100644
--- a/kernel/time/tick-common.c
+++ b/kernel/time/tick-common.c
@@ -11,6 +11,7 @@
#include
#include
#include
+#include
#include
#include
#include
@@ -558,6 +559,7 @@ void tick_unfreeze(void)
trace_suspend_resume(TPS("timekeeping_freeze"),
smp_processor_id(), false);
} else {
+ touch_softlockup_watchdog();
tick_resume_local();
}
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 5ee8045fa67b..572adbad7243 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -3671,6 +3671,7 @@ struct sk_buff *skb_segment_list(struct sk_buff *skb,
skb_push(nskb, -skb_network_offset(nskb) + offset);
+ skb_release_head_state(nskb);
__copy_skb_header(nskb, skb);
skb_headers_offset_update(nskb, skb_headroom(nskb) - skb_headroom(skb));
diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c
index 4d7d23e47829..66e830727c98 100644
--- a/net/mac80211/mesh.c
+++ b/net/mac80211/mesh.c
@@ -590,6 +590,19 @@ int mesh_add_he_oper_ie(struct ieee80211_sub_if_data *sdata,
int mesh_add_he_6ghz_cap_ie(struct ieee80211_sub_if_data *sdata,
struct sk_buff *skb)
{
+ struct ieee80211_supported_band *sband;
+ const struct ieee80211_sband_iftype_data *iftd;
+
+ sband = ieee80211_get_sband(sdata);
+ if (!sband)
+ return -EINVAL;
+
+ iftd = ieee80211_get_sband_iftype_data(sband,
+ NL80211_IFTYPE_MESH_POINT);
+ /* The device doesn't support HE in mesh mode or at all */
+ if (!iftd)
+ return 0;
+
ieee80211_ie_build_he_6ghz_cap(sdata, skb);
return 0;
}
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index a27f7aa3f9c9..9fdee728f29b 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -2845,6 +2845,10 @@ void ieee80211_ie_build_he_6ghz_cap(struct ieee80211_sub_if_data *sdata,
if (WARN_ON(!iftd))
return;
+ /* Check for device HE 6 GHz capability before adding element */
+ if (!iftd->he_6ghz_capa.capa)
+ return;
+
cap = le16_to_cpu(iftd->he_6ghz_capa.capa);
cap &= ~IEEE80211_HE_6GHZ_CAP_SM_PS;
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index c745c25d6669..294e0f2d49f1 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -4999,7 +4999,7 @@ static int nl80211_start_ap(struct sk_buff *skb, struct genl_info *info)
info->attrs[NL80211_ATTR_HE_BSS_COLOR],
¶ms.he_bss_color);
if (err)
- return err;
+ goto out;
}
nl80211_calculate_ap_params(¶ms);
diff --git a/net/wireless/util.c b/net/wireless/util.c
index 2ad081bf515e..a468e64313dc 100644
--- a/net/wireless/util.c
+++ b/net/wireless/util.c
@@ -95,7 +95,7 @@ u32 ieee80211_channel_to_freq_khz(int chan, enum nl80211_band band)
/* see 802.11ax D6.1 27.3.23.2 */
if (chan == 2)
return MHZ_TO_KHZ(5935);
- if (chan <= 253)
+ if (chan <= 233)
return MHZ_TO_KHZ(5950 + chan * 5);
break;
case NL80211_BAND_60GHZ:
diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c
index e352ce1e1779..5199dd3f3db5 100644
--- a/security/selinux/ss/services.c
+++ b/security/selinux/ss/services.c
@@ -1261,6 +1261,12 @@ int security_sidtab_hash_stats(struct selinux_state *state, char *page)
{
int rc;
+ if (!state->initialized) {
+ pr_err("SELinux: %s: called before initial load_policy\n",
+ __func__);
+ return -EINVAL;
+ }
+
read_lock(&state->ss->policy_rwlock);
rc = sidtab_hash_stats(state->ss->sidtab, page);
read_unlock(&state->ss->policy_rwlock);