mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-23 04:59:05 -04:00
Merge remote-tracking branch 'remotes/origin/tmp-0453f563cce0' into msm-5.4
* remotes/origin/tmp-0453f563cce0:
FROMLIST: pwm: Convert period and duty cycle to u64
ANDROID: gki_defconfig: FW_CACHE to no
FROMGIT: firmware_class: make firmware caching configurable
ANDROID: gki_defconfig: removed CONFIG_PM_WAKELOCKS
ANDROID: gki_defconfig: enable CONFIG_IKHEADERS as m
ANDROID: update ABI representation
FROMLIST: reboot: Export reboot_mode
FROMLIST: iommu/arm-smmu: Update my email address in MODULE_AUTHOR()
FROMLIST: iommu/arm-smmu: Allow building as a module
FROMLIST: iommu/arm-smmu: Unregister IOMMU and bus ops on device removal
FROMLIST: iommu/arm-smmu-v3: Allow building as a module
FROMLIST: iommu/arm-smmu-v3: Unregister IOMMU and bus ops on device removal
FROMLIST: iommu/arm-smmu: Prevent forced unbinding of Arm SMMU drivers
FROMLIST: Revert "iommu/arm-smmu: Make arm-smmu explicitly non-modular"
FROMLIST: Revert "iommu/arm-smmu: Make arm-smmu-v3 explicitly non-modular"
FROMLIST: drivers/iommu: Allow IOMMU bus ops to be unregistered
FROMLIST: iommu/of: Take a ref to the IOMMU driver during ->of_xlate()
FROMLIST: drivers/iommu: Take a ref to the IOMMU driver prior to ->add_device()
FROMLIST: PCI: Export pci_ats_disabled() as a GPL symbol to modules
FROMLIST: iommu/of: Request ACS from the PCI core when configuring IOMMU linkage
FROMLIST: drivers/iommu: Export core IOMMU API symbols to permit modular drivers
FROMGIT: of: property: Add device link support for "iommu-map"
Revert "FROMLIST: iommu: Export core IOMMU functions to kernel modules"
Revert "FROMLIST: PCI: Export PCI ACS and DMA searching functions to modules"
Revert "FROMLIST: of: Export of_phandle_iterator_args() to modules"
ANDROID: initial branch preparations for 5.4
Linux 5.4
cramfs: fix usage on non-MTD device
Revert "Input: synaptics - enable RMI mode for X1 Extreme 2nd Generation"
afs: Fix large file support
afs: Fix possible assert with callbacks from yfs servers
r8152: avoid to call napi_disable twice
MAINTAINERS: Add myself as maintainer of virtio-vsock
udp: drop skb extensions before marking skb stateless
net: rtnetlink: prevent underflows in do_setvfinfo()
mm/ksm.c: don't WARN if page is still mapped in remove_stable_node()
mm/memory_hotplug: don't access uninitialized memmaps in shrink_zone_span()
Revert "fs: ocfs2: fix possible null-pointer dereferences in ocfs2_xa_prepare_entry()"
can: m_can_platform: remove unnecessary m_can_class_resume() call
can: m_can_platform: set net_device structure as driver data
hv_netvsc: Fix send_table offset in case of a host bug
hv_netvsc: Fix offset usage in netvsc_send_table()
net-ipv6: IPV6_TRANSPARENT - check NET_RAW prior to NET_ADMIN
ANDROID: gki_defconfig: disable FUNCTION_TRACER
sfc: Only cancel the PPS workqueue if it exists
nfc: port100: handle command failure cleanly
drm/i915/fbdev: Restore physical addresses for fb_mmap()
net-sysfs: fix netdev_queue_add_kobject() breakage
ANDROID: update ABI representation
ANDROID: add unstripped modules to the distribution
Revert "drm/amd/display: enable S/G for RAVEN chip"
drm/amdgpu: disable gfxoff on original raven
drm/amdgpu: disable gfxoff when using register read interface
drm/amd/powerplay: correct fine grained dpm force level setting
drm/amd/powerplay: issue no PPSMC_MSG_GetCurrPkgPwr on unsupported ASICs
drm/amdgpu: remove experimental flag for Navi14
r8152: Re-order napi_disable in rtl8152_close
net: qca_spi: Move reset_count to struct qcaspi
net: qca_spi: fix receive buffer size check
net/ibmvnic: Ignore H_FUNCTION return from H_EOI to tolerate XIVE mode
Revert "net/ibmvnic: Fix EOI when running in XIVE mode"
net/mlxfw: Verify FSM error code translation doesn't exceed array size
net/mlx5: Update the list of the PCI supported devices
net/mlx5: Fix auto group size calculation
net/mlx5e: Add missing capability bit check for IP-in-IP
net/mlx5e: Do not use non-EXT link modes in EXT mode
net/mlx5e: Fix set vf link state error flow
net/mlx5: DR, Limit STE hash table enlarge based on bytemask
net/mlx5: DR, Skip rehash for tables with byte mask zero
net/mlx5: DR, Fix invalid EQ vector number on CQ creation
net/mlx5e: Reorder mirrer action parsing to check for encap first
net/mlx5e: Fix ingress rate configuration for representors
net/mlx5e: Fix error flow cleanup in mlx5e_tc_tun_create_header_ipv4/6
s390/qeth: return proper errno on IO error
s390/qeth: fix potential deadlock on workqueue flush
ipv6/route: return if there is no fib_nh_gw_family
net-sysfs: Fix reference count leak in rx|netdev_queue_add_kobject
arm64: uaccess: Remove uaccess_*_not_uao asm macros
arm64: uaccess: Ensure PAN is re-enabled after unhandled uaccess fault
BACKPORT: FROMLIST: pwm: Add support for different PWM output types
ANDROID: SoC: core: Introduce macro SOC_SINGLE_MULTI_EXT
ANDROID: usb: gadget: configfs: fix compiler warning
fork: fix pidfd_poll()'s return type
PM: QoS: Invalidate frequency QoS requests after removal
virtio_balloon: fix shrinker count
virtio_balloon: fix shrinker scan number of pages
mdio_bus: Fix init if CONFIG_RESET_CONTROLLER=n
Revert "mdio_bus: fix mdio_register_device when RESET_CONTROLLER is disabled"
net: hns3: fix a wrong reset interrupt status mask
net: fec: fix clock count mis-match
net/sched: act_pedit: fix WARN() in the traffic path
net: phylink: fix link mode modification in PHY mode
net: phylink: update documentation on create and destroy
r8169: disable TSO on a single version of RTL8168c to fix performance
MAINTAINERS: forcedeth: Change Zhu Yanjun's email address
taprio: don't reject same mqprio settings
net/tls: enable sk_msg redirect to tls socket egress
afs: Fix missing timeout reset
ANDROID: drivers: gpu: drm: add support to batch commands
gve: fix dma sync bug where not all pages synced
drm/i915: make pool objects read-only
mdio_bus: Fix init if CONFIG_RESET_CONTROLLER=n
nbd:fix memory leak in nbd_get_socket()
virtio_console: allocate inbufs in add_port() only if it is needed
virtio_ring: fix return code on DMA mapping fails
mdio_bus: fix mdio_register_device when RESET_CONTROLLER is disabled
net/ipv4: fix sysctl max for fib_multipath_hash_policy
phy: mdio-sun4i: add missed regulator_disable in remove
net/mlx4_en: Fix wrong limitation for number of TX rings
net: sched: ensure opts_len <= IP_TUNNEL_OPTS_MAX in act_tunnel_key
mlxsw: spectrum_router: Fix determining underlay for a GRE tunnel
net: atm: Reduce the severity of logging in unlink_clip_vcc
ANDROID: virtio_blk: Remove BUG_ON for discard/zero ops
drm/i915: Protect request peeking with RCU
drm/i915/userptr: Try to acquire the page lock around set_page_dirty()
drm/i915/pmu: "Frequency" is reported as accumulated cycles
drm/i915: Preload LUTs if the hw isn't currently using them
drm/i915: Don't oops in dumb_create ioctl if we have no crtcs
ANDROID: usb: gadget: configfs: Support multiple android instances
Linux 5.4-rc8
net/mlx4_en: fix mlx4 ethtool -N insertion
Revert "hwrng: core - Freeze khwrng thread during suspend"
ipmr: Fix skb headroom in ipmr_get_route().
net: hns3: cleanup of stray struct hns3_link_mode_mapping
net/smc: fix fastopen for non-blocking connect()
rds: ib: update WR sizes when bringing up connection
net: gemini: add missed free_netdev
net: dsa: tag_8021q: Fix dsa_8021q_restore_pvid for an absent pvid
seg6: fix skb transport_header after decap_and_validate()
seg6: fix srh pointer in get_srh()
net: stmmac: Use the correct style for SPDX License Identifier
octeontx2-af: Use the correct style for SPDX License Identifier
mm/debug.c: PageAnon() is true for PageKsm() pages
mm/debug.c: __dump_page() prints an extra line
mm/page_io.c: do not free shared swap slots
mm/memory_hotplug: fix try_offline_node()
mm,thp: recheck each page before collapsing file THP
mm: slub: really fix slab walking for init_on_free
mm: hugetlb: switch to css_tryget() in hugetlb_cgroup_charge_cgroup()
mm: memcg: switch to css_tryget() in get_mem_cgroup_from_mm()
lib/xz: fix XZ_DYNALLOC to avoid useless memory reallocations
mm: fix trying to reclaim unevictable lru page when calling madvise_pageout
mm: mempolicy: fix the wrong return value and potential pages leak of mbind
ANDROID: ion: Fix buffer_lock mutex initialization
Input: synaptics - enable RMI mode for X1 Extreme 2nd Generation
i2c: core: fix use after free in of_i2c_notify
i2c: acpi: Force bus speed to 400KHz if a Silead touchscreen is present
ptp: Extend the test program to check the external time stamp flags.
mlx5: Reject requests to enable time stamping on both edges.
igb: Reject requests that fail to enable time stamping on both edges.
dp83640: Reject requests to enable time stamping on both edges.
mv88e6xxx: Reject requests to enable time stamping on both edges.
ptp: Introduce strict checking of external time stamp options.
renesas: reject unsupported external timestamp flags
mlx5: reject unsupported external timestamp flags
igb: reject unsupported external timestamp flags
dp83640: reject unsupported external timestamp flags
mv88e6xxx: reject unsupported external timestamp flags
net: reject PTP periodic output requests with unsupported flags
ptp: Validate requests to enable time stamping of external signals.
net: ep93xx_eth: fix mismatch of request_mem_region in remove
ax88172a: fix information leak on short answers
selftests: mlxsw: Adjust test to recent changes
Input: synaptics-rmi4 - destroy F54 poller workqueue when removing
Input: ff-memless - kill timer in destroy()
FROMGIT: driver core: Allow device link operations inside sync_state()
afs: Fix race in commit bulk status fetch
Revert "ANDROID: Revert "Merge tag 'modules-for-v5.4' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux""
sched/uclamp: Fix incorrect condition
KVM: Add a comment describing the /dev/kvm no_compat handling
net: hns3: fix ETS bandwidth validation bug
net: hns3: reallocate SSU' buffer size when pfc_en changes
net: hns3: add compatible handling for MAC VLAN switch parameter configuration
ravb: implement MTU change while device is up
tipc: add back tipc prefix to log messages
ANDROID: uid_sys_stats: avoid double accounting of dying threads
ANDROID: drm: edid: add support for additional CEA extension blocks
ANDROID: include: uapi: drm: add additional drm mode flags
ANDROID: drivers: gpu: drm: fix bugs encountered while fuzzing
ANDROID: driver: gpu: drm: add notifier for panel related events
ANDROID: include: drm: add the definitions for DP Link Compliance tests
ANDROID: drm: dsi: add two DSI mode flags for BLLP
ANDROID: include: drm: support unicasting mipi cmds to dsi ctrls
ANDROID: include: drm: increase DRM max property count to 64
ANDROID: drivers: gpu: drm: add support for secure framebuffer
ANDROID: include: uapi: drm: add additional QCOM modifiers
ANDROID: build kernels with llvm-nm and llvm-objcopy
drm/amdgpu: fix null pointer deref in firmware header printing
rsxx: add missed destroy_workqueue calls in remove
iocost: check active_list of all the ancestors in iocg_activate()
rbd: silence bogus uninitialized warning in rbd_object_map_update_finish()
ceph: increment/decrement dio counter on async requests
ceph: take the inode lock before acquiring cap refs
ALSA: usb-audio: Fix incorrect size check for processing/extension units
KVM: x86/mmu: Take slots_lock when using kvm_mmu_zap_all_fast()
kbuild: tell sparse about the $ARCH
sparc: vdso: fix build error of vdso32
block, bfq: deschedule empty bfq_queues not referred by any process
mmc: sdhci-of-at91: fix quirk2 overwrite
ALSA: usb-audio: Fix incorrect NULL check in create_yamaha_midi_quirk()
slcan: Fix memory leak in error path
io_uring: ensure registered buffer import returns the IO length
net: cdc_ncm: Signedness bug in cdc_ncm_set_dgram_size()
io_uring: Fix getting file for timeout
ANDROID: scsi: ufs-qcom: Enable BROKEN_CRYPTO quirk flag
ANDROID: scsi: ufs-hisi: Enable BROKEN_CRYPTO quirk flag
ANDROID: scsi: ufs: Add quirk bit for controllers that don't play well with inline crypto
ANDROID: scsi: ufs: UFS init should not require inline crypto
gpiolib: acpi: Add Terra Pad 1061 to the run_edge_events_on_boot_blacklist
drm/i915/tgl: MOCS table update
Revert "drm/i915/ehl: Update MOCS table for EHL"
slip: Fix memory leak in slip_open error path
net: usb: qmi_wwan: add support for Foxconn T77W968 LTE modules
KVM: Forbid /dev/kvm being opened by a compat task when CONFIG_KVM_COMPAT=n
KVM: X86: Reset the three MSR list number variables to 0 in kvm_init_msr_list()
selftests: kvm: fix build with glibc >= 2.30
kvm: x86: disable shattered huge page recovery for PREEMPT_RT.
drm/sun4i: tcon: Set min division of TCON0_DCLK to 1.
tools: gpio: Correctly add make dependencies for gpio_utils
x86/resctrl: Fix potential lockdep warning
scripts/tools-support-relr.sh: un-quote variables
Revert "ANDROID: Revert "Merge tag 'modules-for-v5.4' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux""
ALSA: pcm: Fix stream lock usage in snd_pcm_period_elapsed()
ALSA: usb-audio: not submit urb for stopped endpoint
can: j1939: warn if resources are still linked on destroy
can: j1939: j1939_can_recv(): add priv refcounting
can: j1939: transport: j1939_cancel_active_session(): use hrtimer_try_to_cancel() instead of hrtimer_cancel()
can: j1939: make sure socket is held as long as session exists
can: j1939: transport: make sure the aborted session will be deactivated only once
can: j1939: socket: rework socket locking for j1939_sk_release() and j1939_sk_sendmsg()
can: j1939: main: j1939_ndev_to_priv(): avoid crash if can_ml_priv is NULL
can: j1939: move j1939_priv_put() into sk_destruct callback
can: af_can: export can_sock_destruct()
perf/core: Fix missing static inline on perf_cgroup_switch()
perf/core: Consistently fail fork on allocation failures
perf/aux: Disallow aux_output for kernel events
perf/core: Reattach a misplaced comment
perf/aux: Fix the aux_output group inheritance fix
perf/core: Disallow uncore-cgroup events
sched/pelt: Fix update of blocked PELT ordering
sched/core: Avoid spurious lock dependencies
dpaa2-eth: free already allocated channels on probe defer
Input: cyttsp4_core - fix use after free bug
Input: synaptics-rmi4 - clear IRQ enables for F54
Remove VirtualBox guest shared folders filesystem
net/smc: fix refcount non-blocking connect() -part 2
drm/i915: update rawclk also on resume
x86/quirks: Disable HPET on Intel Coffe Lake platforms
block: check bi_size overflow before merge
gpio: bd70528: Use correct unit for debounce times
gpio: max77620: Fixup debounce delays
KVM: MMU: Do not treat ZONE_DEVICE pages as being reserved
KVM: VMX: Introduce pi_is_pir_empty() helper
KVM: VMX: Do not change PID.NDST when loading a blocked vCPU
KVM: VMX: Consider PID.PIR to determine if vCPU has pending interrupts
KVM: VMX: Fix comment to specify PID.ON instead of PIR.ON
KVM: X86: Fix initialization of MSR lists
xfrm: release device reference for invalid state
io_uring: make timeout sequence == 0 mean no sequence
ntp/y2038: Remove incorrect time_t truncation
mdio_bus: Fix PTR_ERR applied after initialization to constant
NFC: nxp-nci: Fix NULL pointer dereference after I2C communication error
mlxsw: core: Enable devlink reload only on probe
FROMGIT: of: property: Add device link support for iommus, mboxes and io-channels
FROMGIT: of: property: Make it easy to add device links from DT properties
FROMGIT: of: property: Minor style clean up of of_link_to_phandle()
Revert "ANDROID: of/property: Add device link support for iommus"
devlink: Add method for time-stamp on reporter's dump
net: ethernet: dwmac-sun8i: Use the correct function in exit path
Btrfs: fix log context list corruption after rename exchange operation
drm/i915/cmdparser: Fix jump whitelist clearing
iommu/vt-d: Fix QI_DEV_IOTLB_PFSID and QI_DEV_EIOTLB_PFSID macros
MAINTAINERS: Update for INTEL IOMMU (VT-d) entry
KVM: fix placement of refcount initialization
KVM: Fix NULL-ptr deref after kvm_create_vm fails
ALSA: hda: hdmi - fix pin setup on Tigerlake
ALSA: hda: Add Cometlake-S PCI ID
Revert "Revert "sched: Rework pick_next_task() slow-path""
Linux 5.4-rc7
lib: Remove select of inexistant GENERIC_IO
ecryptfs_lookup_interpose(): lower_dentry->d_parent is not stable either
ecryptfs_lookup_interpose(): lower_dentry->d_inode is not stable
ecryptfs: fix unlink and rmdir in face of underlying fs modifications
audit_get_nd(): don't unlock parent too early
exportfs_decode_fh(): negative pinned may become positive without the parent locked
cgroup: don't put ERR_PTR() into fc->root
tcp: remove redundant new line from tcp_event_sk_skb
devlink: disallow reload operation during device cleanup
ALSA: usb-audio: Fix missing error check at mixer resolution test
ixgbe: need_wakeup flag might not be set for Tx
i40e: need_wakeup flag might not be set for Tx
igb/igc: use ktime accessors for skb->tstamp
i40e: Fix for ethtool -m issue on X722 NIC
iavf: initialize ITRN registers with correct values
ice: fix potential infinite loop because loop counter being too small
qede: fix NULL pointer deref in __qede_remove()
net: fix data-race in neigh_event_send()
sched: Fix pick_next_task() vs 'change' pattern race
sched/core: Fix compilation error when cgroup not selected
cgroup,writeback: don't switch wbs immediately on dead wbs if the memcg is dead
vsock/virtio: fix sock refcnt holding during the shutdown
iwlwifi: pcie: don't consider IV len in A-MSDU
net: ethernet: octeon_mgmt: Account for second possible VLAN header
pwm: bcm-iproc: Prevent unloading the driver module while in use
block: drbd: remove a stray unlock in __drbd_send_protocol()
cpufreq: intel_pstate: Fix invalid EPB setting
mac80211: fix station inactive_time shortly after boot
net/fq_impl: Switch to kvmalloc() for memory allocation
mac80211: fix ieee80211_txq_setup_flows() failure path
drm/i915/gvt: fix dropping obj reference twice
ANDROID: Kconfig.gki: Add SND_SOC_COMPRESS
ipv4: Fix table id reference in fib_sync_down_addr
ipv6: fixes rt6_probe() and fib6_nh->last_probe init
net: hns: Fix the stray netpoll locks causing deadlock in NAPI path
Revert "ANDROID: Kconfig.gki: Add SND_SOC_COMPRESS"
net: usb: qmi_wwan: add support for DW5821e with eSIM support
CDC-NCM: handle incomplete transfer of MTU
nfc: netlink: fix double device reference drop
ANDROID: Kconfig.gki: Add SND_SOC_COMPRESS
ceph: return -EINVAL if given fsc mount option on kernel w/o support
staging: Fix error return code in vboxsf_fill_super()
staging: vboxsf: fix dereference of pointer dentry before it is null checked
staging: vboxsf: Remove unused including <linux/version.h>
x86/speculation/taa: Fix printing of TAA_MSG_SMT on IBRS_ALL CPUs
xfrm: Fix memleak on xfrm state destroy
pinctrl: stmfx: fix valid_mask init sequence
NFC: st21nfca: fix double free
net: hns3: add compatible handling for command HCLGE_OPC_PF_RST_DONE
r8169: fix page read in r8168g_mdio_read
net: stmmac: Fix the TX IOC in xmit path
net: stmmac: Fix TSO descriptor with Enhanced Addressing
net: stmmac: Fix the packet count in stmmac_rx()
net: stmmac: xgmac: Disable MMC interrupts by default
net: stmmac: xgmac: Disable Flow Control when 1 or more queues are in AV
net: stmmac: xgmac: Fix AV Feature detection
net: stmmac: xgmac: Fix TSA selection
net: stmmac: xgmac: Only get SPH header len if available
net: stmmac: selftests: Prevent false positives in filter tests
net: stmmac: xgmac: bitrev32 returns u32
net: stmmac: gmac4: bitrev32 returns u32
SMB3: Fix persistent handles reconnect
drm/radeon: fix si_enable_smc_cac() failed issue
drm/amdgpu/renoir: move gfxoff handling into gfx9 module
drm/amdgpu: add warning for GRBM 1-cycle delay issue in gfx9
drm/amdgpu: add dummy read by engines for some GCVM status registers in gfx10
drm/amdgpu: register gpu instance before fan boost feature enablment
drm/amd/swSMU: fix smu workload bit map error
net/smc: fix ethernet interface refcounting
selftests/tls: add test for concurrent recv and send
net/tls: add a TX lock
net/tls: don't pay attention to sk_write_pending when pushing partial records
blkcg: make blkcg_print_stat() print stats only for online blkgs
drm/shmem: Add docbook comments for drm_gem_shmem_object madvise fields
net: mscc: ocelot: fix __ocelot_rmw_ix prototype
bpf, offload: Unlock on error in bpf_offload_dev_create()
net: mscc: ocelot: fix NULL pointer on LAG slave removal
net: mscc: ocelot: don't handle netdev events for other netdevs
net/mlx5e: Use correct enum to determine uplink port
net/mlx5: DR, Fix memory leak during rule creation
net/mlx5: DR, Fix memory leak in modify action destroy
net/mlx5e: Fix eswitch debug print of max fdb flow
HID: wacom: generic: Treat serial number and related fields as unsigned
drm/amdgpu: add navi14 PCI ID
Revert "drm/amd/display: setting the DIG_MODE to the correct value."
drm/amd/display: Add ENGINE_ID_DIGD condition check for Navi14
drm/amdgpu: dont schedule jobs while in reset
drm/amdgpu/arcturus: properly set BANK_SELECT and FRAGMENT_SIZE
arm64: Do not mask out PTE_RDONLY in pte_same()
ANDROID: nf: IDLETIMER: Fix possible use before initialization in idletimer_resume
ANDROID: gki_defconfig: enable FW_LOADER configs
net: bcmgenet: reapply manual settings to the PHY
Revert "net: bcmgenet: soft reset 40nm EPHYs before MAC init"
net: bcmgenet: use RGMII loopback for MAC reset
drm/atomic: fix self-refresh helpers crtc state dereference
RDMA/hns: Correct the value of srq_desc_size
RDMA/hns: Correct the value of HNS_ROCE_HEM_CHUNK_LEN
configfs: calculate the depth of parent item
IB/hfi1: TID RDMA WRITE should not return IB_WC_RNR_RETRY_EXC_ERR
IB/hfi1: Calculate flow weight based on QP MTU for TID RDMA
IB/hfi1: Ensure r_tid_ack is valid before building TID RDMA ACK packet
IB/hfi1: Ensure full Gen3 speed in a Gen4 system
ALSA: timer: Fix incorrectly assigned timer instance
mm: memcontrol: fix network errors from failing __GFP_ATOMIC charges
mm/memory_hotplug: fix updating the node span
scripts/gdb: fix debugging modules compiled with hot/cold partitioning
mm: slab: make page_cgroup_ino() to recognize non-compound slab pages properly
MAINTAINERS: update information for "MEMORY MANAGEMENT"
dump_stack: avoid the livelock of the dump_lock
zswap: add Vitaly to the maintainers list
mm/page_alloc.c: ratelimit allocation failure warnings more aggressively
mm/khugepaged: fix might_sleep() warn with CONFIG_HIGHPTE=y
mm, vmstat: reduce zone->lock holding time by /proc/pagetypeinfo
mm, vmstat: hide /proc/pagetypeinfo from normal users
mm/mmu_notifiers: use the right return code for WARN_ON
ocfs2: protect extent tree in ocfs2_prepare_inode_for_write()
mm: thp: handle page cache THP correctly in PageTransCompoundMap
mm, meminit: recalculate pcpu batch and high limits after init completes
mm/gup_benchmark: fix MAP_HUGETLB case
mm: memcontrol: fix NULL-ptr deref in percpu stats flush
MAINTAINERS: update Cavium ThunderX2 maintainers
ASoC: SOF: topology: Fix bytes control size checks
ARM: dts: stm32: change joystick pinctrl definition on stm32mp157c-ev1
ARM: dts: stm32: remove OV5640 pinctrl definition on stm32mp157c-ev1
ARM: dts: stm32: Fix CAN RAM mapping on stm32mp157c
ARM: dts: stm32: relax qspi pins slew-rate for stm32mp157
scsi: core: Handle drivers which set sg_tablesize to zero
scsi: qla2xxx: fix NPIV tear down process
scsi: sd_zbc: Fix sd_zbc_complete()
Documentation: TLS: Add missing counter description
NFC: fdp: fix incorrect free object
net: prevent load/store tearing on sk->sk_stamp
net: qualcomm: rmnet: Fix potential UAF when unregistering
net/tls: fix sk_msg trim on fallback to copy mode
mlx4_core: fix wrong comment about the reason of subtract one from the max_cqes
net: dsa: bcm_sf2: Fix driver removal
net: sched: prevent duplicate flower rules from tcf_proto destroy race
net: hns3: Use the correct style for SPDX License Identifier
bonding: fix state transition issue in link monitoring
taprio: fix panic while hw offload sched list swap
FROMLIST: overlayfs: override_creds=off option bypass creator_cred
FROMLIST: overlayfs: internal getxattr operations without sepolicy checking
FROMLIST: overlayfs: handle XATTR_NOSECURITY flag for get xattr method
FROMLIST: Add flags option to get xattr method paired to __vfs_getxattr
FROMLIST: afs: xattr: use scnprintf
nvme: change nvme_passthru_cmd64 to explicitly mark rsvd
drm/i915/gen8+: Add RC6 CTX corruption WA
drm/i915: Lower RM timeout to avoid DSI hard hangs
drm/i915/cmdparser: Ignore Length operands during command matching
drm/i915/cmdparser: Add support for backward jumps
drm/i915/cmdparser: Use explicit goto for error paths
drm/i915: Add gen9 BCS cmdparsing
drm/i915: Allow parsing of unsized batches
drm/i915: Support ro ppgtt mapped cmdparser shadow buffers
drm/i915: Add support for mandatory cmdparsing
drm/i915: Remove Master tables from cmdparser
drm/i915: Disable Secure Batches for gen6+
drm/i915: Rename gen7 cmdparser tables
ALSA: hda: hdmi - add Tigerlake support
ASoC: max98373: replace gpio_request with devm_gpio_request
ASoC: stm32: sai: add restriction on mmap support
watchdog: bd70528: Add MODULE_ALIAS to allow module auto loading
watchdog: imx_sc_wdt: Pretimeout should follow SCU firmware format
watchdog: meson: Fix the wrong value of left time
watchdog: pm8916_wdt: fix pretimeout registration flow
watchdog: cpwd: fix build regression
nvme-multipath: fix crash in nvme_mpath_clear_ctrl_paths
nvme-rdma: fix a segmentation fault during module unload
clone3: validate stack arguments
ceph: don't allow copy_file_range when stripe_count != 1
ceph: don't try to handle hashed dentries in non-O_CREAT atomic_open
ALSA: hda/ca0132 - Fix possible workqueue stall
scripts/nsdeps: make sure to pass all module source files to spatch
perf tools: Fix time sorting
can: don't use deprecated license identifiers
can: mcp251x: mcp251x_restart_work_handler(): Fix potential force_quit race condition
perf tools: Remove unused trace_find_next_event()
perf scripting engines: Iterate on tep event arrays directly
FROMGIT: of: property: Skip adding device links to suppliers that aren't devices
x86/tsc: Respect tsc command line paraemeter for clocksource_tsc_early
Input: synaptics-rmi4 - remove unused result_bits mask
Input: synaptics-rmi4 - do not consume more data than we have (F11, F12)
Input: synaptics-rmi4 - disable the relative position IRQ in the F12 driver
Input: synaptics-rmi4 - fix video buffer size
x86/dumpstack/64: Don't evaluate exception stacks before setup
irq/irqdomain: Update __irq_domain_alloc_fwnode() function documentation
x86/apic/32: Avoid bogus LDR warnings
timekeeping/vsyscall: Update VDSO data unconditionally
drm/i915/dp: Do not switch aux to TBT mode for non-TC ports
drm/i915: Avoid HPD poll detect triggering a new detect cycle
can: j1939: transport: j1939_xtp_rx_eoma_one(): Add sanity check for correct total message size
can: j1939: transport: j1939_session_fresh_new(): make sure EOMA is send with the total message size set
can: j1939: fix memory leak if filters was set
can: j1939: fix resource leak of skb on error return paths
can: ti_hecc: add missing state changes
can: ti_hecc: properly report state changes
can: ti_hecc: add fifo overflow error reporting
can: ti_hecc: release the mailbox a bit earlier
can: ti_hecc: keep MIM and MD set
can: ti_hecc: ti_hecc_stop(): stop the CPK on down
can: ti_hecc: ti_hecc_error(): increase error counters if skb enqueueing via can_rx_offload_queue_sorted() fails
can: flexcan: increase error counters if skb enqueueing via can_rx_offload_queue_sorted() fails
can: rx-offload: can_rx_offload_irq_offload_fifo(): continue on error
can: rx-offload: can_rx_offload_irq_offload_timestamp(): continue on error
can: rx-offload: can_rx_offload_offload_one(): use ERR_PTR() to propagate error value in case of errors
can: rx-offload: can_rx_offload_offload_one(): increment rx_fifo_errors on queue overflow or OOM
can: rx-offload: can_rx_offload_offload_one(): do not increase the skb_queue beyond skb_queue_len_max
can: rx-offload: can_rx_offload_queue_tail(): fix error handling, avoid skb mem leak
can: rx-offload: can_rx_offload_queue_sorted(): fix error handling, avoid skb mem leak
can: xilinx_can: Fix flags field initialization for axi can
can: c_can: C_CAN: add bus recovery events
can: c_can: D_CAN: c_can_chip_config(): perform a sofware reset on open
can: c_can: c_can_poll(): only read status register after status IRQ
can: peak_usb: report bus recovery as well
can: peak_usb: fix slab info leak
can: peak_usb: fix a potential out-of-sync while decoding packets
can: flexcan: disable completely the ECC mechanism
can: usb_8dev: fix use-after-free on disconnect
can: mcba_usb: fix use-after-free on disconnect
can: gs_usb: gs_can_open(): prevent memory leak
can: dev: add missing of_node_put() after calling of_get_child_by_name()
btrfs: un-deprecate ioctls START_SYNC and WAIT_SYNC
btrfs: save i_size to avoid double evaluation of i_size_read in compress_file_range
stacktrace: Don't skip first entry on noncurrent tasks
netfilter: nf_tables_offload: skip EBUSY on chain update
netfilter: nf_tables: bogus EOPNOTSUPP on basechain update
bridge: ebtables: don't crash when using dnat target in output chains
netfilter: nf_tables: fix unexpected EOPNOTSUPP error
netfilter: nf_tables: Align nft_expr private data to 64-bit
netfilter: ipset: Fix nla_policies to fully support NL_VALIDATE_STRICT
netfilter: ipset: Copy the right MAC address in hash:ip,mac IPv6 sets
netfilter: ipset: Fix an error code in ip_set_sockfn_get()
dccp: do not leak jiffies on the wire
net: fec: add missed clk_disable_unprepare in remove
Documentation: Add ITLB_MULTIHIT documentation
kvm: x86: mmu: Recovery of shattered NX large pages
MAINTAINERS: Remove Kevin as maintainer of BMIPS generic platforms
clk: ti: clkctrl: Fix failed to enable error with double udelay timeout
clk: ti: dra7-atl-clock: Remove ti_clk_add_alias call
netfilter: nf_tables_offload: check for register data length mismatches
intel_th: pci: Add Jasper Lake PCH support
intel_th: pci: Add Comet Lake PCH support
intel_th: msu: Fix possible memory leak in mode_store()
intel_th: msu: Fix overflow in shift of an unsigned int
intel_th: msu: Fix missing allocation failure check on a kstrndup
intel_th: msu: Fix an uninitialized mutex
intel_th: gth: Fix the window switching sequence
ASoC: hdac_hda: fix race in device removal
kvm: Add helper function for creating VM worker threads
kvm: mmu: ITLB_MULTIHIT mitigation
cpu/speculation: Uninline and export CPU mitigations helpers
x86/cpu: Add Tremont to the cpu vulnerability whitelist
x86/bugs: Add ITLB_MULTIHIT bug infrastructure
fbdev: c2p: Fix link failure on non-inlining
ALSA: bebob: fix to detect configured source of sampling clock for Focusrite Saffire Pro i/o series
arm64: dts: zii-ultra: fix ARM regulator GPIO handle
Revert "gpio: merrifield: Pass irqchip when adding gpiochip"
Revert "gpio: merrifield: Restore use of irq_base"
Revert "gpio: merrifield: Move hardware initialization to callback"
x86/resctrl: Prevent NULL pointer dereference when reading mondata
idr: Fix idr_alloc_u32 on 32-bit systems
idr: Fix integer overflow in idr_for_each_entry
HID: i2c-hid: Send power-on command after reset
radix tree: Remove radix_tree_iter_find
idr: Fix idr_get_next_ul race with idr_remove
powerpc/bpf: Fix tail call implementation
MIPS: SGI-IP27: fix exception handler replication
bpf: Change size to u64 for bpf_map_{area_alloc, charge_init}()
samples/bpf: fix build by setting HAVE_ATTR_TEST to zero
perf tools: Make usage of test_attr__* optional for perf-sys.h
bpf: Allow narrow loads of bpf_sysctl fields with offset > 0
staging: Add VirtualBox guest shared folder (vboxsf) support
ceph: add missing check in d_revalidate snapdir handling
ceph: fix RCU case handling in ceph_d_revalidate()
ceph: fix use-after-free in __ceph_remove_cap()
bpf, doc: Add Andrii as official reviewer to BPF subsystem
ARM: sunxi: Fix CPU powerdown on A83T
ARM: dts: sun8i-a83t-tbs-a711: Fix WiFi resume from suspend
clk: sunxi-ng: a80: fix the zero'ing of bits 16 and 18
clk: sunxi: Fix operator precedence in sunxi_divs_clk_setup
clk: ast2600: Fix enabling of clocks
clk: at91: avoid sleeping early
ASoC: rockchip: rockchip_max98090: Enable SHDN to fix headset detection
ASoC: ti: sdma-pcm: Add back the flags parameter for non standard dma names
ASoC: SOF: ipc: Fix memory leak in sof_set_get_large_ctrl_data
ASoC: SOF: Fix memory leak in sof_dfsentry_write
ASoC: SOF: Intel: hda-stream: fix the CONFIG_ prefix missing
arm64: dts: imx8mn: fix compatible string for sdma
arm64: dts: imx8mm: fix compatible string for sdma
reset: fix reset_control_ops kerneldoc comment
clk: imx8m: Use SYS_PLL1_800M as intermediate parent of CLK_ARM
x86/tsx: Add config options to set tsx=on|off|auto
x86/speculation/taa: Add documentation for TSX Async Abort
x86/tsx: Add "auto" option to the tsx= cmdline parameter
kvm/x86: Export MDS_NO=0 to guests when TSX is enabled
x86/speculation/taa: Add sysfs reporting for TSX Async Abort
x86/speculation/taa: Add mitigation for TSX Async Abort
x86/cpu: Add a "tsx=" cmdline option with TSX disabled by default
x86/cpu: Add a helper function x86_read_arch_cap_msr()
x86/msr: Add the IA32_TSX_CTRL MSR
ARM: dts: imx6-logicpd: Re-enable SNVS power key
iio: adc: stm32-adc: fix stopping dma
soc: imx: gpc: fix initialiser format
ARM: dts: imx6qdl-sabreauto: Fix storm of accelerometer interrupts
Btrfs: fix race leading to metadata space leak after task received signal
btrfs: tree-checker: Fix wrong check on max devid
btrfs: Consider system chunk array size for new SYSTEM chunks
pinctrl: cherryview: Allocate IRQ chip dynamic
clk: samsung: exynos5420: Preserve PLL configuration during suspend/resume
arm64: dts: ls1028a: fix a compatible issue
autofs: fix a leak in autofs_expire_indirect()
soundwire: slave: fix scanf format
reset: fix reset_control_get_exclusive kerneldoc comment
reset: fix reset_control_lookup kerneldoc comment
reset: fix of_reset_control_get_count kerneldoc comment
reset: fix of_reset_simple_xlate kerneldoc comment
ASoC: kirkwood: fix device remove ordering
ASoC: rsnd: dma: fix SSI9 4/5/6/7 busif dma address
ASoC: hdmi-codec: drop mutex locking again
ASoC: kirkwood: fix external clock probe defer
clk: samsung: exynos542x: Move G3D subsystem clocks to its sub-CMU
clk: samsung: exynos5433: Fix error paths
tools: gpio: Use !building_out_of_srctree to determine srctree
iio: imu: inv_mpu6050: fix no data on MPU6050
reset: Fix memory leak in reset_control_array_put()
aio: Fix io_pgetevents() struct __compat_aio_sigset layout
pinctrl: cherryview: Fix irq_valid_mask calculation
ASoC: compress: fix unsigned integer overflow check
ASoC: msm8916-wcd-analog: Fix RX1 selection in RDAC2 MUX
pinctrl: intel: Avoid potential glitches if pin is in GPIO mode
soundwire: intel: fix intel_register_dai PDI offsets and numbers
interconnect: Add locking in icc_set_tag()
interconnect: qcom: Fix icc_onecell_data allocation
clocksource/drivers/sh_mtu2: Do not loop using platform_get_irq_by_name()
fs/namespace.c: fix use-after-free of mount in mnt_warn_timestamp_expiry()
clocksource/drivers/mediatek: Fix error handling
soundwire: depend on ACPI || OF
soundwire: depend on ACPI
iio: srf04: fix wrong limitation in distance measuring
iio: imu: adis16480: make sure provided frequency is positive
cgroup: freezer: call cgroup_enter_frozen() with preemption disabled in ptrace_stop()
thunderbolt: Drop unnecessary read when writing LC command in Ice Lake
thunderbolt: Fix lockdep circular locking depedency warning
thunderbolt: Read DP IN adapter first two dwords in one go
clk: at91: sam9x60: fix programmable clock
clk: meson: g12a: set CLK_MUX_ROUND_CLOSEST on the cpu clock muxes
clk: meson: g12a: fix cpu clock rate setting
clk: meson: gxbb: let sar_adc_clk_div set the parent clock rate
XArray: Fix xas_next() with a single entry at 0
Change-Id: I594a629aca56b3ff5a224d65f0d8d79fe4f4f34b
Signed-off-by: Raghavendra Rao Ananta <rananta@codeaurora.org>
This commit is contained in:
commit
43dee37fa9
668 changed files with 115929 additions and 108192 deletions
|
|
@ -351,12 +351,12 @@ static int audit_get_nd(struct audit_watch *watch, struct path *parent)
|
|||
struct dentry *d = kern_path_locked(watch->path, parent);
|
||||
if (IS_ERR(d))
|
||||
return PTR_ERR(d);
|
||||
inode_unlock(d_backing_inode(parent->dentry));
|
||||
if (d_is_positive(d)) {
|
||||
/* update watch filter fields */
|
||||
watch->dev = d->d_sb->s_dev;
|
||||
watch->ino = d_backing_inode(d)->i_ino;
|
||||
}
|
||||
inode_unlock(d_backing_inode(parent->dentry));
|
||||
dput(d);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1311,12 +1311,12 @@ static bool sysctl_is_valid_access(int off, int size, enum bpf_access_type type,
|
|||
return false;
|
||||
|
||||
switch (off) {
|
||||
case offsetof(struct bpf_sysctl, write):
|
||||
case bpf_ctx_range(struct bpf_sysctl, write):
|
||||
if (type != BPF_READ)
|
||||
return false;
|
||||
bpf_ctx_record_field_size(info, size_default);
|
||||
return bpf_ctx_narrow_access_ok(off, size, size_default);
|
||||
case offsetof(struct bpf_sysctl, file_pos):
|
||||
case bpf_ctx_range(struct bpf_sysctl, file_pos):
|
||||
if (type == BPF_READ) {
|
||||
bpf_ctx_record_field_size(info, size_default);
|
||||
return bpf_ctx_narrow_access_ok(off, size, size_default);
|
||||
|
|
|
|||
|
|
@ -678,8 +678,10 @@ bpf_offload_dev_create(const struct bpf_prog_offload_ops *ops, void *priv)
|
|||
down_write(&bpf_devs_lock);
|
||||
if (!offdevs_inited) {
|
||||
err = rhashtable_init(&offdevs, &offdevs_params);
|
||||
if (err)
|
||||
if (err) {
|
||||
up_write(&bpf_devs_lock);
|
||||
return ERR_PTR(err);
|
||||
}
|
||||
offdevs_inited = true;
|
||||
}
|
||||
up_write(&bpf_devs_lock);
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ static struct bpf_map *find_and_alloc_map(union bpf_attr *attr)
|
|||
return map;
|
||||
}
|
||||
|
||||
void *bpf_map_area_alloc(size_t size, int numa_node)
|
||||
void *bpf_map_area_alloc(u64 size, int numa_node)
|
||||
{
|
||||
/* We really just want to fail instead of triggering OOM killer
|
||||
* under memory pressure, therefore we set __GFP_NORETRY to kmalloc,
|
||||
|
|
@ -141,6 +141,9 @@ void *bpf_map_area_alloc(size_t size, int numa_node)
|
|||
const gfp_t flags = __GFP_NOWARN | __GFP_ZERO;
|
||||
void *area;
|
||||
|
||||
if (size >= SIZE_MAX)
|
||||
return NULL;
|
||||
|
||||
if (size <= (PAGE_SIZE << PAGE_ALLOC_COSTLY_ORDER)) {
|
||||
area = kmalloc_node(size, GFP_USER | __GFP_NORETRY | flags,
|
||||
numa_node);
|
||||
|
|
@ -197,7 +200,7 @@ static void bpf_uncharge_memlock(struct user_struct *user, u32 pages)
|
|||
atomic_long_sub(pages, &user->locked_vm);
|
||||
}
|
||||
|
||||
int bpf_map_charge_init(struct bpf_map_memory *mem, size_t size)
|
||||
int bpf_map_charge_init(struct bpf_map_memory *mem, u64 size)
|
||||
{
|
||||
u32 pages = round_up(size, PAGE_SIZE) >> PAGE_SHIFT;
|
||||
struct user_struct *user;
|
||||
|
|
|
|||
|
|
@ -2119,11 +2119,12 @@ int cgroup_do_get_tree(struct fs_context *fc)
|
|||
|
||||
nsdentry = kernfs_node_dentry(cgrp->kn, sb);
|
||||
dput(fc->root);
|
||||
fc->root = nsdentry;
|
||||
if (IS_ERR(nsdentry)) {
|
||||
ret = PTR_ERR(nsdentry);
|
||||
deactivate_locked_super(sb);
|
||||
ret = PTR_ERR(nsdentry);
|
||||
nsdentry = NULL;
|
||||
}
|
||||
fc->root = nsdentry;
|
||||
}
|
||||
|
||||
if (!ctx->kfc.new_sb_created)
|
||||
|
|
|
|||
27
kernel/cpu.c
27
kernel/cpu.c
|
|
@ -2430,7 +2430,18 @@ void __init boot_cpu_hotplug_init(void)
|
|||
this_cpu_write(cpuhp_state.state, CPUHP_ONLINE);
|
||||
}
|
||||
|
||||
enum cpu_mitigations cpu_mitigations __ro_after_init = CPU_MITIGATIONS_AUTO;
|
||||
/*
|
||||
* These are used for a global "mitigations=" cmdline option for toggling
|
||||
* optional CPU mitigations.
|
||||
*/
|
||||
enum cpu_mitigations {
|
||||
CPU_MITIGATIONS_OFF,
|
||||
CPU_MITIGATIONS_AUTO,
|
||||
CPU_MITIGATIONS_AUTO_NOSMT,
|
||||
};
|
||||
|
||||
static enum cpu_mitigations cpu_mitigations __ro_after_init =
|
||||
CPU_MITIGATIONS_AUTO;
|
||||
|
||||
static int __init mitigations_parse_cmdline(char *arg)
|
||||
{
|
||||
|
|
@ -2447,3 +2458,17 @@ static int __init mitigations_parse_cmdline(char *arg)
|
|||
return 0;
|
||||
}
|
||||
early_param("mitigations", mitigations_parse_cmdline);
|
||||
|
||||
/* mitigations=off */
|
||||
bool cpu_mitigations_off(void)
|
||||
{
|
||||
return cpu_mitigations == CPU_MITIGATIONS_OFF;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(cpu_mitigations_off);
|
||||
|
||||
/* mitigations=auto,nosmt */
|
||||
bool cpu_mitigations_auto_nosmt(void)
|
||||
{
|
||||
return cpu_mitigations == CPU_MITIGATIONS_AUTO_NOSMT;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(cpu_mitigations_auto_nosmt);
|
||||
|
|
|
|||
|
|
@ -1036,7 +1036,7 @@ perf_cgroup_set_timestamp(struct task_struct *task,
|
|||
{
|
||||
}
|
||||
|
||||
void
|
||||
static inline void
|
||||
perf_cgroup_switch(struct task_struct *task, struct task_struct *next)
|
||||
{
|
||||
}
|
||||
|
|
@ -10540,6 +10540,15 @@ perf_event_alloc(struct perf_event_attr *attr, int cpu,
|
|||
goto err_ns;
|
||||
}
|
||||
|
||||
/*
|
||||
* Disallow uncore-cgroup events, they don't make sense as the cgroup will
|
||||
* be different on other CPUs in the uncore mask.
|
||||
*/
|
||||
if (pmu->task_ctx_nr == perf_invalid_context && cgroup_fd != -1) {
|
||||
err = -EINVAL;
|
||||
goto err_pmu;
|
||||
}
|
||||
|
||||
if (event->attr.aux_output &&
|
||||
!(pmu->capabilities & PERF_PMU_CAP_AUX_OUTPUT)) {
|
||||
err = -EOPNOTSUPP;
|
||||
|
|
@ -11331,8 +11340,11 @@ perf_event_create_kernel_counter(struct perf_event_attr *attr, int cpu,
|
|||
int err;
|
||||
|
||||
/*
|
||||
* Get the target context (task or percpu):
|
||||
* Grouping is not supported for kernel events, neither is 'AUX',
|
||||
* make sure the caller's intentions are adjusted.
|
||||
*/
|
||||
if (attr->aux_output)
|
||||
return ERR_PTR(-EINVAL);
|
||||
|
||||
event = perf_event_alloc(attr, cpu, task, NULL, NULL,
|
||||
overflow_handler, context, -1);
|
||||
|
|
@ -11344,6 +11356,9 @@ perf_event_create_kernel_counter(struct perf_event_attr *attr, int cpu,
|
|||
/* Mark owner so we could distinguish it from user events. */
|
||||
event->owner = TASK_TOMBSTONE;
|
||||
|
||||
/*
|
||||
* Get the target context (task or percpu):
|
||||
*/
|
||||
ctx = find_get_context(event->pmu, task, event);
|
||||
if (IS_ERR(ctx)) {
|
||||
err = PTR_ERR(ctx);
|
||||
|
|
@ -11795,7 +11810,7 @@ inherit_event(struct perf_event *parent_event,
|
|||
GFP_KERNEL);
|
||||
if (!child_ctx->task_ctx_data) {
|
||||
free_event(child_event);
|
||||
return NULL;
|
||||
return ERR_PTR(-ENOMEM);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -11898,7 +11913,7 @@ static int inherit_group(struct perf_event *parent_event,
|
|||
if (IS_ERR(child_ctr))
|
||||
return PTR_ERR(child_ctr);
|
||||
|
||||
if (sub->aux_event == parent_event &&
|
||||
if (sub->aux_event == parent_event && child_ctr &&
|
||||
!perf_get_aux_event(child_ctr, leader))
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1711,11 +1711,11 @@ static void pidfd_show_fdinfo(struct seq_file *m, struct file *f)
|
|||
/*
|
||||
* Poll support for process exit notification.
|
||||
*/
|
||||
static unsigned int pidfd_poll(struct file *file, struct poll_table_struct *pts)
|
||||
static __poll_t pidfd_poll(struct file *file, struct poll_table_struct *pts)
|
||||
{
|
||||
struct task_struct *task;
|
||||
struct pid *pid = file->private_data;
|
||||
int poll_flags = 0;
|
||||
__poll_t poll_flags = 0;
|
||||
|
||||
poll_wait(file, &pid->wait_pidfd, pts);
|
||||
|
||||
|
|
@ -1727,7 +1727,7 @@ static unsigned int pidfd_poll(struct file *file, struct poll_table_struct *pts)
|
|||
* group, then poll(2) should block, similar to the wait(2) family.
|
||||
*/
|
||||
if (!task || (task->exit_state && thread_group_empty(task)))
|
||||
poll_flags = POLLIN | POLLRDNORM;
|
||||
poll_flags = EPOLLIN | EPOLLRDNORM;
|
||||
rcu_read_unlock();
|
||||
|
||||
return poll_flags;
|
||||
|
|
@ -2568,7 +2568,35 @@ noinline static int copy_clone_args_from_user(struct kernel_clone_args *kargs,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static bool clone3_args_valid(const struct kernel_clone_args *kargs)
|
||||
/**
|
||||
* clone3_stack_valid - check and prepare stack
|
||||
* @kargs: kernel clone args
|
||||
*
|
||||
* Verify that the stack arguments userspace gave us are sane.
|
||||
* In addition, set the stack direction for userspace since it's easy for us to
|
||||
* determine.
|
||||
*/
|
||||
static inline bool clone3_stack_valid(struct kernel_clone_args *kargs)
|
||||
{
|
||||
if (kargs->stack == 0) {
|
||||
if (kargs->stack_size > 0)
|
||||
return false;
|
||||
} else {
|
||||
if (kargs->stack_size == 0)
|
||||
return false;
|
||||
|
||||
if (!access_ok((void __user *)kargs->stack, kargs->stack_size))
|
||||
return false;
|
||||
|
||||
#if !defined(CONFIG_STACK_GROWSUP) && !defined(CONFIG_IA64)
|
||||
kargs->stack += kargs->stack_size;
|
||||
#endif
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool clone3_args_valid(struct kernel_clone_args *kargs)
|
||||
{
|
||||
/*
|
||||
* All lower bits of the flag word are taken.
|
||||
|
|
@ -2588,6 +2616,9 @@ static bool clone3_args_valid(const struct kernel_clone_args *kargs)
|
|||
kargs->exit_signal)
|
||||
return false;
|
||||
|
||||
if (!clone3_stack_valid(kargs))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ EXPORT_SYMBOL_GPL(irqchip_fwnode_ops);
|
|||
* @type: Type of irqchip_fwnode. See linux/irqdomain.h
|
||||
* @name: Optional user provided domain name
|
||||
* @id: Optional user provided id if name != NULL
|
||||
* @data: Optional user-provided data
|
||||
* @pa: Optional user-provided physical address
|
||||
*
|
||||
* Allocate a struct irqchip_fwid, and return a poiner to the embedded
|
||||
* fwnode_handle (or NULL on failure).
|
||||
|
|
|
|||
|
|
@ -545,12 +545,20 @@ static const char *kernel_symbol_name(const struct kernel_symbol *sym)
|
|||
#endif
|
||||
}
|
||||
|
||||
static int cmp_name(const void *va, const void *vb)
|
||||
static const char *kernel_symbol_namespace(const struct kernel_symbol *sym)
|
||||
{
|
||||
const char *a;
|
||||
const struct kernel_symbol *b;
|
||||
a = va; b = vb;
|
||||
return strcmp(a, kernel_symbol_name(b));
|
||||
#ifdef CONFIG_HAVE_ARCH_PREL32_RELOCATIONS
|
||||
if (!sym->namespace_offset)
|
||||
return NULL;
|
||||
return offset_to_ptr(&sym->namespace_offset);
|
||||
#else
|
||||
return sym->namespace;
|
||||
#endif
|
||||
}
|
||||
|
||||
static int cmp_name(const void *name, const void *sym)
|
||||
{
|
||||
return strcmp(name, kernel_symbol_name(sym));
|
||||
}
|
||||
|
||||
static bool find_exported_symbol_in_section(const struct symsearch *syms,
|
||||
|
|
@ -1380,6 +1388,41 @@ static inline int same_magic(const char *amagic, const char *bmagic,
|
|||
}
|
||||
#endif /* CONFIG_MODVERSIONS */
|
||||
|
||||
static char *get_modinfo(const struct load_info *info, const char *tag);
|
||||
static char *get_next_modinfo(const struct load_info *info, const char *tag,
|
||||
char *prev);
|
||||
|
||||
static int verify_namespace_is_imported(const struct load_info *info,
|
||||
const struct kernel_symbol *sym,
|
||||
struct module *mod)
|
||||
{
|
||||
const char *namespace;
|
||||
char *imported_namespace;
|
||||
|
||||
namespace = kernel_symbol_namespace(sym);
|
||||
if (namespace) {
|
||||
imported_namespace = get_modinfo(info, "import_ns");
|
||||
while (imported_namespace) {
|
||||
if (strcmp(namespace, imported_namespace) == 0)
|
||||
return 0;
|
||||
imported_namespace = get_next_modinfo(
|
||||
info, "import_ns", imported_namespace);
|
||||
}
|
||||
#ifdef CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS
|
||||
pr_warn(
|
||||
#else
|
||||
pr_err(
|
||||
#endif
|
||||
"%s: module uses symbol (%s) from namespace %s, but does not import it.\n",
|
||||
mod->name, kernel_symbol_name(sym), namespace);
|
||||
#ifndef CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS
|
||||
return -EINVAL;
|
||||
#endif
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* Resolve a symbol for this module. I.e. if we find one, record usage. */
|
||||
static const struct kernel_symbol *resolve_symbol(struct module *mod,
|
||||
const struct load_info *info,
|
||||
|
|
@ -1408,6 +1451,12 @@ static const struct kernel_symbol *resolve_symbol(struct module *mod,
|
|||
goto getname;
|
||||
}
|
||||
|
||||
err = verify_namespace_is_imported(info, sym, mod);
|
||||
if (err) {
|
||||
sym = ERR_PTR(err);
|
||||
goto getname;
|
||||
}
|
||||
|
||||
err = ref_module(mod, owner);
|
||||
if (err) {
|
||||
sym = ERR_PTR(err);
|
||||
|
|
@ -2482,7 +2531,8 @@ static char *next_string(char *string, unsigned long *secsize)
|
|||
return string;
|
||||
}
|
||||
|
||||
static char *get_modinfo(struct load_info *info, const char *tag)
|
||||
static char *get_next_modinfo(const struct load_info *info, const char *tag,
|
||||
char *prev)
|
||||
{
|
||||
char *p;
|
||||
unsigned int taglen = strlen(tag);
|
||||
|
|
@ -2493,13 +2543,25 @@ static char *get_modinfo(struct load_info *info, const char *tag)
|
|||
* get_modinfo() calls made before rewrite_section_headers()
|
||||
* must use sh_offset, as sh_addr isn't set!
|
||||
*/
|
||||
for (p = (char *)info->hdr + infosec->sh_offset; p; p = next_string(p, &size)) {
|
||||
char *modinfo = (char *)info->hdr + infosec->sh_offset;
|
||||
|
||||
if (prev) {
|
||||
size -= prev - modinfo;
|
||||
modinfo = next_string(prev, &size);
|
||||
}
|
||||
|
||||
for (p = modinfo; p; p = next_string(p, &size)) {
|
||||
if (strncmp(p, tag, taglen) == 0 && p[taglen] == '=')
|
||||
return p + taglen + 1;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static char *get_modinfo(const struct load_info *info, const char *tag)
|
||||
{
|
||||
return get_next_modinfo(info, tag, NULL);
|
||||
}
|
||||
|
||||
static void setup_modinfo(struct module *mod, struct load_info *info)
|
||||
{
|
||||
struct module_attribute *attr;
|
||||
|
|
|
|||
|
|
@ -814,6 +814,8 @@ EXPORT_SYMBOL_GPL(freq_qos_update_request);
|
|||
*/
|
||||
int freq_qos_remove_request(struct freq_qos_request *req)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (!req)
|
||||
return -EINVAL;
|
||||
|
||||
|
|
@ -821,7 +823,11 @@ int freq_qos_remove_request(struct freq_qos_request *req)
|
|||
"%s() called for unknown object\n", __func__))
|
||||
return -EINVAL;
|
||||
|
||||
return freq_qos_apply(req, PM_QOS_REMOVE_REQ, PM_QOS_DEFAULT_VALUE);
|
||||
ret = freq_qos_apply(req, PM_QOS_REMOVE_REQ, PM_QOS_DEFAULT_VALUE);
|
||||
req->qos = NULL;
|
||||
req->type = 0;
|
||||
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(freq_qos_remove_request);
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,9 @@ EXPORT_SYMBOL(cad_pid);
|
|||
#define DEFAULT_REBOOT_MODE
|
||||
#endif
|
||||
enum reboot_mode reboot_mode DEFAULT_REBOOT_MODE;
|
||||
EXPORT_SYMBOL_GPL(reboot_mode);
|
||||
enum reboot_mode panic_reboot_mode = REBOOT_UNDEFINED;
|
||||
EXPORT_SYMBOL_GPL(panic_reboot_mode);
|
||||
|
||||
/*
|
||||
* This variable is used privately to keep track of whether or not
|
||||
|
|
|
|||
|
|
@ -1065,7 +1065,7 @@ uclamp_update_active(struct task_struct *p, enum uclamp_id clamp_id)
|
|||
* affecting a valid clamp bucket, the next time it's enqueued,
|
||||
* it will already see the updated clamp bucket value.
|
||||
*/
|
||||
if (!p->uclamp[clamp_id].active) {
|
||||
if (p->uclamp[clamp_id].active) {
|
||||
uclamp_rq_dec_id(rq, p, clamp_id);
|
||||
uclamp_rq_inc_id(rq, p, clamp_id);
|
||||
}
|
||||
|
|
@ -1073,6 +1073,7 @@ uclamp_update_active(struct task_struct *p, enum uclamp_id clamp_id)
|
|||
task_rq_unlock(rq, p, &rf);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_UCLAMP_TASK_GROUP
|
||||
static inline void
|
||||
uclamp_update_active_tasks(struct cgroup_subsys_state *css,
|
||||
unsigned int clamps)
|
||||
|
|
@ -1091,7 +1092,6 @@ uclamp_update_active_tasks(struct cgroup_subsys_state *css,
|
|||
css_task_iter_end(&it);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_UCLAMP_TASK_GROUP
|
||||
static void cpu_util_update_eff(struct cgroup_subsys_state *css);
|
||||
static void uclamp_update_root_tg(void)
|
||||
{
|
||||
|
|
@ -3919,7 +3919,7 @@ pick_next_task(struct rq *rq, struct task_struct *prev, struct rq_flags *rf)
|
|||
|
||||
p = fair_sched_class.pick_next_task(rq, prev, rf);
|
||||
if (unlikely(p == RETRY_TASK))
|
||||
goto again;
|
||||
goto restart;
|
||||
|
||||
/* Assumes fair_sched_class->next == idle_sched_class */
|
||||
if (unlikely(!p))
|
||||
|
|
@ -3928,14 +3928,28 @@ pick_next_task(struct rq *rq, struct task_struct *prev, struct rq_flags *rf)
|
|||
return p;
|
||||
}
|
||||
|
||||
again:
|
||||
restart:
|
||||
#ifdef CONFIG_SMP
|
||||
/*
|
||||
* We must do the balancing pass before put_next_task(), such
|
||||
* that when we release the rq->lock the task is in the same
|
||||
* state as before we took rq->lock.
|
||||
*
|
||||
* We can terminate the balance pass as soon as we know there is
|
||||
* a runnable task of @class priority or higher.
|
||||
*/
|
||||
for_class_range(class, prev->sched_class, &idle_sched_class) {
|
||||
if (class->balance(rq, prev, rf))
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
put_prev_task(rq, prev);
|
||||
|
||||
for_each_class(class) {
|
||||
p = class->pick_next_task(rq, prev, rf);
|
||||
if (p) {
|
||||
if (unlikely(p == RETRY_TASK))
|
||||
goto again;
|
||||
p = class->pick_next_task(rq, NULL, NULL);
|
||||
if (p)
|
||||
return p;
|
||||
}
|
||||
}
|
||||
|
||||
/* The idle class should always have a runnable task: */
|
||||
|
|
@ -6005,10 +6019,11 @@ void init_idle(struct task_struct *idle, int cpu)
|
|||
struct rq *rq = cpu_rq(cpu);
|
||||
unsigned long flags;
|
||||
|
||||
__sched_fork(0, idle);
|
||||
|
||||
raw_spin_lock_irqsave(&idle->pi_lock, flags);
|
||||
raw_spin_lock(&rq->lock);
|
||||
|
||||
__sched_fork(0, idle);
|
||||
idle->state = TASK_RUNNING;
|
||||
idle->se.exec_start = sched_clock();
|
||||
idle->flags |= PF_IDLE;
|
||||
|
|
@ -6196,7 +6211,7 @@ static struct task_struct *__pick_migrate_task(struct rq *rq)
|
|||
for_each_class(class) {
|
||||
next = class->pick_next_task(rq, NULL, NULL);
|
||||
if (next) {
|
||||
next->sched_class->put_prev_task(rq, next, NULL);
|
||||
next->sched_class->put_prev_task(rq, next);
|
||||
return next;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1691,6 +1691,22 @@ static void check_preempt_equal_dl(struct rq *rq, struct task_struct *p)
|
|||
resched_curr(rq);
|
||||
}
|
||||
|
||||
static int balance_dl(struct rq *rq, struct task_struct *p, struct rq_flags *rf)
|
||||
{
|
||||
if (!on_dl_rq(&p->dl) && need_pull_dl_task(rq, p)) {
|
||||
/*
|
||||
* This is OK, because current is on_cpu, which avoids it being
|
||||
* picked for load-balance and preemption/IRQs are still
|
||||
* disabled avoiding further scheduler activity on it and we've
|
||||
* not yet started the picking loop.
|
||||
*/
|
||||
rq_unpin_lock(rq, rf);
|
||||
pull_dl_task(rq);
|
||||
rq_repin_lock(rq, rf);
|
||||
}
|
||||
|
||||
return sched_stop_runnable(rq) || sched_dl_runnable(rq);
|
||||
}
|
||||
#endif /* CONFIG_SMP */
|
||||
|
||||
/*
|
||||
|
|
@ -1758,71 +1774,28 @@ static struct task_struct *
|
|||
pick_next_task_dl(struct rq *rq, struct task_struct *prev, struct rq_flags *rf)
|
||||
{
|
||||
struct sched_dl_entity *dl_se;
|
||||
struct dl_rq *dl_rq = &rq->dl;
|
||||
struct task_struct *p;
|
||||
struct dl_rq *dl_rq;
|
||||
|
||||
dl_rq = &rq->dl;
|
||||
WARN_ON_ONCE(prev || rf);
|
||||
|
||||
if (need_pull_dl_task(rq, prev)) {
|
||||
/*
|
||||
* This is OK, because current is on_cpu, which avoids it being
|
||||
* picked for load-balance and preemption/IRQs are still
|
||||
* disabled avoiding further scheduler activity on it and we're
|
||||
* being very careful to re-start the picking loop.
|
||||
*/
|
||||
rq_unpin_lock(rq, rf);
|
||||
pull_dl_task(rq);
|
||||
rq_repin_lock(rq, rf);
|
||||
/*
|
||||
* pull_dl_task() can drop (and re-acquire) rq->lock; this
|
||||
* means a stop task can slip in, in which case we need to
|
||||
* re-start task selection.
|
||||
*/
|
||||
if (rq->stop && task_on_rq_queued(rq->stop))
|
||||
return RETRY_TASK;
|
||||
}
|
||||
|
||||
/*
|
||||
* When prev is DL, we may throttle it in put_prev_task().
|
||||
* So, we update time before we check for dl_nr_running.
|
||||
*/
|
||||
if (prev->sched_class == &dl_sched_class)
|
||||
update_curr_dl(rq);
|
||||
|
||||
if (unlikely(!dl_rq->dl_nr_running))
|
||||
if (!sched_dl_runnable(rq))
|
||||
return NULL;
|
||||
|
||||
put_prev_task(rq, prev);
|
||||
|
||||
dl_se = pick_next_dl_entity(rq, dl_rq);
|
||||
BUG_ON(!dl_se);
|
||||
|
||||
p = dl_task_of(dl_se);
|
||||
|
||||
set_next_task_dl(rq, p);
|
||||
|
||||
return p;
|
||||
}
|
||||
|
||||
static void put_prev_task_dl(struct rq *rq, struct task_struct *p, struct rq_flags *rf)
|
||||
static void put_prev_task_dl(struct rq *rq, struct task_struct *p)
|
||||
{
|
||||
update_curr_dl(rq);
|
||||
|
||||
update_dl_rq_load_avg(rq_clock_pelt(rq), rq, 1);
|
||||
if (on_dl_rq(&p->dl) && p->nr_cpus_allowed > 1)
|
||||
enqueue_pushable_dl_task(rq, p);
|
||||
|
||||
if (rf && !on_dl_rq(&p->dl) && need_pull_dl_task(rq, p)) {
|
||||
/*
|
||||
* This is OK, because current is on_cpu, which avoids it being
|
||||
* picked for load-balance and preemption/IRQs are still
|
||||
* disabled avoiding further scheduler activity on it and we've
|
||||
* not yet started the picking loop.
|
||||
*/
|
||||
rq_unpin_lock(rq, rf);
|
||||
pull_dl_task(rq);
|
||||
rq_repin_lock(rq, rf);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -2468,6 +2441,7 @@ const struct sched_class dl_sched_class = {
|
|||
.set_next_task = set_next_task_dl,
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
.balance = balance_dl,
|
||||
.select_task_rq = select_task_rq_dl,
|
||||
.migrate_task_rq = migrate_task_rq_dl,
|
||||
.set_cpus_allowed = set_cpus_allowed_dl,
|
||||
|
|
|
|||
|
|
@ -6630,6 +6630,15 @@ static void task_dead_fair(struct task_struct *p)
|
|||
{
|
||||
remove_entity_load_avg(&p->se);
|
||||
}
|
||||
|
||||
static int
|
||||
balance_fair(struct rq *rq, struct task_struct *prev, struct rq_flags *rf)
|
||||
{
|
||||
if (rq->nr_running)
|
||||
return 1;
|
||||
|
||||
return newidle_balance(rq, rf) != 0;
|
||||
}
|
||||
#endif /* CONFIG_SMP */
|
||||
|
||||
static unsigned long wakeup_gran(struct sched_entity *se)
|
||||
|
|
@ -6806,11 +6815,11 @@ pick_next_task_fair(struct rq *rq, struct task_struct *prev, struct rq_flags *rf
|
|||
int new_tasks;
|
||||
|
||||
again:
|
||||
if (!cfs_rq->nr_running)
|
||||
if (!sched_fair_runnable(rq))
|
||||
goto idle;
|
||||
|
||||
#ifdef CONFIG_FAIR_GROUP_SCHED
|
||||
if (prev->sched_class != &fair_sched_class)
|
||||
if (!prev || prev->sched_class != &fair_sched_class)
|
||||
goto simple;
|
||||
|
||||
/*
|
||||
|
|
@ -6887,8 +6896,8 @@ again:
|
|||
goto done;
|
||||
simple:
|
||||
#endif
|
||||
|
||||
put_prev_task(rq, prev);
|
||||
if (prev)
|
||||
put_prev_task(rq, prev);
|
||||
|
||||
do {
|
||||
se = pick_next_entity(cfs_rq, NULL);
|
||||
|
|
@ -6916,6 +6925,9 @@ done: __maybe_unused;
|
|||
return p;
|
||||
|
||||
idle:
|
||||
if (!rf)
|
||||
return NULL;
|
||||
|
||||
new_tasks = newidle_balance(rq, rf);
|
||||
|
||||
/*
|
||||
|
|
@ -6941,7 +6953,7 @@ idle:
|
|||
/*
|
||||
* Account for a descheduled task:
|
||||
*/
|
||||
static void put_prev_task_fair(struct rq *rq, struct task_struct *prev, struct rq_flags *rf)
|
||||
static void put_prev_task_fair(struct rq *rq, struct task_struct *prev)
|
||||
{
|
||||
struct sched_entity *se = &prev->se;
|
||||
struct cfs_rq *cfs_rq;
|
||||
|
|
@ -7596,6 +7608,19 @@ static void update_blocked_averages(int cpu)
|
|||
rq_lock_irqsave(rq, &rf);
|
||||
update_rq_clock(rq);
|
||||
|
||||
/*
|
||||
* update_cfs_rq_load_avg() can call cpufreq_update_util(). Make sure
|
||||
* that RT, DL and IRQ signals have been updated before updating CFS.
|
||||
*/
|
||||
curr_class = rq->curr->sched_class;
|
||||
update_rt_rq_load_avg(rq_clock_pelt(rq), rq, curr_class == &rt_sched_class);
|
||||
update_dl_rq_load_avg(rq_clock_pelt(rq), rq, curr_class == &dl_sched_class);
|
||||
update_irq_load_avg(rq, 0);
|
||||
|
||||
/* Don't need periodic decay once load/util_avg are null */
|
||||
if (others_have_blocked(rq))
|
||||
done = false;
|
||||
|
||||
/*
|
||||
* Iterates the task_group tree in a bottom up fashion, see
|
||||
* list_add_leaf_cfs_rq() for details.
|
||||
|
|
@ -7623,14 +7648,6 @@ static void update_blocked_averages(int cpu)
|
|||
done = false;
|
||||
}
|
||||
|
||||
curr_class = rq->curr->sched_class;
|
||||
update_rt_rq_load_avg(rq_clock_pelt(rq), rq, curr_class == &rt_sched_class);
|
||||
update_dl_rq_load_avg(rq_clock_pelt(rq), rq, curr_class == &dl_sched_class);
|
||||
update_irq_load_avg(rq, 0);
|
||||
/* Don't need periodic decay once load/util_avg are null */
|
||||
if (others_have_blocked(rq))
|
||||
done = false;
|
||||
|
||||
update_blocked_load_status(rq, !done);
|
||||
rq_unlock_irqrestore(rq, &rf);
|
||||
}
|
||||
|
|
@ -7691,12 +7708,18 @@ static inline void update_blocked_averages(int cpu)
|
|||
|
||||
rq_lock_irqsave(rq, &rf);
|
||||
update_rq_clock(rq);
|
||||
update_cfs_rq_load_avg(cfs_rq_clock_pelt(cfs_rq), cfs_rq);
|
||||
|
||||
/*
|
||||
* update_cfs_rq_load_avg() can call cpufreq_update_util(). Make sure
|
||||
* that RT, DL and IRQ signals have been updated before updating CFS.
|
||||
*/
|
||||
curr_class = rq->curr->sched_class;
|
||||
update_rt_rq_load_avg(rq_clock_pelt(rq), rq, curr_class == &rt_sched_class);
|
||||
update_dl_rq_load_avg(rq_clock_pelt(rq), rq, curr_class == &dl_sched_class);
|
||||
update_irq_load_avg(rq, 0);
|
||||
|
||||
update_cfs_rq_load_avg(cfs_rq_clock_pelt(cfs_rq), cfs_rq);
|
||||
|
||||
update_blocked_load_status(rq, cfs_rq_has_blocked(cfs_rq) || others_have_blocked(rq));
|
||||
rq_unlock_irqrestore(rq, &rf);
|
||||
}
|
||||
|
|
@ -10537,11 +10560,11 @@ const struct sched_class fair_sched_class = {
|
|||
.check_preempt_curr = check_preempt_wakeup,
|
||||
|
||||
.pick_next_task = pick_next_task_fair,
|
||||
|
||||
.put_prev_task = put_prev_task_fair,
|
||||
.set_next_task = set_next_task_fair,
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
.balance = balance_fair,
|
||||
.select_task_rq = select_task_rq_fair,
|
||||
.migrate_task_rq = migrate_task_rq_fair,
|
||||
|
||||
|
|
|
|||
|
|
@ -365,6 +365,12 @@ select_task_rq_idle(struct task_struct *p, int cpu, int sd_flag, int flags)
|
|||
{
|
||||
return task_cpu(p); /* IDLE tasks as never migrated */
|
||||
}
|
||||
|
||||
static int
|
||||
balance_idle(struct rq *rq, struct task_struct *prev, struct rq_flags *rf)
|
||||
{
|
||||
return WARN_ON_ONCE(1);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
|
@ -375,7 +381,7 @@ static void check_preempt_curr_idle(struct rq *rq, struct task_struct *p, int fl
|
|||
resched_curr(rq);
|
||||
}
|
||||
|
||||
static void put_prev_task_idle(struct rq *rq, struct task_struct *prev, struct rq_flags *rf)
|
||||
static void put_prev_task_idle(struct rq *rq, struct task_struct *prev)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -390,7 +396,9 @@ pick_next_task_idle(struct rq *rq, struct task_struct *prev, struct rq_flags *rf
|
|||
{
|
||||
struct task_struct *next = rq->idle;
|
||||
|
||||
put_prev_task(rq, prev);
|
||||
if (prev)
|
||||
put_prev_task(rq, prev);
|
||||
|
||||
set_next_task_idle(rq, next);
|
||||
|
||||
return next;
|
||||
|
|
@ -458,6 +466,7 @@ const struct sched_class idle_sched_class = {
|
|||
.set_next_task = set_next_task_idle,
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
.balance = balance_idle,
|
||||
.select_task_rq = select_task_rq_idle,
|
||||
.set_cpus_allowed = set_cpus_allowed_common,
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1469,6 +1469,22 @@ static void check_preempt_equal_prio(struct rq *rq, struct task_struct *p)
|
|||
resched_curr(rq);
|
||||
}
|
||||
|
||||
static int balance_rt(struct rq *rq, struct task_struct *p, struct rq_flags *rf)
|
||||
{
|
||||
if (!on_rt_rq(&p->rt) && need_pull_rt_task(rq, p)) {
|
||||
/*
|
||||
* This is OK, because current is on_cpu, which avoids it being
|
||||
* picked for load-balance and preemption/IRQs are still
|
||||
* disabled avoiding further scheduler activity on it and we've
|
||||
* not yet started the picking loop.
|
||||
*/
|
||||
rq_unpin_lock(rq, rf);
|
||||
pull_rt_task(rq);
|
||||
rq_repin_lock(rq, rf);
|
||||
}
|
||||
|
||||
return sched_stop_runnable(rq) || sched_dl_runnable(rq) || sched_rt_runnable(rq);
|
||||
}
|
||||
#endif /* CONFIG_SMP */
|
||||
|
||||
/*
|
||||
|
|
@ -1552,48 +1568,18 @@ static struct task_struct *
|
|||
pick_next_task_rt(struct rq *rq, struct task_struct *prev, struct rq_flags *rf)
|
||||
{
|
||||
struct task_struct *p;
|
||||
struct rt_rq *rt_rq = &rq->rt;
|
||||
|
||||
if (need_pull_rt_task(rq, prev)) {
|
||||
/*
|
||||
* This is OK, because current is on_cpu, which avoids it being
|
||||
* picked for load-balance and preemption/IRQs are still
|
||||
* disabled avoiding further scheduler activity on it and we're
|
||||
* being very careful to re-start the picking loop.
|
||||
*/
|
||||
rq_unpin_lock(rq, rf);
|
||||
pull_rt_task(rq);
|
||||
rq_repin_lock(rq, rf);
|
||||
/*
|
||||
* pull_rt_task() can drop (and re-acquire) rq->lock; this
|
||||
* means a dl or stop task can slip in, in which case we need
|
||||
* to re-start task selection.
|
||||
*/
|
||||
if (unlikely((rq->stop && task_on_rq_queued(rq->stop)) ||
|
||||
rq->dl.dl_nr_running))
|
||||
return RETRY_TASK;
|
||||
}
|
||||
WARN_ON_ONCE(prev || rf);
|
||||
|
||||
/*
|
||||
* We may dequeue prev's rt_rq in put_prev_task().
|
||||
* So, we update time before rt_queued check.
|
||||
*/
|
||||
if (prev->sched_class == &rt_sched_class)
|
||||
update_curr_rt(rq);
|
||||
|
||||
if (!rt_rq->rt_queued)
|
||||
if (!sched_rt_runnable(rq))
|
||||
return NULL;
|
||||
|
||||
put_prev_task(rq, prev);
|
||||
|
||||
p = _pick_next_task_rt(rq);
|
||||
|
||||
set_next_task_rt(rq, p);
|
||||
|
||||
return p;
|
||||
}
|
||||
|
||||
static void put_prev_task_rt(struct rq *rq, struct task_struct *p, struct rq_flags *rf)
|
||||
static void put_prev_task_rt(struct rq *rq, struct task_struct *p)
|
||||
{
|
||||
update_curr_rt(rq);
|
||||
|
||||
|
|
@ -1605,18 +1591,6 @@ static void put_prev_task_rt(struct rq *rq, struct task_struct *p, struct rq_fla
|
|||
*/
|
||||
if (on_rt_rq(&p->rt) && p->nr_cpus_allowed > 1)
|
||||
enqueue_pushable_task(rq, p);
|
||||
|
||||
if (rf && !on_rt_rq(&p->rt) && need_pull_rt_task(rq, p)) {
|
||||
/*
|
||||
* This is OK, because current is on_cpu, which avoids it being
|
||||
* picked for load-balance and preemption/IRQs are still
|
||||
* disabled avoiding further scheduler activity on it and we've
|
||||
* not yet started the picking loop.
|
||||
*/
|
||||
rq_unpin_lock(rq, rf);
|
||||
pull_rt_task(rq);
|
||||
rq_repin_lock(rq, rf);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
|
|
@ -2393,8 +2367,8 @@ const struct sched_class rt_sched_class = {
|
|||
.set_next_task = set_next_task_rt,
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
.balance = balance_rt,
|
||||
.select_task_rq = select_task_rq_rt,
|
||||
|
||||
.set_cpus_allowed = set_cpus_allowed_common,
|
||||
.rq_online = rq_online_rt,
|
||||
.rq_offline = rq_offline_rt,
|
||||
|
|
|
|||
|
|
@ -1724,20 +1724,24 @@ struct sched_class {
|
|||
void (*check_preempt_curr)(struct rq *rq, struct task_struct *p, int flags);
|
||||
|
||||
/*
|
||||
* It is the responsibility of the pick_next_task() method that will
|
||||
* return the next task to call put_prev_task() on the @prev task or
|
||||
* something equivalent.
|
||||
* Both @prev and @rf are optional and may be NULL, in which case the
|
||||
* caller must already have invoked put_prev_task(rq, prev, rf).
|
||||
*
|
||||
* May return RETRY_TASK when it finds a higher prio class has runnable
|
||||
* tasks.
|
||||
* Otherwise it is the responsibility of the pick_next_task() to call
|
||||
* put_prev_task() on the @prev task or something equivalent, IFF it
|
||||
* returns a next task.
|
||||
*
|
||||
* In that case (@rf != NULL) it may return RETRY_TASK when it finds a
|
||||
* higher prio class has runnable tasks.
|
||||
*/
|
||||
struct task_struct * (*pick_next_task)(struct rq *rq,
|
||||
struct task_struct *prev,
|
||||
struct rq_flags *rf);
|
||||
void (*put_prev_task)(struct rq *rq, struct task_struct *p, struct rq_flags *rf);
|
||||
void (*put_prev_task)(struct rq *rq, struct task_struct *p);
|
||||
void (*set_next_task)(struct rq *rq, struct task_struct *p);
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
int (*balance)(struct rq *rq, struct task_struct *prev, struct rq_flags *rf);
|
||||
int (*select_task_rq)(struct task_struct *p, int task_cpu, int sd_flag, int flags);
|
||||
void (*migrate_task_rq)(struct task_struct *p, int new_cpu);
|
||||
|
||||
|
|
@ -1780,7 +1784,7 @@ struct sched_class {
|
|||
static inline void put_prev_task(struct rq *rq, struct task_struct *prev)
|
||||
{
|
||||
WARN_ON_ONCE(rq->curr != prev);
|
||||
prev->sched_class->put_prev_task(rq, prev, NULL);
|
||||
prev->sched_class->put_prev_task(rq, prev);
|
||||
}
|
||||
|
||||
static inline void set_next_task(struct rq *rq, struct task_struct *next)
|
||||
|
|
@ -1794,8 +1798,12 @@ static inline void set_next_task(struct rq *rq, struct task_struct *next)
|
|||
#else
|
||||
#define sched_class_highest (&dl_sched_class)
|
||||
#endif
|
||||
|
||||
#define for_class_range(class, _from, _to) \
|
||||
for (class = (_from); class != (_to); class = class->next)
|
||||
|
||||
#define for_each_class(class) \
|
||||
for (class = sched_class_highest; class; class = class->next)
|
||||
for_class_range(class, sched_class_highest, NULL)
|
||||
|
||||
extern const struct sched_class stop_sched_class;
|
||||
extern const struct sched_class dl_sched_class;
|
||||
|
|
@ -1803,6 +1811,25 @@ extern const struct sched_class rt_sched_class;
|
|||
extern const struct sched_class fair_sched_class;
|
||||
extern const struct sched_class idle_sched_class;
|
||||
|
||||
static inline bool sched_stop_runnable(struct rq *rq)
|
||||
{
|
||||
return rq->stop && task_on_rq_queued(rq->stop);
|
||||
}
|
||||
|
||||
static inline bool sched_dl_runnable(struct rq *rq)
|
||||
{
|
||||
return rq->dl.dl_nr_running > 0;
|
||||
}
|
||||
|
||||
static inline bool sched_rt_runnable(struct rq *rq)
|
||||
{
|
||||
return rq->rt.rt_queued > 0;
|
||||
}
|
||||
|
||||
static inline bool sched_fair_runnable(struct rq *rq)
|
||||
{
|
||||
return rq->cfs.nr_running > 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
|
||||
|
|
|
|||
|
|
@ -15,6 +15,12 @@ select_task_rq_stop(struct task_struct *p, int cpu, int sd_flag, int flags)
|
|||
{
|
||||
return task_cpu(p); /* stop tasks as never migrate */
|
||||
}
|
||||
|
||||
static int
|
||||
balance_stop(struct rq *rq, struct task_struct *prev, struct rq_flags *rf)
|
||||
{
|
||||
return sched_stop_runnable(rq);
|
||||
}
|
||||
#endif /* CONFIG_SMP */
|
||||
|
||||
static void
|
||||
|
|
@ -31,15 +37,13 @@ static void set_next_task_stop(struct rq *rq, struct task_struct *stop)
|
|||
static struct task_struct *
|
||||
pick_next_task_stop(struct rq *rq, struct task_struct *prev, struct rq_flags *rf)
|
||||
{
|
||||
struct task_struct *stop = rq->stop;
|
||||
WARN_ON_ONCE(prev || rf);
|
||||
|
||||
if (!stop || !task_on_rq_queued(stop))
|
||||
if (!sched_stop_runnable(rq))
|
||||
return NULL;
|
||||
|
||||
put_prev_task(rq, prev);
|
||||
set_next_task_stop(rq, stop);
|
||||
|
||||
return stop;
|
||||
set_next_task_stop(rq, rq->stop);
|
||||
return rq->stop;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -59,7 +63,7 @@ static void yield_task_stop(struct rq *rq)
|
|||
BUG(); /* the stop task should never yield, its pointless. */
|
||||
}
|
||||
|
||||
static void put_prev_task_stop(struct rq *rq, struct task_struct *prev, struct rq_flags *rf)
|
||||
static void put_prev_task_stop(struct rq *rq, struct task_struct *prev)
|
||||
{
|
||||
struct task_struct *curr = rq->curr;
|
||||
u64 delta_exec;
|
||||
|
|
@ -128,6 +132,7 @@ const struct sched_class stop_sched_class = {
|
|||
.set_next_task = set_next_task_stop,
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
.balance = balance_stop,
|
||||
.select_task_rq = select_task_rq_stop,
|
||||
.set_cpus_allowed = set_cpus_allowed_common,
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -2205,8 +2205,8 @@ static void ptrace_stop(int exit_code, int why, int clear_code, kernel_siginfo_t
|
|||
*/
|
||||
preempt_disable();
|
||||
read_unlock(&tasklist_lock);
|
||||
preempt_enable_no_resched();
|
||||
cgroup_enter_frozen();
|
||||
preempt_enable_no_resched();
|
||||
freezable_schedule();
|
||||
cgroup_leave_frozen(true);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -141,7 +141,8 @@ unsigned int stack_trace_save_tsk(struct task_struct *tsk, unsigned long *store,
|
|||
struct stacktrace_cookie c = {
|
||||
.store = store,
|
||||
.size = size,
|
||||
.skip = skipnr + 1,
|
||||
/* skip this function if they are tracing us */
|
||||
.skip = skipnr + !!(current == tsk),
|
||||
};
|
||||
|
||||
if (!try_get_task_stack(tsk))
|
||||
|
|
@ -298,7 +299,8 @@ unsigned int stack_trace_save_tsk(struct task_struct *task,
|
|||
struct stack_trace trace = {
|
||||
.entries = store,
|
||||
.max_entries = size,
|
||||
.skip = skipnr + 1,
|
||||
/* skip this function if they are tracing us */
|
||||
.skip = skipnr + !!(current == task),
|
||||
};
|
||||
|
||||
save_stack_trace_tsk(task, &trace);
|
||||
|
|
|
|||
|
|
@ -771,7 +771,7 @@ int __do_adjtimex(struct __kernel_timex *txc, const struct timespec64 *ts,
|
|||
/* fill PPS status fields */
|
||||
pps_fill_timex(txc);
|
||||
|
||||
txc->time.tv_sec = (time_t)ts->tv_sec;
|
||||
txc->time.tv_sec = ts->tv_sec;
|
||||
txc->time.tv_usec = ts->tv_nsec;
|
||||
if (!(time_status & STA_NANO))
|
||||
txc->time.tv_usec = ts->tv_nsec / NSEC_PER_USEC;
|
||||
|
|
|
|||
|
|
@ -110,8 +110,7 @@ void update_vsyscall(struct timekeeper *tk)
|
|||
nsec = nsec + tk->wall_to_monotonic.tv_nsec;
|
||||
vdso_ts->sec += __iter_div_u64_rem(nsec, NSEC_PER_SEC, &vdso_ts->nsec);
|
||||
|
||||
if (__arch_use_vsyscall(vdata))
|
||||
update_vdso_data(vdata, tk);
|
||||
update_vdso_data(vdata, tk);
|
||||
|
||||
__arch_update_vsyscall(vdata, tk);
|
||||
|
||||
|
|
@ -124,10 +123,8 @@ void update_vsyscall_tz(void)
|
|||
{
|
||||
struct vdso_data *vdata = __arch_get_k_vdso_data();
|
||||
|
||||
if (__arch_use_vsyscall(vdata)) {
|
||||
vdata[CS_HRES_COARSE].tz_minuteswest = sys_tz.tz_minuteswest;
|
||||
vdata[CS_HRES_COARSE].tz_dsttime = sys_tz.tz_dsttime;
|
||||
}
|
||||
vdata[CS_HRES_COARSE].tz_minuteswest = sys_tz.tz_minuteswest;
|
||||
vdata[CS_HRES_COARSE].tz_dsttime = sys_tz.tz_dsttime;
|
||||
|
||||
__arch_sync_vdso_data(vdata);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue