Merge 5.10.65 into android12-5.10-lts
Changes in 5.10.65 locking/mutex: Fix HANDOFF condition regmap: fix the offset of register error log regulator: tps65910: Silence deferred probe error crypto: mxs-dcp - Check for DMA mapping errors sched/deadline: Fix reset_on_fork reporting of DL tasks power: supply: axp288_fuel_gauge: Report register-address on readb / writeb errors crypto: omap-sham - clear dma flags only after omap_sham_update_dma_stop() sched/deadline: Fix missing clock update in migrate_task_rq_dl() rcu/tree: Handle VM stoppage in stall detection EDAC/mce_amd: Do not load edac_mce_amd module on guests posix-cpu-timers: Force next expiration recalc after itimer reset hrtimer: Avoid double reprogramming in __hrtimer_start_range_ns() hrtimer: Ensure timerfd notification for HIGHRES=n udf: Check LVID earlier udf: Fix iocharset=utf8 mount option isofs: joliet: Fix iocharset=utf8 mount option bcache: add proper error unwinding in bcache_device_init blk-throtl: optimize IOPS throttle for large IO scenarios nvme-tcp: don't update queue count when failing to set io queues nvme-rdma: don't update queue count when failing to set io queues nvmet: pass back cntlid on successful completion power: supply: smb347-charger: Add missing pin control activation power: supply: max17042_battery: fix typo in MAx17042_TOFF s390/cio: add dev_busid sysfs entry for each subchannel s390/zcrypt: fix wrong offset index for APKA master key valid state libata: fix ata_host_start() crypto: omap - Fix inconsistent locking of device lists crypto: qat - do not ignore errors from enable_vf2pf_comms() crypto: qat - handle both source of interrupt in VF ISR crypto: qat - fix reuse of completion variable crypto: qat - fix naming for init/shutdown VF to PF notifications crypto: qat - do not export adf_iov_putmsg() fcntl: fix potential deadlock for &fasync_struct.fa_lock udf_get_extendedattr() had no boundary checks. s390/kasan: fix large PMD pages address alignment check s390/pci: fix misleading rc in clp_set_pci_fn() s390/debug: keep debug data on resize s390/debug: fix debug area life cycle s390/ap: fix state machine hang after failure to enable irq power: supply: cw2015: use dev_err_probe to allow deferred probe m68k: emu: Fix invalid free in nfeth_cleanup() sched/numa: Fix is_core_idle() sched: Fix UCLAMP_FLAG_IDLE setting rcu: Fix to include first blocked task in stall warning rcu: Add lockdep_assert_irqs_disabled() to rcu_sched_clock_irq() and callees rcu: Fix stall-warning deadlock due to non-release of rcu_node ->lock m68k: Fix invalid RMW_INSNS on CPUs that lack CAS block: return ELEVATOR_DISCARD_MERGE if possible spi: spi-fsl-dspi: Fix issue with uninitialized dma_slave_config spi: spi-pic32: Fix issue with uninitialized dma_slave_config genirq/timings: Fix error return code in irq_timings_test_irqs() irqchip/loongson-pch-pic: Improve edge triggered interrupt support lib/mpi: use kcalloc in mpi_resize clocksource/drivers/sh_cmt: Fix wrong setting if don't request IRQ for clock source channel block: nbd: add sanity check for first_minor spi: coldfire-qspi: Use clk_disable_unprepare in the remove function irqchip/gic-v3: Fix priority comparison when non-secure priorities are used crypto: qat - use proper type for vf_mask certs: Trigger creation of RSA module signing key if it's not an RSA key tpm: ibmvtpm: Avoid error message when process gets signal while waiting x86/mce: Defer processing of early errors spi: davinci: invoke chipselect callback blk-crypto: fix check for too-large dun_bytes regulator: vctrl: Use locked regulator_get_voltage in probe path regulator: vctrl: Avoid lockdep warning in enable/disable ops spi: sprd: Fix the wrong WDG_LOAD_VAL spi: spi-zynq-qspi: use wait_for_completion_timeout to make zynq_qspi_exec_mem_op not interruptible EDAC/i10nm: Fix NVDIMM detection drm/panfrost: Fix missing clk_disable_unprepare() on error in panfrost_clk_init() drm/gma500: Fix end of loop tests for list_for_each_entry ASoC: mediatek: mt8183: Fix Unbalanced pm_runtime_enable in mt8183_afe_pcm_dev_probe media: TDA1997x: enable EDID support leds: is31fl32xx: Fix missing error code in is31fl32xx_parse_dt() soc: rockchip: ROCKCHIP_GRF should not default to y, unconditionally media: cxd2880-spi: Fix an error handling path drm/of: free the right object bpf: Fix a typo of reuseport map in bpf.h. bpf: Fix potential memleak and UAF in the verifier. drm/of: free the iterator object on failure gve: fix the wrong AdminQ buffer overflow check libbpf: Fix the possible memory leak on error ARM: dts: aspeed-g6: Fix HVI3C function-group in pinctrl dtsi arm64: dts: renesas: r8a77995: draak: Remove bogus adv7511w properties i40e: improve locking of mac_filter_hash soc: qcom: rpmhpd: Use corner in power_off libbpf: Fix removal of inner map in bpf_object__create_map gfs2: Fix memory leak of object lsi on error return path firmware: fix theoretical UAF race with firmware cache and resume driver core: Fix error return code in really_probe() ionic: cleanly release devlink instance media: dvb-usb: fix uninit-value in dvb_usb_adapter_dvb_init media: dvb-usb: fix uninit-value in vp702x_read_mac_addr media: dvb-usb: Fix error handling in dvb_usb_i2c_init media: go7007: fix memory leak in go7007_usb_probe media: go7007: remove redundant initialization media: rockchip/rga: use pm_runtime_resume_and_get() media: rockchip/rga: fix error handling in probe media: coda: fix frame_mem_ctrl for YUV420 and YVU420 formats media: atomisp: fix the uninitialized use and rename "retvalue" Bluetooth: sco: prevent information leak in sco_conn_defer_accept() 6lowpan: iphc: Fix an off-by-one check of array index drm/amdgpu/acp: Make PM domain really work tcp: seq_file: Avoid skipping sk during tcp_seek_last_pos ARM: dts: meson8: Use a higher default GPU clock frequency ARM: dts: meson8b: odroidc1: Fix the pwm regulator supply properties ARM: dts: meson8b: mxq: Fix the pwm regulator supply properties ARM: dts: meson8b: ec100: Fix the pwm regulator supply properties net/mlx5e: Prohibit inner indir TIRs in IPoIB net/mlx5e: Block LRO if firmware asks for tunneled LRO cgroup/cpuset: Fix a partition bug with hotplug drm: mxsfb: Enable recovery on underflow drm: mxsfb: Increase number of outstanding requests on V4 and newer HW drm: mxsfb: Clear FIFO_CLEAR bit net: cipso: fix warnings in netlbl_cipsov4_add_std Bluetooth: mgmt: Fix wrong opcode in the response for add_adv cmd arm64: dts: renesas: rzg2: Convert EtherAVB to explicit delay handling arm64: dts: renesas: hihope-rzg2-ex: Add EtherAVB internal rx delay devlink: Break parameter notification sequence to be before/after unload/load driver net/mlx5: Fix missing return value in mlx5_devlink_eswitch_inline_mode_set() i2c: highlander: add IRQ check leds: lt3593: Put fwnode in any case during ->probe() leds: trigger: audio: Add an activate callback to ensure the initial brightness is set media: em28xx-input: fix refcount bug in em28xx_usb_disconnect media: venus: venc: Fix potential null pointer dereference on pointer fmt PCI: PM: Avoid forcing PCI_D0 for wakeup reasons inconsistently PCI: PM: Enable PME if it can be signaled from D3cold bpf, samples: Add missing mprog-disable to xdp_redirect_cpu's optstring soc: qcom: smsm: Fix missed interrupts if state changes while masked debugfs: Return error during {full/open}_proxy_open() on rmmod Bluetooth: increase BTNAMSIZ to 21 chars to fix potential buffer overflow PM: EM: Increase energy calculation precision selftests/bpf: Fix bpf-iter-tcp4 test to print correctly the dest IP drm/msm/mdp4: refactor HW revision detection into read_mdp_hw_revision drm/msm/mdp4: move HW revision detection to earlier phase drm/msm/dpu: make dpu_hw_ctl_clear_all_blendstages clear necessary LMs arm64: dts: exynos: correct GIC CPU interfaces address range on Exynos7 counter: 104-quad-8: Return error when invalid mode during ceiling_write cgroup/cpuset: Miscellaneous code cleanup cgroup/cpuset: Fix violation of cpuset locking rule ASoC: Intel: Fix platform ID matching Bluetooth: fix repeated calls to sco_sock_kill drm/msm/dsi: Fix some reference counted resource leaks net/mlx5: Register to devlink ingress VLAN filter trap net/mlx5: Fix unpublish devlink parameters ASoC: rt5682: Implement remove callback ASoC: rt5682: Properly turn off regulators if wrong device ID usb: dwc3: meson-g12a: add IRQ check usb: dwc3: qcom: add IRQ check usb: gadget: udc: at91: add IRQ check usb: gadget: udc: s3c2410: add IRQ check usb: phy: fsl-usb: add IRQ check usb: phy: twl6030: add IRQ checks usb: gadget: udc: renesas_usb3: Fix soc_device_match() abuse selftests/bpf: Fix test_core_autosize on big-endian machines devlink: Clear whole devlink_flash_notify struct samples: pktgen: add missing IPv6 option to pktgen scripts Bluetooth: Move shutdown callback before flushing tx and rx queue PM: cpu: Make notifier chain use a raw_spinlock_t usb: host: ohci-tmio: add IRQ check usb: phy: tahvo: add IRQ check libbpf: Re-build libbpf.so when libbpf.map changes mac80211: Fix insufficient headroom issue for AMSDU locking/lockdep: Mark local_lock_t locking/local_lock: Add missing owner initialization lockd: Fix invalid lockowner cast after vfs_test_lock nfsd4: Fix forced-expiry locking arm64: dts: marvell: armada-37xx: Extend PCIe MEM space clk: staging: correct reference to config IOMEM to config HAS_IOMEM i2c: synquacer: fix deferred probing firmware: raspberrypi: Keep count of all consumers firmware: raspberrypi: Fix a leak in 'rpi_firmware_get()' usb: gadget: mv_u3d: request_irq() after initializing UDC mm/swap: consider max pages in iomap_swapfile_add_extent lkdtm: replace SCSI_DISPATCH_CMD with SCSI_QUEUE_RQ Bluetooth: add timeout sanity check to hci_inquiry i2c: iop3xx: fix deferred probing i2c: s3c2410: fix IRQ check i2c: fix platform_get_irq.cocci warnings i2c: hix5hd2: fix IRQ check gfs2: init system threads before freeze lock rsi: fix error code in rsi_load_9116_firmware() rsi: fix an error code in rsi_probe() ASoC: Intel: kbl_da7219_max98927: Fix format selection for max98373 ASoC: Intel: Skylake: Leave data as is when invoking TLV IPCs ASoC: Intel: Skylake: Fix module resource and format selection mmc: sdhci: Fix issue with uninitialized dma_slave_config mmc: dw_mmc: Fix issue with uninitialized dma_slave_config mmc: moxart: Fix issue with uninitialized dma_slave_config bpf: Fix possible out of bound write in narrow load handling CIFS: Fix a potencially linear read overflow i2c: mt65xx: fix IRQ check i2c: xlp9xx: fix main IRQ check usb: ehci-orion: Handle errors of clk_prepare_enable() in probe usb: bdc: Fix an error handling path in 'bdc_probe()' when no suitable DMA config is available usb: bdc: Fix a resource leak in the error handling path of 'bdc_probe()' tty: serial: fsl_lpuart: fix the wrong mapbase value ASoC: wcd9335: Fix a double irq free in the remove function ASoC: wcd9335: Fix a memory leak in the error handling path of the probe function ASoC: wcd9335: Disable irq on slave ports in the remove function iwlwifi: follow the new inclusive terminology iwlwifi: skip first element in the WTAS ACPI table ice: Only lock to update netdev dev_addr ath6kl: wmi: fix an error code in ath6kl_wmi_sync_point() atlantic: Fix driver resume flow. bcma: Fix memory leak for internally-handled cores brcmfmac: pcie: fix oops on failure to resume and reprobe ipv6: make exception cache less predictible ipv4: make exception cache less predictible net: sched: Fix qdisc_rate_table refcount leak when get tcf_block failed net: qualcomm: fix QCA7000 checksum handling octeontx2-af: Fix loop in free and unmap counter octeontx2-af: Fix static code analyzer reported issues octeontx2-af: Set proper errorcode for IPv4 checksum errors ipv4: fix endianness issue in inet_rtm_getroute_build_skb() ASoC: rt5682: Remove unused variable in rt5682_i2c_remove() iwlwifi Add support for ax201 in Samsung Galaxy Book Flex2 Alpha f2fs: guarantee to write dirty data when enabling checkpoint back time: Handle negative seconds correctly in timespec64_to_ns() io_uring: IORING_OP_WRITE needs hash_reg_file set bio: fix page leak bio_add_hw_page failure tty: Fix data race between tiocsti() and flush_to_ldisc() perf/x86/amd/ibs: Extend PERF_PMU_CAP_NO_EXCLUDE to IBS Op x86/resctrl: Fix a maybe-uninitialized build warning treated as error Revert "KVM: x86: mmu: Add guest physical address check in translate_gpa()" KVM: s390: index kvm->arch.idle_mask by vcpu_idx KVM: x86: Update vCPU's hv_clock before back to guest when tsc_offset is adjusted KVM: VMX: avoid running vmx_handle_exit_irqoff in case of emulation KVM: nVMX: Unconditionally clear nested.pi_pending on nested VM-Enter ARM: dts: at91: add pinctrl-{names, 0} for all gpios fuse: truncate pagecache on atomic_o_trunc fuse: flush extending writes IMA: remove -Wmissing-prototypes warning IMA: remove the dependency on CRYPTO_MD5 fbmem: don't allow too huge resolutions backlight: pwm_bl: Improve bootloader/kernel device handover clk: kirkwood: Fix a clocking boot regression Linux 5.10.65 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: Ie0b9306ba6ee4193de3200df7cdacaeba152b83e
This commit is contained in:
@@ -1138,7 +1138,7 @@ enum subparts_cmd {
|
||||
* cpus_allowed can be granted or an error code will be returned.
|
||||
*
|
||||
* For partcmd_disable, the cpuset is being transofrmed from a partition
|
||||
* root back to a non-partition root. any CPUs in cpus_allowed that are in
|
||||
* root back to a non-partition root. Any CPUs in cpus_allowed that are in
|
||||
* parent's subparts_cpus will be taken away from that cpumask and put back
|
||||
* into parent's effective_cpus. 0 should always be returned.
|
||||
*
|
||||
@@ -1172,6 +1172,7 @@ static int update_parent_subparts_cpumask(struct cpuset *cpuset, int cmd,
|
||||
struct cpuset *parent = parent_cs(cpuset);
|
||||
int adding; /* Moving cpus from effective_cpus to subparts_cpus */
|
||||
int deleting; /* Moving cpus from subparts_cpus to effective_cpus */
|
||||
int new_prs;
|
||||
bool part_error = false; /* Partition error? */
|
||||
|
||||
lockdep_assert_held(&cpuset_mutex);
|
||||
@@ -1207,6 +1208,7 @@ static int update_parent_subparts_cpumask(struct cpuset *cpuset, int cmd,
|
||||
* A cpumask update cannot make parent's effective_cpus become empty.
|
||||
*/
|
||||
adding = deleting = false;
|
||||
new_prs = cpuset->partition_root_state;
|
||||
if (cmd == partcmd_enable) {
|
||||
cpumask_copy(tmp->addmask, cpuset->cpus_allowed);
|
||||
adding = true;
|
||||
@@ -1249,7 +1251,7 @@ static int update_parent_subparts_cpumask(struct cpuset *cpuset, int cmd,
|
||||
/*
|
||||
* partcmd_update w/o newmask:
|
||||
*
|
||||
* addmask = cpus_allowed & parent->effectiveb_cpus
|
||||
* addmask = cpus_allowed & parent->effective_cpus
|
||||
*
|
||||
* Note that parent's subparts_cpus may have been
|
||||
* pre-shrunk in case there is a change in the cpu list.
|
||||
@@ -1271,11 +1273,11 @@ static int update_parent_subparts_cpumask(struct cpuset *cpuset, int cmd,
|
||||
switch (cpuset->partition_root_state) {
|
||||
case PRS_ENABLED:
|
||||
if (part_error)
|
||||
cpuset->partition_root_state = PRS_ERROR;
|
||||
new_prs = PRS_ERROR;
|
||||
break;
|
||||
case PRS_ERROR:
|
||||
if (!part_error)
|
||||
cpuset->partition_root_state = PRS_ENABLED;
|
||||
new_prs = PRS_ENABLED;
|
||||
break;
|
||||
}
|
||||
/*
|
||||
@@ -1284,10 +1286,10 @@ static int update_parent_subparts_cpumask(struct cpuset *cpuset, int cmd,
|
||||
part_error = (prev_prs == PRS_ERROR);
|
||||
}
|
||||
|
||||
if (!part_error && (cpuset->partition_root_state == PRS_ERROR))
|
||||
if (!part_error && (new_prs == PRS_ERROR))
|
||||
return 0; /* Nothing need to be done */
|
||||
|
||||
if (cpuset->partition_root_state == PRS_ERROR) {
|
||||
if (new_prs == PRS_ERROR) {
|
||||
/*
|
||||
* Remove all its cpus from parent's subparts_cpus.
|
||||
*/
|
||||
@@ -1296,7 +1298,7 @@ static int update_parent_subparts_cpumask(struct cpuset *cpuset, int cmd,
|
||||
parent->subparts_cpus);
|
||||
}
|
||||
|
||||
if (!adding && !deleting)
|
||||
if (!adding && !deleting && (new_prs == cpuset->partition_root_state))
|
||||
return 0;
|
||||
|
||||
/*
|
||||
@@ -1323,6 +1325,9 @@ static int update_parent_subparts_cpumask(struct cpuset *cpuset, int cmd,
|
||||
}
|
||||
|
||||
parent->nr_subparts_cpus = cpumask_weight(parent->subparts_cpus);
|
||||
|
||||
if (cpuset->partition_root_state != new_prs)
|
||||
cpuset->partition_root_state = new_prs;
|
||||
spin_unlock_irq(&callback_lock);
|
||||
|
||||
return cmd == partcmd_update;
|
||||
@@ -1345,6 +1350,7 @@ static void update_cpumasks_hier(struct cpuset *cs, struct tmpmasks *tmp)
|
||||
struct cpuset *cp;
|
||||
struct cgroup_subsys_state *pos_css;
|
||||
bool need_rebuild_sched_domains = false;
|
||||
int new_prs;
|
||||
|
||||
rcu_read_lock();
|
||||
cpuset_for_each_descendant_pre(cp, pos_css, cs) {
|
||||
@@ -1384,17 +1390,18 @@ static void update_cpumasks_hier(struct cpuset *cs, struct tmpmasks *tmp)
|
||||
* update_tasks_cpumask() again for tasks in the parent
|
||||
* cpuset if the parent's subparts_cpus changes.
|
||||
*/
|
||||
if ((cp != cs) && cp->partition_root_state) {
|
||||
new_prs = cp->partition_root_state;
|
||||
if ((cp != cs) && new_prs) {
|
||||
switch (parent->partition_root_state) {
|
||||
case PRS_DISABLED:
|
||||
/*
|
||||
* If parent is not a partition root or an
|
||||
* invalid partition root, clear the state
|
||||
* state and the CS_CPU_EXCLUSIVE flag.
|
||||
* invalid partition root, clear its state
|
||||
* and its CS_CPU_EXCLUSIVE flag.
|
||||
*/
|
||||
WARN_ON_ONCE(cp->partition_root_state
|
||||
!= PRS_ERROR);
|
||||
cp->partition_root_state = 0;
|
||||
new_prs = PRS_DISABLED;
|
||||
|
||||
/*
|
||||
* clear_bit() is an atomic operation and
|
||||
@@ -1415,11 +1422,7 @@ static void update_cpumasks_hier(struct cpuset *cs, struct tmpmasks *tmp)
|
||||
/*
|
||||
* When parent is invalid, it has to be too.
|
||||
*/
|
||||
cp->partition_root_state = PRS_ERROR;
|
||||
if (cp->nr_subparts_cpus) {
|
||||
cp->nr_subparts_cpus = 0;
|
||||
cpumask_clear(cp->subparts_cpus);
|
||||
}
|
||||
new_prs = PRS_ERROR;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1431,8 +1434,7 @@ static void update_cpumasks_hier(struct cpuset *cs, struct tmpmasks *tmp)
|
||||
spin_lock_irq(&callback_lock);
|
||||
|
||||
cpumask_copy(cp->effective_cpus, tmp->new_cpus);
|
||||
if (cp->nr_subparts_cpus &&
|
||||
(cp->partition_root_state != PRS_ENABLED)) {
|
||||
if (cp->nr_subparts_cpus && (new_prs != PRS_ENABLED)) {
|
||||
cp->nr_subparts_cpus = 0;
|
||||
cpumask_clear(cp->subparts_cpus);
|
||||
} else if (cp->nr_subparts_cpus) {
|
||||
@@ -1459,6 +1461,10 @@ static void update_cpumasks_hier(struct cpuset *cs, struct tmpmasks *tmp)
|
||||
= cpumask_weight(cp->subparts_cpus);
|
||||
}
|
||||
}
|
||||
|
||||
if (new_prs != cp->partition_root_state)
|
||||
cp->partition_root_state = new_prs;
|
||||
|
||||
spin_unlock_irq(&callback_lock);
|
||||
|
||||
WARN_ON(!is_in_v2_mode() &&
|
||||
@@ -1963,34 +1969,32 @@ out:
|
||||
|
||||
/*
|
||||
* update_prstate - update partititon_root_state
|
||||
* cs: the cpuset to update
|
||||
* val: 0 - disabled, 1 - enabled
|
||||
* cs: the cpuset to update
|
||||
* new_prs: new partition root state
|
||||
*
|
||||
* Call with cpuset_mutex held.
|
||||
*/
|
||||
static int update_prstate(struct cpuset *cs, int val)
|
||||
static int update_prstate(struct cpuset *cs, int new_prs)
|
||||
{
|
||||
int err;
|
||||
int err, old_prs = cs->partition_root_state;
|
||||
struct cpuset *parent = parent_cs(cs);
|
||||
struct tmpmasks tmp;
|
||||
struct tmpmasks tmpmask;
|
||||
|
||||
if ((val != 0) && (val != 1))
|
||||
return -EINVAL;
|
||||
if (val == cs->partition_root_state)
|
||||
if (old_prs == new_prs)
|
||||
return 0;
|
||||
|
||||
/*
|
||||
* Cannot force a partial or invalid partition root to a full
|
||||
* partition root.
|
||||
*/
|
||||
if (val && cs->partition_root_state)
|
||||
if (new_prs && (old_prs == PRS_ERROR))
|
||||
return -EINVAL;
|
||||
|
||||
if (alloc_cpumasks(NULL, &tmp))
|
||||
if (alloc_cpumasks(NULL, &tmpmask))
|
||||
return -ENOMEM;
|
||||
|
||||
err = -EINVAL;
|
||||
if (!cs->partition_root_state) {
|
||||
if (!old_prs) {
|
||||
/*
|
||||
* Turning on partition root requires setting the
|
||||
* CS_CPU_EXCLUSIVE bit implicitly as well and cpus_allowed
|
||||
@@ -2004,31 +2008,27 @@ static int update_prstate(struct cpuset *cs, int val)
|
||||
goto out;
|
||||
|
||||
err = update_parent_subparts_cpumask(cs, partcmd_enable,
|
||||
NULL, &tmp);
|
||||
NULL, &tmpmask);
|
||||
if (err) {
|
||||
update_flag(CS_CPU_EXCLUSIVE, cs, 0);
|
||||
goto out;
|
||||
}
|
||||
cs->partition_root_state = PRS_ENABLED;
|
||||
} else {
|
||||
/*
|
||||
* Turning off partition root will clear the
|
||||
* CS_CPU_EXCLUSIVE bit.
|
||||
*/
|
||||
if (cs->partition_root_state == PRS_ERROR) {
|
||||
cs->partition_root_state = 0;
|
||||
if (old_prs == PRS_ERROR) {
|
||||
update_flag(CS_CPU_EXCLUSIVE, cs, 0);
|
||||
err = 0;
|
||||
goto out;
|
||||
}
|
||||
|
||||
err = update_parent_subparts_cpumask(cs, partcmd_disable,
|
||||
NULL, &tmp);
|
||||
NULL, &tmpmask);
|
||||
if (err)
|
||||
goto out;
|
||||
|
||||
cs->partition_root_state = 0;
|
||||
|
||||
/* Turning off CS_CPU_EXCLUSIVE will not return error */
|
||||
update_flag(CS_CPU_EXCLUSIVE, cs, 0);
|
||||
}
|
||||
@@ -2041,11 +2041,17 @@ static int update_prstate(struct cpuset *cs, int val)
|
||||
update_tasks_cpumask(parent);
|
||||
|
||||
if (parent->child_ecpus_count)
|
||||
update_sibling_cpumasks(parent, cs, &tmp);
|
||||
update_sibling_cpumasks(parent, cs, &tmpmask);
|
||||
|
||||
rebuild_sched_domains_locked();
|
||||
out:
|
||||
free_cpumasks(NULL, &tmp);
|
||||
if (!err) {
|
||||
spin_lock_irq(&callback_lock);
|
||||
cs->partition_root_state = new_prs;
|
||||
spin_unlock_irq(&callback_lock);
|
||||
}
|
||||
|
||||
free_cpumasks(NULL, &tmpmask);
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -3088,7 +3094,7 @@ retry:
|
||||
goto retry;
|
||||
}
|
||||
|
||||
parent = parent_cs(cs);
|
||||
parent = parent_cs(cs);
|
||||
compute_effective_cpumask(&new_cpus, cs, parent);
|
||||
nodes_and(new_mems, cs->mems_allowed, parent->effective_mems);
|
||||
|
||||
@@ -3110,8 +3116,10 @@ retry:
|
||||
if (is_partition_root(cs) && (cpumask_empty(&new_cpus) ||
|
||||
(parent->partition_root_state == PRS_ERROR))) {
|
||||
if (cs->nr_subparts_cpus) {
|
||||
spin_lock_irq(&callback_lock);
|
||||
cs->nr_subparts_cpus = 0;
|
||||
cpumask_clear(cs->subparts_cpus);
|
||||
spin_unlock_irq(&callback_lock);
|
||||
compute_effective_cpumask(&new_cpus, cs, parent);
|
||||
}
|
||||
|
||||
@@ -3125,7 +3133,9 @@ retry:
|
||||
cpumask_empty(&new_cpus)) {
|
||||
update_parent_subparts_cpumask(cs, partcmd_disable,
|
||||
NULL, tmp);
|
||||
spin_lock_irq(&callback_lock);
|
||||
cs->partition_root_state = PRS_ERROR;
|
||||
spin_unlock_irq(&callback_lock);
|
||||
}
|
||||
cpuset_force_rebuild();
|
||||
}
|
||||
@@ -3196,6 +3206,13 @@ void cpuset_hotplug_workfn(struct work_struct *work)
|
||||
cpus_updated = !cpumask_equal(top_cpuset.effective_cpus, &new_cpus);
|
||||
mems_updated = !nodes_equal(top_cpuset.effective_mems, new_mems);
|
||||
|
||||
/*
|
||||
* In the rare case that hotplug removes all the cpus in subparts_cpus,
|
||||
* we assumed that cpus are updated.
|
||||
*/
|
||||
if (!cpus_updated && top_cpuset.nr_subparts_cpus)
|
||||
cpus_updated = true;
|
||||
|
||||
/* synchronize cpus_allowed to cpu_active_mask */
|
||||
if (cpus_updated) {
|
||||
spin_lock_irq(&callback_lock);
|
||||
|
Reference in New Issue
Block a user