5.10.231-rc1 review
Subsystems (3)
Greg Kroah-Hartman
maintainerPATCH 430/459 MIPS: Loongson64: DTS: Really fix PCIe port nodes for ls7a
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Xi Ruoyao <[email protected]>
[ Upstream commit 4fbd66d8254cedfd1218393f39d83b6c07a01917 ]
Fix the dtc warnings:
arch/mips/boot/dts/loongson/ls7a-pch.dtsi:68.16-416.5: Warning (interrupt_provider): /bus@10000000/pci@1a000000: '#interrupt-cells' found, but node is not an interrupt provider
arch/mips/boot/dts/loongson/ls7a-pch.dtsi:68.16-416.5: Warning (interrupt_provider): /bus@10000000/pci@1a000000: '#interrupt-cells' found, but node is not an interrupt provider
arch/mips/boot/dts/loongson/loongson64g_4core_ls7a.dtb: Warning (interrupt_map): Failed prerequisite 'interrupt_provider'And a runtime warning introduced in commit 045b14ca5c36 ("of: WARN on deprecated #address-cells/#size-cells handling"):
WARNING: CPU: 0 PID: 1 at drivers/of/base.c:106 of_bus_n_addr_cells+0x9c/0xe0
Missing '#address-cells' in /bus@10000000/pci@1a000000/pci_bridge@9,0The fix is similar to commit d89a415ff8d5 ("MIPS: Loongson64: DTS: Fix PCIe port nodes for ls7a"), which has fixed the issue for ls2k (despite its subject mentions ls7a).
--- arch/mips/boot/dts/loongson/ls7a-pch.dtsi | 73 +++++++++++++++++++---- 1 file changed, 60 insertions(+), 13 deletions(-)
arch/mips/boot/dts/loongson/ls7a-pch.dtsi +60 -13
@@ -63,7 +63,6 @@ pci@1a000000 { device_type = "pci"; #address-cells = <3>; #size-cells = <2>; - #interrupt-cells = <2>; msi-parent = <&msi>; reg = <0 0x1a000000 0 0x02000000>,
@@ -226,7 +225,7 @@ phy1: ethernet-phy@1 { }; }; - pci_bridge@9,0 { + pcie@9,0 { compatible = "pci0014,7a19.1", "pci0014,7a19", "pciclass060400",
@@ -236,12 +235,16 @@ pci_bridge@9,0 { interrupts = <32 IRQ_TYPE_LEVEL_HIGH>; interrupt-parent = <&pic>; + #address-cells = <3>; + #size-cells = <2>; + device_type = "pci"; #interrupt-cells = <1>; interrupt-map-mask = <0 0 0 0>; interrupt-map = <0 0 0 0 &pic 32 IRQ_TYPE_LEVEL_HIGH>; + ranges; }; - pci_bridge@a,0 { + pcie@a,0 { compatible = "pci0014,7a09.1", "pci0014,7a09", "pciclass060400",
@@ -251,12 +254,16 @@ pci_bridge@a,0 { interrupts = <33 IRQ_TYPE_LEVEL_HIGH>; interrupt-parent = <&pic>; + #address-cells = <3>; + #size-cells = <2>; + device_type = "pci"; #interrupt-cells = <1>; interrupt-map-mask = <0 0 0 0>; interrupt-map = <0 0 0 0 &pic 33 IRQ_TYPE_LEVEL_HIGH>; + ranges; }; - pci_bridge@b,0 { + pcie@b,0 { compatible = "pci0014,7a09.1", "pci0014,7a09", "pciclass060400",
@@ -266,12 +273,16 @@ pci_bridge@b,0 { interrupts = <34 IRQ_TYPE_LEVEL_HIGH>; interrupt-parent = <&pic>; + #address-cells = <3>; + #size-cells = <2>; + device_type = "pci"; #interrupt-cells = <1>; interrupt-map-mask = <0 0 0 0>; interrupt-map = <0 0 0 0 &pic 34 IRQ_TYPE_LEVEL_HIGH>; + ranges; }; - pci_bridge@c,0 { + pcie@c,0 { compatible = "pci0014,7a09.1", "pci0014,7a09", "pciclass060400",
@@ -281,12 +292,16 @@ pci_bridge@c,0 { interrupts = <35 IRQ_TYPE_LEVEL_HIGH>; interrupt-parent = <&pic>; + #address-cells = <3>; + #size-cells = <2>; + device_type = "pci"; #interrupt-cells = <1>; interrupt-map-mask = <0 0 0 0>; interrupt-map = <0 0 0 0 &pic 35 IRQ_TYPE_LEVEL_HIGH>; + ranges; }; - pci_bridge@d,0 { + pcie@d,0 { compatible = "pci0014,7a19.1", "pci0014,7a19", "pciclass060400",
@@ -296,12 +311,16 @@ pci_bridge@d,0 { interrupts = <36 IRQ_TYPE_LEVEL_HIGH>; interrupt-parent = <&pic>; + #address-cells = <3>; + #size-cells = <2>; + device_type = "pci"; #interrupt-cells = <1>; interrupt-map-mask = <0 0 0 0>; interrupt-map = <0 0 0 0 &pic 36 IRQ_TYPE_LEVEL_HIGH>; + ranges; }; - pci_bridge@e,0 { + pcie@e,0 { compatible = "pci0014,7a09.1", "pci0014,7a09", "pciclass060400",
@@ -311,12 +330,16 @@ pci_bridge@e,0 { interrupts = <37 IRQ_TYPE_LEVEL_HIGH>; interrupt-parent = <&pic>; + #address-cells = <3>; + #size-cells = <2>; + device_type = "pci"; #interrupt-cells = <1>; interrupt-map-mask = <0 0 0 0>; interrupt-map = <0 0 0 0 &pic 37 IRQ_TYPE_LEVEL_HIGH>; + ranges; }; - pci_bridge@f,0 { + pcie@f,0 { compatible = "pci0014,7a29.1", "pci0014,7a29", "pciclass060400",
@@ -326,12 +349,16 @@ pci_bridge@f,0 { interrupts = <40 IRQ_TYPE_LEVEL_HIGH>; interrupt-parent = <&pic>; + #address-cells = <3>; + #size-cells = <2>; + device_type = "pci"; #interrupt-cells = <1>; interrupt-map-mask = <0 0 0 0>; interrupt-map = <0 0 0 0 &pic 40 IRQ_TYPE_LEVEL_HIGH>; + ranges; }; - pci_bridge@10,0 { + pcie@10,0 { compatible = "pci0014,7a19.1", "pci0014,7a19", "pciclass060400",
@@ -341,12 +368,16 @@ pci_bridge@10,0 { interrupts = <41 IRQ_TYPE_LEVEL_HIGH>; interrupt-parent = <&pic>; + #address-cells = <3>; + #size-cells = <2>; + device_type = "pci"; #interrupt-cells = <1>; interrupt-map-mask = <0 0 0 0>; interrupt-map = <0 0 0 0 &pic 41 IRQ_TYPE_LEVEL_HIGH>; + ranges; }; - pci_bridge@11,0 { + pcie@11,0 { compatible = "pci0014,7a29.1", "pci0014,7a29", "pciclass060400",
@@ -356,12 +387,16 @@ pci_bridge@11,0 { interrupts = <42 IRQ_TYPE_LEVEL_HIGH>; interrupt-parent = <&pic>; + #address-cells = <3>; + #size-cells = <2>; + device_type = "pci"; #interrupt-cells = <1>; interrupt-map-mask = <0 0 0 0>; interrupt-map = <0 0 0 0 &pic 42 IRQ_TYPE_LEVEL_HIGH>; + ranges; }; - pci_bridge@12,0 { + pcie@12,0 { compatible = "pci0014,7a19.1", "pci0014,7a19", "pciclass060400",
@@ -371,12 +406,16 @@ pci_bridge@12,0 { interrupts = <43 IRQ_TYPE_LEVEL_HIGH>; interrupt-parent = <&pic>; + #address-cells = <3>; + #size-cells = <2>; + device_type = "pci"; #interrupt-cells = <1>; interrupt-map-mask = <0 0 0 0>; interrupt-map = <0 0 0 0 &pic 43 IRQ_TYPE_LEVEL_HIGH>; + ranges; }; - pci_bridge@13,0 { + pcie@13,0 { compatible = "pci0014,7a29.1", "pci0014,7a29", "pciclass060400",
@@ -386,12 +425,16 @@ pci_bridge@13,0 { interrupts = <38 IRQ_TYPE_LEVEL_HIGH>; interrupt-parent = <&pic>; + #address-cells = <3>; + #size-cells = <2>; + device_type = "pci"; #interrupt-cells = <1>; interrupt-map-mask = <0 0 0 0>; interrupt-map = <0 0 0 0 &pic 38 IRQ_TYPE_LEVEL_HIGH>; + ranges; }; - pci_bridge@14,0 { + pcie@14,0 { compatible = "pci0014,7a19.1", "pci0014,7a19", "pciclass060400",
@@ -401,9 +444,13 @@ pci_bridge@14,0 { interrupts = <39 IRQ_TYPE_LEVEL_HIGH>; interrupt-parent = <&pic>; + #address-cells = <3>; + #size-cells = <2>; + device_type = "pci"; #interrupt-cells = <1>; interrupt-map-mask = <0 0 0 0>; interrupt-map = <0 0 0 0 &pic 39 IRQ_TYPE_LEVEL_HIGH>; + ranges; }; };
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 431/459 powerpc/prom_init: Fixup missing powermac #size-cells
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Michael Ellerman <[email protected]>
[ Upstream commit cf89c9434af122f28a3552e6f9cc5158c33ce50a ]
On some powermacs escc nodes are missing #size-cells properties, which is deprecated and now triggers a warning at boot since commit 045b14ca5c36 ("of: WARN on deprecated #address-cells/#size-cells handling").
For example:
Missing '#size-cells' in /pci@f2000000/mac-io@c/escc@13000
WARNING: CPU: 0 PID: 0 at drivers/of/base.c:133 of_bus_n_size_cells+0x98/0x108
Hardware name: PowerMac3,1 7400 0xc0209 PowerMac
...
Call Trace:
of_bus_n_size_cells+0x98/0x108 (unreliable)
of_bus_default_count_cells+0x40/0x60
__of_get_address+0xc8/0x21c
__of_address_to_resource+0x5c/0x228
pmz_init_port+0x5c/0x2ec
pmz_probe.isra.0+0x144/0x1e4
pmz_console_init+0x10/0x48
console_init+0xcc/0x138
start_kernel+0x5c4/0x694As powermacs boot via prom_init it's possible to add the missing properties to the device tree during boot, avoiding the warning. Note that escc-legacy nodes are also missing #size-cells properties, but they are skipped by the macio driver, so leave them alone.
Depends-on: 045b14ca5c36 ("of: WARN on deprecated #address-cells/#size-cells handling")
--- arch/powerpc/kernel/prom_init.c | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-)
arch/powerpc/kernel/prom_init.c +27 -2
@@ -2894,7 +2894,7 @@ static void __init fixup_device_tree_chrp(void)#endif #if defined(CONFIG_PPC64 ) && defined(CONFIG_PPC_PMAC ) -static void __init fixup_device_tree_pmac (void ) +static void __init fixup_device_tree_pmac64 (void ) {phandle u3, i2c, mpic;u32 u3_rev;
@@ -2934,7 +2934,31 @@ static void __init fixup_device_tree_pmac(void) &parent, sizeof(parent)); }#else -#define fixup_device_tree_pmac () +#define fixup_device_tree_pmac64 () +#endif + +#ifdef CONFIG_PPC_PMAC +static void __init fixup_device_tree_pmac (void ) +{ +__be32 val =1 ; +char type[8 ]; +phandle node; + +// Some pmacs are missing #size-cells on escc nodes +for (node =0 ;prom_next_node (&node); ) { + type[0 ] ='\0' ; +prom_getprop (node,"device_type" , type,sizeof (type)); +if (prom_strcmp (type,"escc" )) +continue ; + +if (prom_getproplen (node,"#size-cells" ) !=PROM_ERROR ) +continue ; + +prom_setprop (node,NULL ,"#size-cells" , &val,sizeof (val)); + } +} +#else +static inline void fixup_device_tree_pmac (void ) { }#endif #ifdef CONFIG_PPC_EFIKA
@@ -3159,6 +3183,7 @@ static void __init fixup_device_tree(void)fixup_device_tree_maple_memory_controller ();fixup_device_tree_chrp ();fixup_device_tree_pmac (); +fixup_device_tree_pmac64 ();fixup_device_tree_efika ();fixup_device_tree_pasemi (); }
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 432/459 misc: eeprom: eeprom_93cx6: Add quirk for extra read clock cycle
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Parker Newman <[email protected]>
[ Upstream commit 7738a7ab9d12c5371ed97114ee2132d4512e9fd5 ]
Add a quirk similar to eeprom_93xx46 to add an extra clock cycle before reading data from the EEPROM.
The 93Cx6 family of EEPROMs output a "dummy 0 bit" between the writing of the op-code/address from the host to the EEPROM and the reading of the actual data from the EEPROM.
More info can be found on page 6 of the AT93C46 datasheet (linked below). Similar notes are found in other 93xx6 datasheets.
In summary the read operation for a 93Cx6 EEPROM is:
Write to EEPROM: 110[A5-A0] (9 bits)
Read from EEPROM: 0[D15-D0] (17 bits)
Where:
110 is the start bit and READ OpCode [A5-A0] is the address to read from 0 is a "dummy bit" preceding the actual data [D15-D0] is the actual data.
Looking at the READ timing diagrams in the 93Cx6 datasheets the dummy bit should be clocked out on the last address bit clock cycle meaning it should be discarded naturally.
However, depending on the hardware configuration sometimes this dummy bit is not discarded. This is the case with Exar PCI UARTs which require an extra clock cycle between sending the address and reading the data.
Datasheet: https://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-5193-SEEPROM-AT93C46D-Datasheet.pdf
--- drivers/misc/eeprom/eeprom_93cx6.c | 10 ++++++++++ include/linux/eeprom_93cx6.h | 11 +++++++++++ 2 files changed, 21 insertions(+)
drivers/misc/eeprom/eeprom_93cx6.c +10 -0
@@ -186,6 +186,11 @@ void eeprom_93cx6_read(struct eeprom_93cx6 *eeprom, const u8 word,eeprom_93cx6_write_bits (eeprom, command,PCI_EEPROM_WIDTH_OPCODE + eeprom->width); +if (has_quirk_extra_read_cycle (eeprom)) { +eeprom_93cx6_pulse_high (eeprom); +eeprom_93cx6_pulse_low (eeprom); + } +/* * Read the requested 16 bits. */
@@ -252,6 +257,11 @@ void eeprom_93cx6_readb(struct eeprom_93cx6 *eeprom, const u8 byte,eeprom_93cx6_write_bits (eeprom, command,PCI_EEPROM_WIDTH_OPCODE + eeprom->width +1 ); +if (has_quirk_extra_read_cycle (eeprom)) { +eeprom_93cx6_pulse_high (eeprom); +eeprom_93cx6_pulse_low (eeprom); + } +/* * Read the requested 8 bits. */
include/linux/eeprom_93cx6.h +11 -0
@@ -11,6 +11,8 @@Supported chipsets: 93c46, 93c56 and 93c66. */ +#include <linux/bits.h> +/* * EEPROM operation defines. */
@@ -34,6 +36,7 @@* @register_write(struct eeprom_93cx6 *eeprom): handler to * write to the eeprom register by using all reg_* fields. * @width: eeprom width, should be one of the PCI_EEPROM_WIDTH_* defines +* @quirks: eeprom or controller quirks * @drive_data: Set if we're driving the data line. * @reg_data_in: register field to indicate data input * @reg_data_out: register field to indicate data output
@@ -50,6 +53,9 @@ struct eeprom_93cx6 {void (*register_write)(struct eeprom_93cx6 *eeprom);int width; +unsigned int quirks; +/* Some EEPROMs require an extra clock cycle before reading */ +#define PCI_EEPROM_QUIRK_EXTRA_READ_CYCLE BIT(0)char drive_data;char reg_data_in;
@@ -71,3 +77,8 @@ extern void eeprom_93cx6_wren(struct eeprom_93cx6 *eeprom, bool enable);extern void eeprom_93cx6_write (struct eeprom_93cx6 *eeprom,u8 addr,u16 data); + +static inline bool has_quirk_extra_read_cycle (struct eeprom_93cx6 *eeprom) +{ +return eeprom->quirks &PCI_EEPROM_QUIRK_EXTRA_READ_CYCLE ; +}
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 433/459 sched/core: Remove the unnecessary need_resched() check in nohz_csd_func()
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: K Prateek Nayak <[email protected]>
[ Upstream commit ea9cffc0a154124821531991d5afdd7e8b20d7aa ]
The need_resched() check currently in nohz_csd_func() can be tracked to have been added in scheduler_ipi() back in 2011 via commit ca38062e57e9 ("sched: Use resched IPI to kick off the nohz idle balance")
Since then, it has travelled quite a bit but it seems like an idle_cpu() check currently is sufficient to detect the need to bail out from an idle load balancing. To justify this removal, consider all the following case where an idle load balancing could race with a task wakeup:
o Since commit f3dd3f674555b ("sched: Remove the limitation of WF_ON_CPU on wakelist if wakee cpu is idle") a target perceived to be idle (target_rq->nr_running == 0) will return true for ttwu_queue_cond(target) which will offload the task wakeup to the idle target via an IPI.
In all such cases target_rq->ttwu_pending will be set to 1 before queuing the wake function.
If an idle load balance races here, following scenarios are possible:
- The CPU is not in TIF_POLLING_NRFLAG mode in which case an actual IPI is sent to the CPU to wake it out of idle. If the nohz_csd_func() queues before sched_ttwu_pending(), the idle load balance will bail out since idle_cpu(target) returns 0 since target_rq->ttwu_pending is 1. If the nohz_csd_func() is queued after sched_ttwu_pending() it should see rq->nr_running to be non-zero and bail out of idle load balancing.
- The CPU is in TIF_POLLING_NRFLAG mode and instead of an actual IPI, the sender will simply set TIF_NEED_RESCHED for the target to put it out of idle and flush_smp_call_function_queue() in do_idle() will execute the call function. Depending on the ordering of the queuing of nohz_csd_func() and sched_ttwu_pending(), the idle_cpu() check in nohz_csd_func() should either see target_rq->ttwu_pending = 1 or target_rq->nr_running to be non-zero if there is a genuine task wakeup racing with the idle load balance kick.
o The waker CPU perceives the target CPU to be busy (targer_rq->nr_running != 0) but the CPU is in fact going idle and due to a series of unfortunate events, the system reaches a case where the waker CPU decides to perform the wakeup by itself in ttwu_queue() on the target CPU but target is concurrently selected for idle load balance (XXX: Can this happen? I'm not sure, but we'll consider the mother of all coincidences to estimate the worst case scenario).
ttwu_do_activate() calls enqueue_task() which would increment "rq->nr_running" post which it calls wakeup_preempt() which is responsible for setting TIF_NEED_RESCHED (via a resched IPI or by setting TIF_NEED_RESCHED on a TIF_POLLING_NRFLAG idle CPU) The key thing to note in this case is that rq->nr_running is already non-zero in case of a wakeup before TIF_NEED_RESCHED is set which would lead to idle_cpu() check returning false.
In all cases, it seems that need_resched() check is unnecessary when checking for idle_cpu() first since an impending wakeup racing with idle load balancer will either set the "rq->ttwu_pending" or indicate a newly woken task via "rq->nr_running".
Chasing the reason why this check might have existed in the first place, I came across Peter's suggestion on the fist iteration of Suresh's patch from 2011 [1] where the condition to raise the SCHED_SOFTIRQ was:
sched_ttwu_do_pending(list); if (unlikely((rq->idle == current) && rq->nohz_balance_kick && !need_resched())) raise_softirq_irqoff(SCHED_SOFTIRQ);
Since the condition to raise the SCHED_SOFIRQ was preceded by sched_ttwu_do_pending() (which is equivalent of sched_ttwu_pending()) in the current upstream kernel, the need_resched() check was necessary to catch a newly queued task. Peter suggested modifying it to:
if (idle_cpu() && rq->nohz_balance_kick && !need_resched()) raise_softirq_irqoff(SCHED_SOFTIRQ);
where idle_cpu() seems to have replaced "rq->idle == current" check.
Even back then, the idle_cpu() check would have been sufficient to catch a new task being enqueued. Since commit b2a02fc43a1f ("smp: Optimize send_call_function_single_ipi()") overloads the interpretation of TIF_NEED_RESCHED for TIF_POLLING_NRFLAG idling, remove the need_resched() check in nohz_csd_func() to raise SCHED_SOFTIRQ based on Peter's suggestion.
--- kernel/sched/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/sched/core.c +1 -1
@@ -750,7 +750,7 @@ static void nohz_csd_func(void *info)WARN_ON (!(flags &NOHZ_KICK_MASK )); rq->idle_balance =idle_cpu (cpu); -if (rq->idle_balance && !need_resched ()) { +if (rq->idle_balance) { rq->nohz_idle_balance = flags;raise_softirq_irqoff (SCHED_SOFTIRQ ); }
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 434/459 sched/fair: Remove update of blocked load from newidle_balance
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Vincent Guittot <[email protected]>
[ Upstream commit 0826530de3cbdc89e60a89e86def94a5f0fc81ca ]
newidle_balance runs with both preempt and irq disabled which prevent local irq to run during this period. The duration for updating the blocked load of CPUs varies according to the number of CPU cgroups with non-decayed load and extends this critical period to an uncontrolled level.
Remove the update from newidle_balance and trigger a normal ILB that will take care of the update instead.
This reduces the IRQ latency from O(nr_cgroups * nr_nohz_cpus) to O(nr_cgroups).
Stable-dep-of: ff47a0acfcce ("sched/fair: Check idle_cpu() before need_resched() to detect ilb CPU turning busy")
--- kernel/sched/fair.c | 33 +++++---------------------------- 1 file changed, 5 insertions(+), 28 deletions(-)
kernel/sched/fair.c +5 -28
@@ -7621,8 +7621,6 @@ enum migration_type {#define LBF_NEED_BREAK 0x02#define LBF_DST_PINNED 0x04#define LBF_SOME_PINNED 0x08 -#define LBF_NOHZ_STATS 0x10 -#define LBF_NOHZ_AGAIN 0x20struct lb_env {struct sched_domain *sd;
@@ -8695,9 +8693,6 @@ static inline void update_sg_lb_stats(struct lb_env *env,for_each_cpu_and (i,sched_group_span (group), env->cpus) {struct rq *rq =cpu_rq (i); -if ((env->flags &LBF_NOHZ_STATS ) &&update_nohz_stats (rq, false)) - env->flags |=LBF_NOHZ_AGAIN ; - sgs->group_load +=cpu_load (rq); sgs->group_util +=cpu_util (i); sgs->group_runnable +=cpu_runnable (rq);
@@ -9230,11 +9225,6 @@ static inline void update_sd_lb_stats(struct lb_env *env, struct sd_lb_stats *sdstruct sg_lb_stats tmp_sgs;int sg_status =0 ; -#ifdef CONFIG_NO_HZ_COMMON -if (env->idle ==CPU_NEWLY_IDLE &&READ_ONCE (nohz.has_blocked)) - env->flags |=LBF_NOHZ_STATS ; -#endif - do { struct sg_lb_stats *sgs = &tmp_sgs; int local_group;
@@ -9271,14 +9261,6 @@ static inline void update_sd_lb_stats(struct lb_env *env, struct sd_lb_stats *sd/* Tag domain that child domain prefers tasks go to siblings first */ sds->prefer_sibling = child && child->flags &SD_PREFER_SIBLING ; -#ifdef CONFIG_NO_HZ_COMMON -if ((env->flags &LBF_NOHZ_AGAIN ) && -cpumask_subset (nohz.idle_cpus_mask,sched_domain_span (env->sd))) { - -WRITE_ONCE (nohz.next_blocked, - jiffies +msecs_to_jiffies (LOAD_AVG_PERIOD )); - } -#endif if (env->sd->flags &SD_NUMA ) env->fbq_type =fbq_classify_group (&sds->busiest_stat);
@@ -10803,16 +10785,11 @@ static void nohz_newidle_balance(struct rq *this_rq) time_before(jiffies, READ_ONCE(nohz.next_blocked))) return; -raw_spin_unlock (&this_rq->lock);/* -* This CPU is going to be idle and blocked load of idle CPUs -* need to be updated. Run the ilb locally as it is a good -* candidate for ilb instead of waking up another idle CPU. -* Kick an normal ilb if we failed to do the update. +* Blocked load of idle CPUs need to be updated. +* Kick an ILB to update statistics. */ -if (!_nohz_idle_balance (this_rq,NOHZ_STATS_KICK ,CPU_NEWLY_IDLE )) -kick_ilb (NOHZ_STATS_KICK ); - raw_spin_lock(&this_rq->lock); + kick_ilb(NOHZ_STATS_KICK); }#else /* !CONFIG_NO_HZ_COMMON */
@@ -10873,8 +10850,6 @@ static int newidle_balance(struct rq *this_rq, struct rq_flags *rf)update_next_balance (sd, &next_balance);rcu_read_unlock (); -nohz_newidle_balance (this_rq); - goto out; }
@@ -10940,6 +10915,8 @@ static int newidle_balance(struct rq *this_rq, struct rq_flags *rf)if (pulled_task) this_rq->idle_stamp =0 ; +else +nohz_newidle_balance (this_rq);rq_repin_lock (this_rq, rf);
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 435/459 sched/fair: Remove unused parameter of update_nohz_stats
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Vincent Guittot <[email protected]>
[ Upstream commit 64f84f273592d17dcdca20244168ad9f525a39c3 ]
idle load balance is the only user of update_nohz_stats and doesn't use force parameter. Remove it
Stable-dep-of: ff47a0acfcce ("sched/fair: Check idle_cpu() before need_resched() to detect ilb CPU turning busy")
--- kernel/sched/fair.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
kernel/sched/fair.c +3 -3
@@ -8650,7 +8650,7 @@ group_type group_classify(unsigned int imbalance_pct,return group_has_spare; } -static bool update_nohz_stats (struct rq *rq,bool force) +static bool update_nohz_stats (struct rq *rq) {#ifdef CONFIG_NO_HZ_COMMON unsigned int cpu = rq->cpu;
@@ -8661,7 +8661,7 @@ static bool update_nohz_stats(struct rq *rq, bool force)if (!cpumask_test_cpu (cpu, nohz.idle_cpus_mask))return false; -if (!force && !time_after (jiffies, rq->last_blocked_load_update_tick)) +if (!time_after (jiffies, rq->last_blocked_load_update_tick))return true;update_blocked_averages (cpu);
@@ -10690,7 +10690,7 @@ static bool _nohz_idle_balance(struct rq *this_rq, unsigned int flags, rq =cpu_rq (balance_cpu); - has_blocked_load |=update_nohz_stats (rq, true); + has_blocked_load |=update_nohz_stats (rq);/* * If time for next balance is due,
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 436/459 sched/fair: Merge for each idle cpu loop of ILB
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Vincent Guittot <[email protected]>
[ Upstream commit 7a82e5f52a3506bc35a4dc04d53ad2c9daf82e7f ]
Remove the specific case for handling this_cpu outside for_each_cpu() loop when running ILB. Instead we use for_each_cpu_wrap() and start with the next cpu after this_cpu so we will continue to finish with this_cpu.
update_nohz_stats() is now used for this_cpu too and will prevents unnecessary update. We don't need a special case for handling the update of nohz.next_balance for this_cpu anymore because it is now handled by the loop like others.
Stable-dep-of: ff47a0acfcce ("sched/fair: Check idle_cpu() before need_resched() to detect ilb CPU turning busy")
--- kernel/sched/fair.c | 32 +++++++------------------------- 1 file changed, 7 insertions(+), 25 deletions(-)
kernel/sched/fair.c +7 -25
@@ -10333,22 +10333,9 @@ static void rebalance_domains(struct rq *rq, enum cpu_idle_type idle)* When the cpu is attached to null domain for ex, it will not be * updated. */ -if (likely (update_next_balance)) { +if (likely (update_next_balance)) rq->next_balance = next_balance; -#ifdef CONFIG_NO_HZ_COMMON -/* -* If this CPU has been elected to perform the nohz idle -* balance. Other idle CPUs have already rebalanced with -* nohz_idle_balance() and nohz.next_balance has been -* updated accordingly. This CPU is now running the idle load -* balance for itself and we need to update the -* nohz.next_balance accordingly. -*/ -if ((idle ==CPU_IDLE ) &&time_after (nohz.next_balance, rq->next_balance)) - nohz.next_balance = rq->next_balance; -#endif - } }static inline int on_null_domain (struct rq *rq)
@@ -10674,8 +10661,12 @@ static bool _nohz_idle_balance(struct rq *this_rq, unsigned int flags,*/ smp_mb (); -for_each_cpu (balance_cpu, nohz.idle_cpus_mask) { -if (balance_cpu == this_cpu || !idle_cpu (balance_cpu)) +/* +* Start with the next CPU after this_cpu so we will end with this_cpu and let a +* chance for other idle cpu to pull load. +*/ +for_each_cpu_wrap (balance_cpu, nohz.idle_cpus_mask, this_cpu+1 ) { +if (!idle_cpu (balance_cpu))continue ;/*
@@ -10721,15 +10712,6 @@ static bool _nohz_idle_balance(struct rq *this_rq, unsigned int flags,if (likely (update_next_balance)) nohz.next_balance = next_balance; -/* Newly idle CPU doesn't need an update */ -if (idle !=CPU_NEWLY_IDLE ) { -update_blocked_averages (this_cpu); - has_blocked_load |= this_rq->has_blocked_load; - } - -if (flags &NOHZ_BALANCE_KICK ) -rebalance_domains (this_rq,CPU_IDLE ); -WRITE_ONCE (nohz.next_blocked, now +msecs_to_jiffies (LOAD_AVG_PERIOD ));
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 437/459 sched/fair: Trigger the update of blocked load on newly idle cpu
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Vincent Guittot <[email protected]>
[ Upstream commit c6f886546cb8a38617cdbe755fe50d3acd2463e4 ]
Instead of waking up a random and already idle CPU, we can take advantage of this_cpu being about to enter idle to run the ILB and update the blocked load.
Stable-dep-of: ff47a0acfcce ("sched/fair: Check idle_cpu() before need_resched() to detect ilb CPU turning busy")
--- kernel/sched/core.c | 2 +- kernel/sched/fair.c | 24 +++++++++++++++++++++--- kernel/sched/idle.c | 6 ++++++ kernel/sched/sched.h | 7 +++++++ 4 files changed, 35 insertions(+), 4 deletions(-)
kernel/sched/core.c +1 -1
@@ -746,7 +746,7 @@ static void nohz_csd_func(void *info)/* * Release the rq::nohz_csd. */ - flags =atomic_fetch_andnot (NOHZ_KICK_MASK ,nohz_flags (cpu)); + flags =atomic_fetch_andnot (NOHZ_KICK_MASK |NOHZ_NEWILB_KICK ,nohz_flags (cpu));WARN_ON (!(flags &NOHZ_KICK_MASK )); rq->idle_balance =idle_cpu (cpu);
kernel/sched/fair.c +21 -3
@@ -10747,6 +10747,24 @@ static bool nohz_idle_balance(struct rq *this_rq, enum cpu_idle_type idle)return true; } +/* +* Check if we need to run the ILB for updating blocked load before entering +* idle state. +*/ +void nohz_run_idle_balance (int cpu) +{ +unsigned int flags; + + flags =atomic_fetch_andnot (NOHZ_NEWILB_KICK ,nohz_flags (cpu)); + +/* +* Update the blocked load only if no SCHED_SOFTIRQ is about to happen +* (ie NOHZ_STATS_KICK set) and will do the same. +*/ +if ((flags ==NOHZ_NEWILB_KICK ) && !need_resched ()) +_nohz_idle_balance (cpu_rq (cpu),NOHZ_STATS_KICK ,CPU_IDLE ); +} +static void nohz_newidle_balance (struct rq *this_rq) {int this_cpu = this_rq->cpu;
@@ -10768,10 +10786,10 @@ static void nohz_newidle_balance(struct rq *this_rq)return ;/* -* Blocked load of idle CPUs need to be updated. -* Kick an ILB to update statistics. +* Set the need to trigger ILB in order to update blocked load +* before entering idle state. */ - kick_ilb(NOHZ_STATS_KICK); + atomic_or(NOHZ_NEWILB_KICK, nohz_flags(this_cpu)); }#else /* !CONFIG_NO_HZ_COMMON */
kernel/sched/idle.c +6 -0
@@ -261,6 +261,12 @@ static void cpuidle_idle_call(void)static void do_idle (void ) {int cpu =smp_processor_id (); + +/* +* Check if we need to update blocked load +*/ +nohz_run_idle_balance (cpu); +/* * If the arch has a polling bit, we maintain an invariant: *
kernel/sched/sched.h +7 -0
@@ -2292,9 +2292,11 @@ extern void cfs_bandwidth_usage_dec(void);#ifdef CONFIG_NO_HZ_COMMON #define NOHZ_BALANCE_KICK_BIT 0#define NOHZ_STATS_KICK_BIT 1 +#define NOHZ_NEWILB_KICK_BIT 2#define NOHZ_BALANCE_KICK BIT(NOHZ_BALANCE_KICK_BIT)#define NOHZ_STATS_KICK BIT(NOHZ_STATS_KICK_BIT) +#define NOHZ_NEWILB_KICK BIT(NOHZ_NEWILB_KICK_BIT)#define NOHZ_KICK_MASK (NOHZ_BALANCE_KICK | NOHZ_STATS_KICK)
@@ -2305,6 +2307,11 @@ extern void nohz_balance_exit_idle(struct rq *rq);static inline void nohz_balance_exit_idle (struct rq *rq) { }#endif +#if defined(CONFIG_SMP ) && defined(CONFIG_NO_HZ_COMMON ) +extern void nohz_run_idle_balance (int cpu); +#else +static inline void nohz_run_idle_balance (int cpu) { } +#endif #ifdef CONFIG_SMP static inline
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 438/459 sched/fair: Add NOHZ balancer flag for nohz.next_balance updates
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Valentin Schneider <[email protected]>
[ Upstream commit efd984c481abb516fab8bafb25bf41fd9397a43c ]
A following patch will trigger NOHZ idle balances as a means to update nohz.next_balance. Vincent noted that blocked load updates can have non-negligible overhead, which should be avoided if the intent is to only update nohz.next_balance.
Add a new NOHZ balance kick flag, NOHZ_NEXT_KICK. Gate NOHZ blocked load update by the presence of NOHZ_STATS_KICK - currently all NOHZ balance kicks will have the NOHZ_STATS_KICK flag set, so no change in behaviour is expected.
Stable-dep-of: ff47a0acfcce ("sched/fair: Check idle_cpu() before need_resched() to detect ilb CPU turning busy")
--- kernel/sched/fair.c | 24 ++++++++++++++---------- kernel/sched/sched.h | 8 +++++++- 2 files changed, 21 insertions(+), 11 deletions(-)
kernel/sched/fair.c +14 -10
@@ -10438,7 +10438,7 @@ static void nohz_balancer_kick(struct rq *rq) goto out;if (rq->nr_running >=2 ) { - flags =NOHZ_KICK_MASK ; + flags =NOHZ_STATS_KICK |NOHZ_BALANCE_KICK ; goto out; }
@@ -10452,7 +10452,7 @@ static void nohz_balancer_kick(struct rq *rq)* on. */ if (rq->cfs.h_nr_running >=1 &&check_cpu_capacity (rq, sd)) { - flags =NOHZ_KICK_MASK ; + flags =NOHZ_STATS_KICK |NOHZ_BALANCE_KICK ; goto unlock; } }
@@ -10466,7 +10466,7 @@ static void nohz_balancer_kick(struct rq *rq)*/ for_each_cpu_and (i,sched_domain_span (sd), nohz.idle_cpus_mask) {if (sched_asym_prefer (i, cpu)) { - flags =NOHZ_KICK_MASK ; + flags =NOHZ_STATS_KICK |NOHZ_BALANCE_KICK ; goto unlock; } }
@@ -10479,7 +10479,7 @@ static void nohz_balancer_kick(struct rq *rq)* to run the misfit task on. */ if (check_misfit_status (rq, sd)) { - flags =NOHZ_KICK_MASK ; + flags =NOHZ_STATS_KICK |NOHZ_BALANCE_KICK ; goto unlock; }
@@ -10506,7 +10506,7 @@ static void nohz_balancer_kick(struct rq *rq)*/ nr_busy =atomic_read (&sds->nr_busy_cpus);if (nr_busy >1 ) { - flags =NOHZ_KICK_MASK ; + flags =NOHZ_STATS_KICK |NOHZ_BALANCE_KICK ; goto unlock; } }
@@ -10653,7 +10653,8 @@ static bool _nohz_idle_balance(struct rq *this_rq, unsigned int flags,* setting the flag, we are sure to not clear the state and not * check the load of an idle cpu. */ -WRITE_ONCE (nohz.has_blocked,0 ); +if (flags &NOHZ_STATS_KICK ) +WRITE_ONCE (nohz.has_blocked,0 );/* * Ensures that if we miss the CPU, we must see the has_blocked
@@ -10675,13 +10676,15 @@ static bool _nohz_idle_balance(struct rq *this_rq, unsigned int flags,* balancing owner will pick it up. */ if (need_resched ()) { - has_blocked_load = true; +if (flags &NOHZ_STATS_KICK ) + has_blocked_load = true; goto abort; } rq =cpu_rq (balance_cpu); - has_blocked_load |=update_nohz_stats (rq); +if (flags &NOHZ_STATS_KICK ) + has_blocked_load |=update_nohz_stats (rq);/* * If time for next balance is due,
@@ -10712,8 +10715,9 @@ static bool _nohz_idle_balance(struct rq *this_rq, unsigned int flags,if (likely (update_next_balance)) nohz.next_balance = next_balance; -WRITE_ONCE (nohz.next_blocked, - now +msecs_to_jiffies (LOAD_AVG_PERIOD )); +if (flags &NOHZ_STATS_KICK ) +WRITE_ONCE (nohz.next_blocked, + now +msecs_to_jiffies (LOAD_AVG_PERIOD ));/* The full idle balance loop has been done */ ret = true;
kernel/sched/sched.h +7 -1
@@ -2293,12 +2293,18 @@ extern void cfs_bandwidth_usage_dec(void);#define NOHZ_BALANCE_KICK_BIT 0#define NOHZ_STATS_KICK_BIT 1#define NOHZ_NEWILB_KICK_BIT 2 +#define NOHZ_NEXT_KICK_BIT 3 +/* Run rebalance_domains() */ #define NOHZ_BALANCE_KICK BIT(NOHZ_BALANCE_KICK_BIT) +/* Update blocked load */ #define NOHZ_STATS_KICK BIT(NOHZ_STATS_KICK_BIT) +/* Update blocked load when entering idle */ #define NOHZ_NEWILB_KICK BIT(NOHZ_NEWILB_KICK_BIT) +/* Update nohz.next_balance */ +#define NOHZ_NEXT_KICK BIT(NOHZ_NEXT_KICK_BIT) -#define NOHZ_KICK_MASK (NOHZ_BALANCE_KICK | NOHZ_STATS_KICK) +#define NOHZ_KICK_MASK (NOHZ_BALANCE_KICK | NOHZ_STATS_KICK | NOHZ_NEXT_KICK)#define nohz_flags (cpu) (&cpu_rq(cpu)->nohz_flags)
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 439/459 sched/fair: Check idle_cpu() before need_resched() to detect ilb CPU turning busy
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: K Prateek Nayak <[email protected]>
[ Upstream commit ff47a0acfcce309cf9e175149c75614491953c8f ]
Commit b2a02fc43a1f ("smp: Optimize send_call_function_single_ipi()") optimizes IPIs to idle CPUs in TIF_POLLING_NRFLAG mode by setting the TIF_NEED_RESCHED flag in idle task's thread info and relying on flush_smp_call_function_queue() in idle exit path to run the call-function. A softirq raised by the call-function is handled shortly after in do_softirq_post_smp_call_flush() but the TIF_NEED_RESCHED flag remains set and is only cleared later when schedule_idle() calls __schedule().
need_resched() check in _nohz_idle_balance() exists to bail out of load balancing if another task has woken up on the CPU currently in-charge of idle load balancing which is being processed in SCHED_SOFTIRQ context. Since the optimization mentioned above overloads the interpretation of TIF_NEED_RESCHED, check for idle_cpu() before going with the existing need_resched() check which can catch a genuine task wakeup on an idle CPU processing SCHED_SOFTIRQ from do_softirq_post_smp_call_flush(), as well as the case where ksoftirqd needs to be preempted as a result of new task wakeup or slice expiry.
In case of PREEMPT_RT or threadirqs, although the idle load balancing may be inhibited in some cases on the ilb CPU, the fact that ksoftirqd is the only fair task going back to sleep will trigger a newidle balance on the CPU which will alleviate some imbalance if it exists if idle balance fails to do so.
--- kernel/sched/fair.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/sched/fair.c +1 -1
@@ -10675,7 +10675,7 @@ static bool _nohz_idle_balance(struct rq *this_rq, unsigned int flags,* work being done for other CPUs. Next load * balancing owner will pick it up. */ -if (need_resched ()) { +if (!idle_cpu (this_cpu) &&need_resched ()) {if (flags &NOHZ_STATS_KICK ) has_blocked_load = true; goto abort;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 440/459 sched/core: Prevent wakeup of ksoftirqd during idle load balance
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: K Prateek Nayak <[email protected]>
[ Upstream commit e932c4ab38f072ce5894b2851fea8bc5754bb8e5 ]
Scheduler raises a SCHED_SOFTIRQ to trigger a load balancing event on from the IPI handler on the idle CPU. If the SMP function is invoked from an idle CPU via flush_smp_call_function_queue() then the HARD-IRQ flag is not set and raise_softirq_irqoff() needlessly wakes ksoftirqd because soft interrupts are handled before ksoftirqd get on the CPU.
Adding a trace_printk() in nohz_csd_func() at the spot of raising SCHED_SOFTIRQ and enabling trace events for sched_switch, sched_wakeup, and softirq_entry (for SCHED_SOFTIRQ vector alone) helps observing the current behavior:
<idle>-0 [000] dN.1.: nohz_csd_func: Raising SCHED_SOFTIRQ from nohz_csd_func
<idle>-0 [000] dN.4.: sched_wakeup: comm=ksoftirqd/0 pid=16 prio=120 target_cpu=000
<idle>-0 [000] .Ns1.: softirq_entry: vec=7 [action=SCHED]
<idle>-0 [000] .Ns1.: softirq_exit: vec=7 [action=SCHED]
<idle>-0 [000] d..2.: sched_switch: prev_comm=swapper/0 prev_pid=0 prev_prio=120 prev_state=R ==> next_comm=ksoftirqd/0 next_pid=16 next_prio=120
ksoftirqd/0-16 [000] d..2.: sched_switch: prev_comm=ksoftirqd/0 prev_pid=16 prev_prio=120 prev_state=S ==> next_comm=swapper/0 next_pid=0 next_prio=120
...Use __raise_softirq_irqoff() to raise the softirq. The SMP function call is always invoked on the requested CPU in an interrupt handler. It is guaranteed that soft interrupts are handled at the end.
Following are the observations with the changes when enabling the same set of events:
<idle>-0 [000] dN.1.: nohz_csd_func: Raising SCHED_SOFTIRQ for nohz_idle_balance
<idle>-0 [000] dN.1.: softirq_raise: vec=7 [action=SCHED]
<idle>-0 [000] .Ns1.: softirq_entry: vec=7 [action=SCHED]No unnecessary ksoftirqd wakeups are seen from idle task's context to service the softirq.
--- kernel/sched/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/sched/core.c +1 -1
@@ -752,7 +752,7 @@ static void nohz_csd_func(void *info) rq->idle_balance =idle_cpu (cpu);if (rq->idle_balance) { rq->nohz_idle_balance = flags; -raise_softirq_irqoff (SCHED_SOFTIRQ ); +__raise_softirq_irqoff (SCHED_SOFTIRQ ); } }
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 441/459 btrfs: fix missing snapshot drew unlock when root is dead during swap activation
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Filipe Manana <[email protected]>
[ Upstream commit 9c803c474c6c002d8ade68ebe99026cc39c37f85 ]
When activating a swap file we acquire the root's snapshot drew lock and then check if the root is dead, failing and returning with -EPERM if it's dead but without unlocking the root's snapshot lock. Fix this by adding the missing unlock.
--- fs/btrfs/inode.c | 1 + 1 file changed, 1 insertion(+)
fs/btrfs/inode.c +1 -0
@@ -10283,6 +10283,7 @@ static int btrfs_swap_activate(struct swap_info_struct *sis, struct file *file,if (btrfs_root_dead (root)) {spin_unlock (&root->root_item_lock); +btrfs_drew_write_unlock (&root->snapshot_lock);btrfs_exclop_finish (fs_info); btrfs_warn(fs_info, "cannot activate swapfile because subvolume %llu is being deleted",
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 442/459 Revert "unicode: Dont special case ignorable code points"
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Linus Torvalds <[email protected]>
commit 231825b2e1ff6ba799c5eaf396d3ab2354e37c6b upstream.
This reverts commit 5c26d2f1d3f5e4be3e196526bead29ecb139cf91.
It turns out that we can't do this, because while the old behavior of ignoring ignorable code points was most definitely wrong, we have case-folding filesystems with on-disk hash values with that wrong behavior.
So now you can't look up those names, because they hash to something different.
Of course, it's also entirely possible that in the meantime people have created *new* files with the new ("more correct") case folding logic, and reverting will just make other things break.
The correct solution is to not do case folding in filesystems, but sadly, people seem to never really understand that. People still see it as a feature, not a bug.
--- fs/unicode/mkutf8data.c | 70 fs/unicode/utf8data.h_shipped | 6703 +++++++++++++++++++++--------------------- 2 files changed, 3427 insertions(+), 3346 deletions(-)
fs/unicode/mkutf8data.c +70 -0
@@ -2230,6 +2230,75 @@ static void nfdicf_init(void)file_fail (fold_name); } +static void ignore_init (void ) +{ +FILE *file; +unsigned int unichar; +unsigned int first; +unsigned int last; +unsigned int *um; +int count; +int ret; + +if (verbose >0 ) +printf ("Parsing %s\n" , prop_name); + file =fopen (prop_name,"r" ); +if (!file) +open_fail (prop_name, errno); +assert (file); + count =0 ; +while (fgets (line,LINESIZE , file)) { + ret =sscanf (line,"%X..%X ; %s # " , &first, &last, buf0); +if (ret ==3 ) { +if (strcmp (buf0,"Default_Ignorable_Code_Point" )) +continue ; +if (!utf32valid (first) || !utf32valid (last)) +line_fail (prop_name, line); +for (unichar = first; unichar <= last; unichar++) { +free (unicode_data[unichar].utf32nfdi); + um =malloc (sizeof (unsigned int )); + *um =0 ; + unicode_data[unichar].utf32nfdi = um; +free (unicode_data[unichar].utf32nfdicf); + um =malloc (sizeof (unsigned int )); + *um =0 ; + unicode_data[unichar].utf32nfdicf = um; + count++; + } +if (verbose >1 ) +printf (" %X..%X Default_Ignorable_Code_Point\n" , + first, last); +continue ; + } + ret =sscanf (line,"%X ; %s # " , &unichar, buf0); +if (ret ==2 ) { +if (strcmp (buf0,"Default_Ignorable_Code_Point" )) +continue ; +if (!utf32valid (unichar)) +line_fail (prop_name, line); +free (unicode_data[unichar].utf32nfdi); + um =malloc (sizeof (unsigned int )); + *um =0 ; + unicode_data[unichar].utf32nfdi = um; +free (unicode_data[unichar].utf32nfdicf); + um =malloc (sizeof (unsigned int )); + *um =0 ; + unicode_data[unichar].utf32nfdicf = um; +if (verbose >1 ) +printf (" %X Default_Ignorable_Code_Point\n" , + unichar); + count++; +continue ; + } + } +fclose (file); + +if (verbose >0 ) +printf ("Found %d entries\n" , count); +if (count ==0 ) +file_fail (prop_name); +} +static void corrections_init (void ) {FILE *file;
@@ -3327,6 +3396,7 @@ int main(int argc, char *argv[])ccc_init ();nfdi_init ();nfdicf_init (); +ignore_init ();corrections_init ();hangul_decompose ();nfdi_decompose ();
fs/unicode/utf8data.h_shipped +3357 -3346
2,918 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.
Greg Kroah-Hartman
maintainerPATCH 443/459 KVM: arm64: vgic-its: Add a data length check in vgic_its_save_*
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jing Zhang <[email protected]>
commit 7fe28d7e68f92cc3d0668b8f2fbdf5c303ac3022 upstream.
In all the vgic_its_save_*() functinos, they do not check whether the data length is 8 bytes before calling vgic_write_guest_lock. This patch adds the check. To prevent the kernel from being blown up when the fault occurs, KVM_BUG_ON() is used. And the other BUG_ON()s are replaced together.
--- arch/arm64/kvm/vgic/vgic-its.c | 20 ++++++++------------ arch/arm64/kvm/vgic/vgic.h | 24 ++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 12 deletions(-)
arch/arm64/kvm/vgic/vgic-its.c +8 -12
@@ -2135,7 +2135,6 @@ static int scan_its_table(struct vgic_itstatic int vgic_its_save_ite (struct vgic_its *its,struct its_device *dev,struct its_ite *ite,gpa_t gpa,int ite_esz) { -struct kvm *kvm = its->dev->kvm;u32 next_offset;u64 val;
@@ -2144,7 +2143,8 @@ static int vgic_its_save_ite(struct vgic ((u64 )ite->irq->intid <<KVM_ITS_ITE_PINTID_SHIFT ) | ite->collection->collection_id; val =cpu_to_le64 (val); -return kvm_write_guest_lock (kvm, gpa, &val, ite_esz); + +return vgic_its_write_entry_lock (its, gpa, val, ite_esz); }/**
@@ -2280,7 +2280,6 @@ static int vgic_its_restore_itt(struct vstatic int vgic_its_save_dte (struct vgic_its *its,struct its_device *dev,gpa_t ptr,int dte_esz) { -struct kvm *kvm = its->dev->kvm;u64 val, itt_addr_field;u32 next_offset;
@@ -2291,7 +2290,8 @@ static int vgic_its_save_dte(struct vgic (itt_addr_field <<KVM_ITS_DTE_ITTADDR_SHIFT ) | (dev->num_eventid_bits - 1)); val =cpu_to_le64 (val); -return kvm_write_guest_lock (kvm, ptr, &val, dte_esz); + +return vgic_its_write_entry_lock (its, ptr, val, dte_esz); }/**
@@ -2471,7 +2471,8 @@ static int vgic_its_save_cte(struct vgic ((u64 )collection->target_addr <<KVM_ITS_CTE_RDBASE_SHIFT ) | collection->collection_id); val =cpu_to_le64 (val); -return kvm_write_guest_lock (its->dev->kvm, gpa, &val, esz); + +return vgic_its_write_entry_lock (its, gpa, val, esz); }static int vgic_its_restore_cte (struct vgic_its *its,gpa_t gpa,int esz)
@@ -2482,8 +2483,7 @@ static int vgic_its_restore_cte(struct vu64 val;int ret; -BUG_ON (esz >sizeof (val)); - ret =kvm_read_guest_lock (kvm, gpa, &val, esz); + ret =vgic_its_read_entry_lock (its, gpa, &val, esz);if (ret)return ret; val =le64_to_cpu (val);
@@ -2517,7 +2517,6 @@ static int vgic_its_save_collection_tablu64 baser = its->baser_coll_table;gpa_t gpa =GITS_BASER_ADDR_48_to_52 (baser);struct its_collection *collection; -u64 val;size_t max_size, filled =0 ;int ret, cte_esz = abi->cte_esz;
@@ -2541,10 +2540,7 @@ static int vgic_its_save_collection_tabl* table is not fully filled, add a last dummy element * with valid bit unset */ - val =0 ; -BUG_ON (cte_esz >sizeof (val)); - ret =kvm_write_guest_lock (its->dev->kvm, gpa, &val, cte_esz); -return ret; +return vgic_its_write_entry_lock (its, gpa,0 , cte_esz); }/**
arch/arm64/kvm/vgic/vgic.h +24 -0
@@ -6,6 +6,7 @@#define __KVM_ARM_VGIC_NEW_H__#include <linux/irqchip/arm-gic-common.h> +#include <asm/kvm_mmu.h> #define PRODUCT_ID_KVM 0x4b/* ASCII code K */ #define IMPLEMENTER_ARM 0x43b
@@ -126,6 +127,29 @@ static inline bool vgic_irq_is_multi_sgireturn vgic_irq_get_lr_count (irq) >1 ; } +static inline int vgic_its_read_entry_lock (struct vgic_its *its,gpa_t eaddr, +u64 *eval,unsigned long esize) +{ +struct kvm *kvm = its->dev->kvm; + +if (KVM_BUG_ON (esize !=sizeof (*eval), kvm)) +return -EINVAL ; + +return kvm_read_guest_lock (kvm, eaddr, eval, esize); + +} + +static inline int vgic_its_write_entry_lock (struct vgic_its *its,gpa_t eaddr, +u64 eval,unsigned long esize) +{ +struct kvm *kvm = its->dev->kvm; + +if (KVM_BUG_ON (esize !=sizeof (eval), kvm)) +return -EINVAL ; + +return kvm_write_guest_lock (kvm, eaddr, &eval, esize); +} +/* * This struct provides an intermediate representation of the fields contained * in the GICH_VMCR and ICH_VMCR registers, such that code exporting the GIC
Greg Kroah-Hartman
maintainerPATCH 444/459 KVM: arm64: vgic-its: Clear DTE when MAPD unmaps a device
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kunkun Jiang <[email protected]>
commit e9649129d33dca561305fc590a7c4ba8c3e5675a upstream.
vgic_its_save_device_tables will traverse its->device_list to save DTE for each device. vgic_its_restore_device_tables will traverse each entry of device table and check if it is valid. Restore if valid.
But when MAPD unmaps a device, it does not invalidate the corresponding DTE. In the scenario of continuous saves and restores, there may be a situation where a device's DTE is not saved but is restored. This is unreasonable and may cause restore to fail. This patch clears the corresponding DTE when MAPD unmaps a device.
--- arch/arm64/kvm/vgic/vgic-its.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
arch/arm64/kvm/vgic/vgic-its.c +4 -2
@@ -1182,9 +1182,11 @@ static int vgic_its_cmd_handle_mapd(strubool valid =its_cmd_get_validbit (its_cmd);u8 num_eventid_bits =its_cmd_get_size (its_cmd);gpa_t itt_addr =its_cmd_get_ittaddr (its_cmd); +int dte_esz =vgic_its_get_abi (its)->dte_esz;struct its_device *device; +gpa_t gpa; -if (!vgic_its_check_id (its, its->baser_device_table, device_id,NULL )) +if (!vgic_its_check_id (its, its->baser_device_table, device_id, &gpa))return E_ITS_MAPD_DEVICE_OOR ;if (valid && num_eventid_bits >VITS_TYPER_IDBITS )
@@ -1205,7 +1207,7 @@ static int vgic_its_cmd_handle_mapd(stru* is an error, so we are done in any case. */ if (!valid) -return 0 ; +return vgic_its_write_entry_lock (its, gpa,0 , dte_esz); device =vgic_its_alloc_device (its, device_id, itt_addr, num_eventid_bits);
Greg Kroah-Hartman
maintainerPATCH 445/459 KVM: arm64: vgic-its: Clear ITE when DISCARD frees an ITE
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kunkun Jiang <[email protected]>
commit 7602ffd1d5e8927fadd5187cb4aed2fdc9c47143 upstream.
When DISCARD frees an ITE, it does not invalidate the corresponding ITE. In the scenario of continuous saves and restores, there may be a situation where an ITE is not saved but is restored. This is unreasonable and may cause restore to fail. This patch clears the corresponding ITE when DISCARD frees an ITE.
--- arch/arm64/kvm/vgic/vgic-its.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
arch/arm64/kvm/vgic/vgic-its.c +5 -1
@@ -855,6 +855,9 @@ static int vgic_its_cmd_handle_discard(s ite =find_ite (its, device_id, event_id);if (ite &&its_is_collection_mapped (ite->collection)) { +struct its_device *device =find_its_device (its, device_id); +int ite_esz =vgic_its_get_abi (its)->ite_esz; +gpa_t gpa = device->itt_addr + ite->event_id * ite_esz;/* * Though the spec talks about removing the pending state, we * don't bother here since we clear the ITTE anyway and the
@@ -863,7 +866,8 @@ static int vgic_its_cmd_handle_discard(svgic_its_invalidate_cache (kvm);its_free_ite (kvm, ite); -return 0 ; + +return vgic_its_write_entry_lock (its, gpa,0 , ite_esz); }return E_ITS_DISCARD_UNMAPPED_INTERRUPT ;
Greg Kroah-Hartman
maintainerPATCH 446/459 jffs2: Prevent rtime decompress memory corruption
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kinsey Moore <[email protected]>
commit fe051552f5078fa02d593847529a3884305a6ffe upstream.
The rtime decompression routine does not fully check bounds during the entirety of the decompression pass and can corrupt memory outside the decompression buffer if the compressed data is corrupted. This adds the required check to prevent this failure mode.
--- fs/jffs2/compr_rtime.c | 3 +++ 1 file changed, 3 insertions(+)
fs/jffs2/compr_rtime.c +3 -0
@@ -95,6 +95,9 @@ static int jffs2_rtime_decompress(unsign positions[value]=outpos;if (repeat) { +if ((outpos + repeat) >= destlen) { +return 1 ; + }if (backoffs + repeat >= outpos) {while (repeat) { cpage_out[outpos++] = cpage_out[backoffs++];
Greg Kroah-Hartman
maintainerPATCH 447/459 jffs2: Fix rtime decompressor
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Richard Weinberger <[email protected]>
commit b29bf7119d6bbfd04aabb8d82b060fe2a33ef890 upstream.
The fix for a memory corruption contained a off-by-one error and caused the compressor to fail in legit cases.
--- fs/jffs2/compr_rtime.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/jffs2/compr_rtime.c +1 -1
@@ -95,7 +95,7 @@ static int jffs2_rtime_decompress(unsign positions[value]=outpos;if (repeat) { -if ((outpos + repeat) >= destlen) { +if ((outpos + repeat) > destlen) {return 1 ; }if (backoffs + repeat >= outpos) {
Greg Kroah-Hartman
maintainerPATCH 448/459 xhci: dbc: Fix STALL transfer event handling
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mathias Nyman <[email protected]>
commit 9044ad57b60b0556d42b6f8aa218a68865e810a4 upstream.
Don't flush all pending DbC data requests when an endpoint halts.
An endpoint may halt and xHC DbC triggers a STALL error event if there's an issue with a bulk data transfer. The transfer should restart once xHC DbC receives a ClearFeature(ENDPOINT_HALT) request from the host.
Once xHC DbC restarts it will start from the TRB pointed to by dequeue field in the endpoint context, which might be the same TRB we got the STALL event for. Turn the TRB to a no-op in this case to make sure xHC DbC doesn't reuse and tries to retransmit this same TRB after we already handled it, and gave its corresponding data request back.
Other STALL events might be completely bogus.
Lukasz Bartosik discovered that xHC DbC might issue spurious STALL events if hosts sends a ClearFeature(ENDPOINT_HALT) request to non-halted endpoints even without any active bulk transfers.
Assume STALL event is spurious if it reports 0 bytes transferred, and the endpoint stopped on the STALLED TRB.
Don't give back the data request corresponding to the TRB in this case.
The halted status is per endpoint. Track it with a per endpoint flag instead of the driver invented DbC wide DS_STALLED state. DbC remains in DbC-Configured state even if endpoints halt. There is no Stalled state in the DbC Port state Machine (xhci section 7.6.6)
--- drivers/usb/host/xhci-dbgcap.c | 135 ++++++++++++++++++++++++----------------- drivers/usb/host/xhci-dbgcap.h | 2 2 files changed, 83 insertions(+), 54 deletions(-)
drivers/usb/host/xhci-dbgcap.c +82 -53
@@ -158,16 +158,18 @@ static void xhci_dbc_giveback(struct dbcspin_lock (&dbc->lock); } -static void xhci_dbc_flush_single_request (struct dbc_request *req) +static void trb_to_noop (union xhci_trb *trb) { -union xhci_trb *trb = req->trb; - trb->generic.field[0 ] =0 ; trb->generic.field[1 ] =0 ; trb->generic.field[2 ] =0 ; trb->generic.field[3 ] &=cpu_to_le32 (TRB_CYCLE ); trb->generic.field[3 ] |=cpu_to_le32 (TRB_TYPE (TRB_TR_NOOP )); +} +static void xhci_dbc_flush_single_request (struct dbc_request *req) +{ +trb_to_noop (req->trb);xhci_dbc_giveback (req, -ESHUTDOWN ); }
@@ -637,7 +639,6 @@ static void xhci_dbc_stop(struct xhci_dbcase DS_DISABLED :return ;case DS_CONFIGURED : -case DS_STALLED :if (dbc->driver->disconnect) dbc->driver->disconnect (dbc);break ;
@@ -658,6 +659,23 @@ static void xhci_dbc_stop(struct xhci_db }static void +handle_ep_halt_changes (struct xhci_dbc *dbc,struct dbc_ep *dep,bool halted) +{ +if (halted) { +dev_info (dbc->dev,"DbC Endpoint halted\n" ); + dep->halted =1 ; + + }else if (dep->halted) { +dev_info (dbc->dev,"DbC Endpoint halt cleared\n" ); + dep->halted =0 ; + +if (!list_empty (&dep->list_pending)) +writel (DBC_DOOR_BELL_TARGET (dep->direction), + &dbc->regs->doorbell); + } +} + +static void dbc_handle_port_status (struct xhci_dbc *dbc,union xhci_trb *event) {u32 portsc;
@@ -685,6 +703,7 @@ static void dbc_handle_xfer_event(structstruct xhci_ring *ring;int ep_id;int status; +struct xhci_ep_ctx *ep_ctx;u32 comp_code;size_t remain_length;struct dbc_request *req =NULL , *r;
@@ -694,8 +713,30 @@ static void dbc_handle_xfer_event(struct ep_id =TRB_TO_EP_ID (le32_to_cpu (event->generic.field[3 ])); dep = (ep_id ==EPID_OUT ) ?get_out_ep (dbc) :get_in_ep (dbc); + ep_ctx = (ep_id ==EPID_OUT ) ? +dbc_bulkout_ctx (dbc) :dbc_bulkin_ctx (dbc); ring = dep->ring; +/* Match the pending request: */ +list_for_each_entry (r, &dep->list_pending, list_pending) { +if (r->trb_dma == event->trans_event.buffer) { + req = r; +break ; + } +if (r->status == -COMP_STALL_ERROR ) { +dev_warn (dbc->dev,"Give back stale stalled req\n" ); + ring->num_trbs_free++; +xhci_dbc_giveback (r,0 ); + } + } + +if (!req) { +dev_warn (dbc->dev,"no matched request\n" ); +return ; + } + +trace_xhci_dbc_handle_transfer (ring, &req->trb->generic); +switch (comp_code) {case COMP_SUCCESS : remain_length =0 ;
@@ -706,31 +747,49 @@ static void dbc_handle_xfer_event(structcase COMP_TRB_ERROR :case COMP_BABBLE_DETECTED_ERROR :case COMP_USB_TRANSACTION_ERROR : -case COMP_STALL_ERROR :dev_warn (dbc->dev,"tx error %d detected\n" , comp_code); status = -comp_code;break ; +case COMP_STALL_ERROR : +dev_warn (dbc->dev,"Stall error at bulk TRB %llx, remaining %zu, ep deq %llx\n" , + event->trans_event.buffer, remain_length, ep_ctx->deq); + status =0 ; + dep->halted =1 ; + +/* +* xHC DbC may trigger a STALL bulk xfer event when host sends a +* ClearFeature(ENDPOINT_HALT) request even if there wasn't an +* active bulk transfer. +* +* Don't give back this transfer request as hardware will later +* start processing TRBs starting from this 'STALLED' TRB, +* causing TRBs and requests to be out of sync. +* +* If STALL event shows some bytes were transferred then assume +* it's an actual transfer issue and give back the request. +* In this case mark the TRB as No-Op to avoid hw from using the +* TRB again. +*/ + +if ((ep_ctx->deq & ~TRB_CYCLE ) == event->trans_event.buffer) { +dev_dbg (dbc->dev,"Ep stopped on Stalled TRB\n" ); +if (remain_length == req->length) { +dev_dbg (dbc->dev,"Spurious stall event, keep req\n" ); + req->status = -COMP_STALL_ERROR ; + req->actual =0 ; +return ; + } +dev_dbg (dbc->dev,"Give back stalled req, but turn TRB to No-op\n" ); +trb_to_noop (req->trb); + } +break ; +default :dev_err (dbc->dev,"unknown tx error %d\n" , comp_code); status = -comp_code;break ; } -/* Match the pending request: */ -list_for_each_entry (r, &dep->list_pending, list_pending) { -if (r->trb_dma == event->trans_event.buffer) { - req = r; -break ; - } - } - -if (!req) { -dev_warn (dbc->dev,"no matched request\n" ); -return ; - } - -trace_xhci_dbc_handle_transfer (ring, &req->trb->generic); - ring->num_trbs_free++; req->actual = req->length - remain_length;xhci_dbc_giveback (req, status);
@@ -750,7 +809,6 @@ static void inc_evt_deq(struct xhci_ringstatic enum evtreturn xhci_dbc_do_handle_events (struct xhci_dbc *dbc) {dma_addr_t deq; -struct dbc_ep *dep;union xhci_trb *evt;u32 ctrl, portsc;bool update_erdp = false;
@@ -802,43 +860,17 @@ static enum evtreturn xhci_dbc_do_handlereturn EVT_DISC ; } -/* Handle endpoint stall event: */ +/* Check and handle changes in endpoint halt status */ ctrl =readl (&dbc->regs->control); -if ((ctrl &DBC_CTRL_HALT_IN_TR ) || - (ctrl &DBC_CTRL_HALT_OUT_TR )) { -dev_info (dbc->dev,"DbC Endpoint stall\n" ); - dbc->state =DS_STALLED ; - -if (ctrl &DBC_CTRL_HALT_IN_TR ) { - dep =get_in_ep (dbc); -xhci_dbc_flush_endpoint_requests (dep); - } - -if (ctrl &DBC_CTRL_HALT_OUT_TR ) { - dep =get_out_ep (dbc); -xhci_dbc_flush_endpoint_requests (dep); - } - -return EVT_DONE ; - } +handle_ep_halt_changes (dbc,get_in_ep (dbc), ctrl &DBC_CTRL_HALT_IN_TR ); +handle_ep_halt_changes (dbc,get_out_ep (dbc), ctrl &DBC_CTRL_HALT_OUT_TR );/* Clear DbC run change bit: */ if (ctrl &DBC_CTRL_DBC_RUN_CHANGE ) {writel (ctrl, &dbc->regs->control); ctrl =readl (&dbc->regs->control); } -break ; -case DS_STALLED : - ctrl =readl (&dbc->regs->control); -if (!(ctrl &DBC_CTRL_HALT_IN_TR ) && - !(ctrl &DBC_CTRL_HALT_OUT_TR ) && - (ctrl &DBC_CTRL_DBC_RUN )) { - dbc->state =DS_CONFIGURED ; -break ; - } - -return EVT_DONE ;default :dev_err (dbc->dev,"Unknown DbC state %d\n" , dbc->state);break ;
@@ -994,9 +1026,6 @@ static ssize_t dbc_show(struct device *dcase DS_CONFIGURED : p ="configured" ;break ; -case DS_STALLED : - p ="stalled" ; -break ;default : p ="unknown" ; }
drivers/usb/host/xhci-dbgcap.h +1 -1
@@ -81,7 +81,6 @@ enum dbc_state {DS_ENABLED ,DS_CONNECTED , DS_CONFIGURED, - DS_STALLED, }; struct dbc_ep {
@@ -89,6 +88,7 @@ struct dbc_ep {struct list_head list_pending;struct xhci_ring *ring; unsigned int direction:1; + unsigned int halted:1; };#define DBC_QUEUE_SIZE 16
Greg Kroah-Hartman
maintainerPATCH 449/459 drm/amd/display: Check BIOS images before it is used
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alex Hung <[email protected]>
commit 8b0ddf19cca2a352b2a7e01d99d3ba949a99c84c upstream.
BIOS images may fail to load and null checks are added before they are used.
This fixes 6 NULL_RETURNS issues reported by Coverity.
--- drivers/gpu/drm/amd/display/dc/bios/bios_parser.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
drivers/gpu/drm/amd/display/dc/bios/bios_parser.c +14 -0
@@ -664,6 +664,9 @@ static enum bp_result get_ss_info_v3_1( ss_table_header_include =GET_IMAGE (ATOM_ASIC_INTERNAL_SS_INFO_V3 ,DATA_TABLES (ASIC_InternalSS_Info)); +if (!ss_table_header_include) +return BP_RESULT_UNSUPPORTED ; + table_size = (le16_to_cpu (ss_table_header_include->sHeader.usStructureSize) -sizeof (ATOM_COMMON_TABLE_HEADER ))
@@ -1030,6 +1033,8 @@ static enum bp_result get_ss_info_from_i header =GET_IMAGE (ATOM_ASIC_INTERNAL_SS_INFO_V2 ,DATA_TABLES (ASIC_InternalSS_Info)); +if (!header) +return result;memset (info,0 ,sizeof (struct spread_spectrum_info ));
@@ -1102,6 +1107,8 @@ static enum bp_result get_ss_info_from_sget_atom_data_table_revision (header, &revision); tbl =GET_IMAGE (ATOM_SPREAD_SPECTRUM_INFO ,DATA_TABLES (SS_Info)); +if (!tbl) +return result;if (1 != revision.major ||2 > revision.minor)return result;
@@ -1634,6 +1641,8 @@ static uint32_t get_ss_entry_number_from tbl =GET_IMAGE (ATOM_SPREAD_SPECTRUM_INFO ,DATA_TABLES (SS_Info)); +if (!tbl) +return number;if (1 != revision.major ||2 > revision.minor)return number;
@@ -1712,6 +1721,8 @@ static uint32_t get_ss_entry_number_from header_include =GET_IMAGE (ATOM_ASIC_INTERNAL_SS_INFO_V2 ,DATA_TABLES (ASIC_InternalSS_Info)); +if (!header_include) +return 0 ; size = (le16_to_cpu (header_include->sHeader.usStructureSize) -sizeof (ATOM_COMMON_TABLE_HEADER ))
@@ -1748,6 +1759,9 @@ static uint32_t get_ss_entry_number_from header_include =GET_IMAGE (ATOM_ASIC_INTERNAL_SS_INFO_V3 ,DATA_TABLES (ASIC_InternalSS_Info)); +if (!header_include) +return number; + size = (le16_to_cpu (header_include->sHeader.usStructureSize) -sizeof (ATOM_COMMON_TABLE_HEADER )) /sizeof (ATOM_ASIC_SS_ASSIGNMENT_V3 );
Greg Kroah-Hartman
maintainerPATCH 450/459 ocfs2: Revert "ocfs2: fix the la space leak when unmounting an ocfs2 volume"
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Heming Zhao <[email protected]>
This reverts commit dfe6c5692fb5 ("ocfs2: fix the la space leak when unmounting an ocfs2 volume").
In commit dfe6c5692fb5, the commit log "This bug has existed since the initial OCFS2 code." is wrong. The correct introduction commit is 30dd3478c3cd ("ocfs2: correctly use ocfs2_find_next_zero_bit()").
The influence of commit dfe6c5692fb5 is that it provides a correct fix for the latest kernel. however, it shouldn't be pushed to stable branches. Let's use this commit to revert all branches that include dfe6c5692fb5 and use a new fix method to fix commit 30dd3478c3cd.
--- fs/ocfs2/localalloc.c | 19 ------------------- 1 file changed, 19 deletions(-)
fs/ocfs2/localalloc.c +0 -19
@@ -1010,25 +1010,6 @@ static int ocfs2_sync_local_to_main(stru start = bit_off +1 ; } -/* clear the contiguous bits until the end boundary */ -if (count) { - blkno = la_start_blk + -ocfs2_clusters_to_blocks (osb->sb, - start - count); - -trace_ocfs2_sync_local_to_main_free ( - count, start - count, - (unsigned long long )la_start_blk, - (unsigned long long )blkno); - - status =ocfs2_release_clusters (handle, - main_bm_inode, - main_bm_bh, blkno, - count); -if (status <0 ) -mlog_errno (status); - } - bail:if (status)mlog_errno (status);
Greg Kroah-Hartman
maintainerPATCH 451/459 modpost: Add .irqentry.text to OTHER_SECTIONS
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Thomas Gleixner <[email protected]>
commit 7912405643a14b527cd4a4f33c1d4392da900888 upstream.
The compiler can fully inline the actual handler function of an interrupt entry into the .irqentry.text entry point. If such a function contains an access which has an exception table entry, modpost complains about a section mismatch:
WARNING: vmlinux.o(__ex_table+0x447c): Section mismatch in reference ...
The relocation at __ex_table+0x447c references section ".irqentry.text" which is not in the list of authorized sections.
Add .irqentry.text to OTHER_SECTIONS to cure the issue.
--- scripts/mod/modpost.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/mod/modpost.c +1 -1
@@ -951,7 +951,7 @@ static void check_section(const char *mo ".kprobes.text", ".cpuidle.text", ".noinstr.text"#define OTHER_TEXT_SECTIONS ".ref.text", ".head.text", ".spinlock.text", \ ".fixup", ".entry.text", ".exception.text", ".text.*", \ - ".coldtext" + ".coldtext", ".irqentry.text"#define INIT_SECTIONS ".init.*"#define MEM_INIT_SECTIONS ".meminit.*"
Greg Kroah-Hartman
maintainerPATCH 452/459 Revert "drm/amdgpu: add missing size check in amdgpu_debugfs_gprwave_read()"
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Zhang Zekun <[email protected]>
This reverts commit 17f5f18085acb5e9d8d13d84a4e12bb3aff2bd64.
The origin mainline patch fix a buffer overflow issue in amdgpu_debugfs_gprwave_read(), but it has not been introduced in kernel 6.1 and older kernels. This patch add a check in a wrong function in the same file.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c +1 -1
@@ -396,7 +396,7 @@ static ssize_t amdgpu_debugfs_regs_pcie_ssize_t result =0 ;int r; -if (size >4096 || size &0x3 || *pos &0x3 ) +if (size &0x3 || *pos &0x3 )return -EINVAL ; r =pm_runtime_get_sync (adev_to_drm (adev)->dev);
Greg Kroah-Hartman
maintainerPATCH 453/459 PCI: rockchip-ep: Fix address translation unit programming
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Damien Le Moal <[email protected]>
commit 64f093c4d99d797b68b407a9d8767aadc3e3ea7a upstream.
The Rockchip PCIe endpoint controller handles PCIe transfers addresses by masking the lower bits of the programmed PCI address and using the same number of lower bits masked from the CPU address space used for the mapping. For a PCI mapping of <size> bytes starting from <pci_addr>, the number of bits masked is the number of address bits changing in the address range [pci_addr..pci_addr + size - 1].
However, rockchip_pcie_prog_ep_ob_atu() calculates num_pass_bits only using the size of the mapping, resulting in an incorrect number of mask bits depending on the value of the PCI address to map.
Fix this by introducing the helper function rockchip_pcie_ep_ob_atu_num_bits() to correctly calculate the number of mask bits to use to program the address translation unit. The number of mask bits is calculated depending on both the PCI address and size of the mapping, and clamped between 8 and 20 using the macros ROCKCHIP_PCIE_AT_MIN_NUM_BITS and ROCKCHIP_PCIE_AT_MAX_NUM_BITS. As defined in the Rockchip RK3399 TRM V1.3 Part2, Sections 17.5.5.1.1 and 17.6.8.2.1, this clamping is necessary because:
1) The lower 8 bits of the PCI address to be mapped by the outbound region are ignored. So a minimum of 8 address bits are needed and imply that the PCI address must be aligned to 256.
2) The outbound memory regions are 1MB in size. So while we can specify up to 63-bits for the PCI address (num_bits filed uses bits 0 to 5 of the outbound address region 0 register), we must limit the number of valid address bits to 20 to match the memory window maximum size (1 << 20 = 1MB).
--- drivers/pci/controller/pcie-rockchip-ep.c | 18 +++++++++++++----- drivers/pci/controller/pcie-rockchip.h | 4 ++++ 2 files changed, 17 insertions(+), 5 deletions(-)
drivers/pci/controller/pcie-rockchip-ep.c +13 -5
@@ -67,18 +67,26 @@ static void rockchip_pcie_clear_ep_ob_at ROCKCHIP_PCIE_AT_OB_REGION_CPU_ADDR1(region)); } +static int rockchip_pcie_ep_ob_atu_num_bits (struct rockchip_pcie *rockchip, +u64 pci_addr,size_t size) +{ +int num_pass_bits =fls64 (pci_addr ^ (pci_addr + size -1 )); + +return clamp (num_pass_bits, +ROCKCHIP_PCIE_AT_MIN_NUM_BITS , +ROCKCHIP_PCIE_AT_MAX_NUM_BITS ); +} +static void rockchip_pcie_prog_ep_ob_atu (struct rockchip_pcie *rockchip,u8 fn,u32 r,u32 type,u64 cpu_addr,u64 pci_addr,size_t size) { -u64 sz =1ULL <<fls64 (size -1 ); -int num_pass_bits =ilog2 (sz); +int num_pass_bits;u32 addr0, addr1, desc0, desc1;bool is_nor_msg = (type ==AXI_WRAPPER_NOR_MSG ); -/* The minimal region size is 1MB */ -if (num_pass_bits <8 ) - num_pass_bits =8 ; + num_pass_bits =rockchip_pcie_ep_ob_atu_num_bits (rockchip, + pci_addr, size); cpu_addr -= rockchip->mem_res->start; addr0 = ((is_nor_msg ? 0x10 : (num_pass_bits - 1)) &
drivers/pci/controller/pcie-rockchip.h +4 -0
@@ -241,6 +241,10 @@#define ROCKCHIP_PCIE_EP_MSI_CTRL_MASK_MSI_CAP BIT(24)#define ROCKCHIP_PCIE_EP_DUMMY_IRQ_ADDR 0x1#define ROCKCHIP_PCIE_EP_FUNC_BASE (fn) (((fn) << 12) & GENMASK(19, 12)) + +#define ROCKCHIP_PCIE_AT_MIN_NUM_BITS 8 +#define ROCKCHIP_PCIE_AT_MAX_NUM_BITS 20 +#define ROCKCHIP_PCIE_AT_IB_EP_FUNC_BAR_ADDR0 (fn, bar) \ (PCIE_RC_RP_ATS_BASE + 0x0840 + (fn) * 0x0040 + (bar) * 0x0008)#define ROCKCHIP_PCIE_AT_IB_EP_FUNC_BAR_ADDR1 (fn, bar) \
Greg Kroah-Hartman
maintainerPATCH 454/459 scsi: sd: Fix sd_do_mode_sense() buffer length handling
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Damien Le Moal <[email protected]>
commit c749301ebee82eb5e97dec14b6ab31a4aabe37a6 upstream.
For devices that explicitly asked for MODE SENSE(10) use, make sure that scsi_mode_sense() is called with a buffer of at least 8 bytes so that the sense header fits.
--- drivers/scsi/sd.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/scsi/sd.c +7 -0
@@ -2649,6 +2649,13 @@ sd_do_mode_sense(struct scsi_disk *sdkp, unsigned char *buffer, int len, struct scsi_mode_data *data, struct scsi_sense_hdr *sshdr) { + /* + * If we must use MODE SENSE(10), make sure that the buffer length + * is at least 8 bytes so that the mode sense header fits. + */ + if (sdkp->device->use_10_for_ms && len < 8) + len =8 ; +return scsi_mode_sense (sdkp->device, dbd, modepage, buffer, len,SD_TIMEOUT , sdkp->max_retries, data, sshdr);
Greg Kroah-Hartman
maintainerPATCH 455/459 scsi: core: Fix scsi_mode_select() buffer length handling
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Damien Le Moal <[email protected]>
commit a7d6840bed0c2b16ac3071b74b5fcf08fc488241 upstream.
The MODE SELECT(6) command allows handling mode page buffers that are up to 255 bytes, including the 4 byte header needed in front of the page buffer. For requests larger than this limit, automatically use the MODE SELECT(10) command.
In both cases, since scsi_mode_select() adds the mode select page header, checks on the buffer length value must include this header size to avoid overflows of the command CDB allocation length field.
While at it, use put_unaligned_be16() for setting the header block descriptor length and CDB allocation length when using MODE SELECT(10).
[mkp: fix MODE SENSE vs. MODE SELECT confusion]
--- drivers/scsi/scsi_lib.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-)
drivers/scsi/scsi_lib.c +13 -8
@@ -2019,8 +2019,15 @@ scsi_mode_select(struct scsi_device *sdememset (cmd,0 ,sizeof (cmd)); cmd[1 ] = (pf ?0x10 :0 ) | (sp ?0x01 :0 ); -if (sdev->use_10_for_ms) { -if (len >65535 ) +/* +* Use MODE SELECT(10) if the device asked for it or if the mode page +* and the mode select header cannot fit within the maximumm 255 bytes +* of the MODE SELECT(6) command. +*/ +if (sdev->use_10_for_ms || + len +4 >255 || + data->block_descriptor_length >255 ) { +if (len >65535 -8 )return -EINVAL ; real_buffer =kmalloc (8 + len,GFP_KERNEL );if (!real_buffer)
@@ -2033,15 +2040,13 @@ scsi_mode_select(struct scsi_device *sde real_buffer[3 ] = data->device_specific; real_buffer[4 ] = data->longlba ?0x01 :0 ; real_buffer[5 ] =0 ; - real_buffer[6 ] = data->block_descriptor_length >>8 ; - real_buffer[7 ] = data->block_descriptor_length; +put_unaligned_be16 (data->block_descriptor_length, + &real_buffer[6 ]); cmd[0 ] =MODE_SELECT_10 ; - cmd[7 ] = len >>8 ; - cmd[8 ] = len; +put_unaligned_be16 (len, &cmd[7 ]); }else { -if (len >255 || data->block_descriptor_length >255 || - data->longlba) +if (data->longlba)return -EINVAL ; real_buffer =kmalloc (4 + len,GFP_KERNEL );
Greg Kroah-Hartman
maintainerPATCH 456/459 ALSA: usb-audio: Fix out of bounds reads when finding clock sources
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Takashi Iwai <[email protected]>
commit a3dd4d63eeb452cfb064a13862fb376ab108f6a6 upstream.
The current USB-audio driver code doesn't check bLength of each descriptor at traversing for clock descriptors. That is, when a device provides a bogus descriptor with a shorter bLength, the driver might hit out-of-bounds reads.
For addressing it, this patch adds sanity checks to the validator functions for the clock descriptor traversal. When the descriptor length is shorter than expected, it's skipped in the loop.
For the clock source and clock multiplier descriptors, we can just check bLength against the sizeof() of each descriptor type. OTOH, the clock selector descriptor of UAC2 and UAC3 has an array of bNrInPins elements and two more fields at its tail, hence those have to be checked in addition to the sizeof() check.
--- sound/usb/clock.c | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-)
sound/usb/clock.c +30 -2
@@ -21,6 +21,10 @@#include "clock.h" #include "quirks.h" +/* check whether the descriptor bLength has the minimal length */ +#define DESC_LENGTH_CHECK (p) \ + (p->bLength >= sizeof(*p)) +static void *find_uac_clock_desc (struct usb_host_interface *iface,int id,bool (*validator)(void *,int ),u8 type) {
@@ -38,36 +42,60 @@ static void *find_uac_clock_desc(structstatic bool validate_clock_source_v2 (void *p,int id) {struct uac_clock_source_descriptor *cs = p; +if (!DESC_LENGTH_CHECK (cs)) +return false;return cs->bClockID == id; }static bool validate_clock_source_v3 (void *p,int id) {struct uac3_clock_source_descriptor *cs = p; +if (!DESC_LENGTH_CHECK (cs)) +return false;return cs->bClockID == id; }static bool validate_clock_selector_v2 (void *p,int id) {struct uac_clock_selector_descriptor *cs = p; -return cs->bClockID == id; +if (!DESC_LENGTH_CHECK (cs)) +return false; +if (cs->bClockID != id) +return false; +/* additional length check for baCSourceID array (in bNrInPins size) +* and two more fields (which sizes depend on the protocol) +*/ +return cs->bLength >=sizeof (*cs) + cs->bNrInPins + +1 /* bmControls */ +1 /* iClockSelector */ ; }static bool validate_clock_selector_v3 (void *p,int id) {struct uac3_clock_selector_descriptor *cs = p; -return cs->bClockID == id; +if (!DESC_LENGTH_CHECK (cs)) +return false; +if (cs->bClockID != id) +return false; +/* additional length check for baCSourceID array (in bNrInPins size) +* and two more fields (which sizes depend on the protocol) +*/ +return cs->bLength >=sizeof (*cs) + cs->bNrInPins + +4 /* bmControls */ +2 /* wCSelectorDescrStr */ ; }static bool validate_clock_multiplier_v2 (void *p,int id) {struct uac_clock_multiplier_descriptor *cs = p; +if (!DESC_LENGTH_CHECK (cs)) +return false;return cs->bClockID == id; }static bool validate_clock_multiplier_v3 (void *p,int id) {struct uac3_clock_multiplier_descriptor *cs = p; +if (!DESC_LENGTH_CHECK (cs)) +return false;return cs->bClockID == id; }
Greg Kroah-Hartman
maintainerPATCH 457/459 media: uvcvideo: Require entities to have a non-zero unique ID
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Thadeu Lima de Souza Cascardo <[email protected]>
commit 3dd075fe8ebbc6fcbf998f81a75b8c4b159a6195 upstream.
Per UVC 1.1+ specification 3.7.2, units and terminals must have a non-zero unique ID.
``` Each Unit and Terminal within the video function is assigned a unique identification number, the Unit ID (UID) or Terminal ID (TID), contained in the bUnitID or bTerminalID field of the descriptor. The value 0x00 is reserved for undefined ID, ```
So, deny allocating an entity with ID 0 or an ID that belongs to a unit that is already added to the list of entities.
This also prevents some syzkaller reproducers from triggering warnings due to a chain of entities referring to themselves. In one particular case, an Output Unit is connected to an Input Unit, both with the same ID of 1. But when looking up for the source ID of the Output Unit, that same entity is found instead of the input entity, which leads to such warnings.
In another case, a backward chain was considered finished as the source ID was 0. Later on, that entity was found, but its pads were not valid.
Here is a sample stack trace for one of those cases.
[ 20.650953] usb 1-1: new high-speed USB device number 2 using dummy_hcd [ 20.830206] usb 1-1: Using ep0 maxpacket: 8 [ 20.833501] usb 1-1: config 0 descriptor?? [ 21.038518] usb 1-1: string descriptor 0 read error: -71 [ 21.038893] usb 1-1: Found UVC 0.00 device <unnamed> (2833:0201) [ 21.039299] uvcvideo 1-1:0.0: Entity type for entity Output 1 was not initialized! [ 21.041583] uvcvideo 1-1:0.0: Entity type for entity Input 1 was not initialized! [ 21.042218] ------------[ cut here ]------------ [ 21.042536] WARNING: CPU: 0 PID: 9 at drivers/media/mc/mc-entity.c:1147 media_create_pad_link+0x2c4/0x2e0 [ 21.043195] Modules linked in: [ 21.043535] CPU: 0 UID: 0 PID: 9 Comm: kworker/0:1 Not tainted 6.11.0-rc7-00030-g3480e43aeccf #444 [ 21.044101] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.15.0-1 04/01/2014 [ 21.044639] Workqueue: usb_hub_wq hub_event [ 21.045100] RIP: 0010:media_create_pad_link+0x2c4/0x2e0 [ 21.045508] Code: fe e8 20 01 00 00 b8 f4 ff ff ff 48 83 c4 30 5b 41 5c 41 5d 41 5e 41 5f 5d c3 cc cc cc cc 0f 0b eb e9 0f 0b eb 0a 0f 0b eb 06 <0f> 0b eb 02 0f 0b b8 ea ff ff ff eb d4 66 2e 0f 1f 84 00 00 00 00 [ 21.046801] RSP: 0018:ffffc9000004b318 EFLAGS: 00010246 [ 21.047227] RAX: ffff888004e5d458 RBX: 0000000000000000 RCX: ffffffff818fccf1 [ 21.047719] RDX: 000000000000007b RSI: 0000000000000000 RDI: ffff888004313290 [ 21.048241] RBP: ffff888004313290 R08: 0001ffffffffffff R09: 0000000000000000 [ 21.048701] R10: 0000000000000013 R11: 0001888004313290 R12: 0000000000000003 [ 21.049138] R13: ffff888004313080 R14: ffff888004313080 R15: 0000000000000000 [ 21.049648] FS: 0000000000000000(0000) GS:ffff88803ec00000(0000) knlGS:0000000000000000 [ 21.050271] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 21.050688] CR2: 0000592cc27635b0 CR3: 000000000431c000 CR4: 0000000000750ef0 [ 21.051136] PKRU: 55555554 [ 21.051331] Call Trace: [ 21.051480] <TASK> [ 21.051611] ? __warn+0xc4/0x210 [ 21.051861] ? media_create_pad_link+0x2c4/0x2e0 [ 21.052252] ? report_bug+0x11b/0x1a0 [ 21.052540] ? trace_hardirqs_on+0x31/0x40 [ 21.052901] ? handle_bug+0x3d/0x70 [ 21.053197] ? exc_invalid_op+0x1a/0x50 [ 21.053511] ? asm_exc_invalid_op+0x1a/0x20 [ 21.053924] ? media_create_pad_link+0x91/0x2e0 [ 21.054364] ? media_create_pad_link+0x2c4/0x2e0 [ 21.054834] ? media_create_pad_link+0x91/0x2e0 [ 21.055131] ? _raw_spin_unlock+0x1e/0x40 [ 21.055441] ? __v4l2_device_register_subdev+0x202/0x210 [ 21.055837] uvc_mc_register_entities+0x358/0x400 [ 21.056144] uvc_register_chains+0x1fd/0x290 [ 21.056413] uvc_probe+0x380e/0x3dc0 [ 21.056676] ? __lock_acquire+0x5aa/0x26e0 [ 21.056946] ? find_held_lock+0x33/0xa0 [ 21.057196] ? kernfs_activate+0x70/0x80 [ 21.057533] ? usb_match_dynamic_id+0x1b/0x70 [ 21.057811] ? find_held_lock+0x33/0xa0 [ 21.058047] ? usb_match_dynamic_id+0x55/0x70 [ 21.058330] ? lock_release+0x124/0x260 [ 21.058657] ? usb_match_one_id_intf+0xa2/0x100 [ 21.058997] usb_probe_interface+0x1ba/0x330 [ 21.059399] really_probe+0x1ba/0x4c0 [ 21.059662] __driver_probe_device+0xb2/0x180 [ 21.059944] driver_probe_device+0x5a/0x100 [ 21.060170] __device_attach_driver+0xe9/0x160 [ 21.060427] ? __pfx___device_attach_driver+0x10/0x10 [ 21.060872] bus_for_each_drv+0xa9/0x100 [ 21.061312] __device_attach+0xed/0x190 [ 21.061812] device_initial_probe+0xe/0x20 [ 21.062229] bus_probe_device+0x4d/0xd0 [ 21.062590] device_add+0x308/0x590 [ 21.062912] usb_set_configuration+0x7b6/0xaf0 [ 21.063403] usb_generic_driver_probe+0x36/0x80 [ 21.063714] usb_probe_device+0x7b/0x130 [ 21.063936] really_probe+0x1ba/0x4c0 [ 21.064111] __driver_probe_device+0xb2/0x180 [ 21.064577] driver_probe_device+0x5a/0x100 [ 21.065019] __device_attach_driver+0xe9/0x160 [ 21.065403] ? __pfx___device_attach_driver+0x10/0x10 [ 21.065820] bus_for_each_drv+0xa9/0x100 [ 21.066094] __device_attach+0xed/0x190 [ 21.066535] device_initial_probe+0xe/0x20 [ 21.066992] bus_probe_device+0x4d/0xd0 [ 21.067250] device_add+0x308/0x590 [ 21.067501] usb_new_device+0x347/0x610 [ 21.067817] hub_event+0x156b/0x1e30 [ 21.068060] ? process_scheduled_works+0x48b/0xaf0 [ 21.068337] process_scheduled_works+0x5a3/0xaf0 [ 21.068668] worker_thread+0x3cf/0x560 [ 21.068932] ? kthread+0x109/0x1b0 [ 21.069133] kthread+0x197/0x1b0 [ 21.069343] ? __pfx_worker_thread+0x10/0x10 [ 21.069598] ? __pfx_kthread+0x10/0x10 [ 21.069908] ret_from_fork+0x32/0x40 [ 21.070169] ? __pfx_kthread+0x10/0x10 [ 21.070424] ret_from_fork_asm+0x1a/0x30 [ 21.070737] </TASK>
[ ribalda: The context around the changes differs from master. This
version is also missing the gpio unit, so that part is gone from the patch. ]
--- drivers/media/usb/uvc/uvc_driver.c | 63 ++++++++++++++++++++++--------------- 1 file changed, 39 insertions(+), 24 deletions(-)
drivers/media/usb/uvc/uvc_driver.c +39 -24
@@ -1029,14 +1029,27 @@ error:return ret; } -static struct uvc_entity *uvc_alloc_entity (u16 type,u8 id, -unsigned int num_pads,unsigned int extra_size) +static struct uvc_entity *uvc_alloc_new_entity (struct uvc_device *dev,u16 type, +u16 id,unsigned int num_pads, +unsigned int extra_size) {struct uvc_entity *entity;unsigned int num_inputs;unsigned int size;unsigned int i; +/* Per UVC 1.1+ spec 3.7.2, the ID should be non-zero. */ +if (id ==0 ) { +dev_err (&dev->udev->dev,"Found Unit with invalid ID 0.\n" ); +return ERR_PTR (-EINVAL ); + } + +/* Per UVC 1.1+ spec 3.7.2, the ID is unique. */ +if (uvc_entity_by_id (dev, id)) { +dev_err (&dev->udev->dev,"Found multiple Units with ID %u\n" , id); +return ERR_PTR (-EINVAL ); + } + extra_size =roundup (extra_size,sizeof (*entity->pads));if (num_pads) num_inputs = type &UVC_TERM_OUTPUT ? num_pads : num_pads -1 ;
@@ -1046,7 +1059,7 @@ static struct uvc_entity *uvc_alloc_enti + num_inputs; entity =kzalloc (size,GFP_KERNEL );if (entity ==NULL ) -return NULL ; +return ERR_PTR (-ENOMEM ); entity->id = id; entity->type = type;
@@ -1117,10 +1130,10 @@ static int uvc_parse_vendor_control(strubreak ; } - unit =uvc_alloc_entity (UVC_VC_EXTENSION_UNIT , buffer[3 ], - p +1 ,2 *n); -if (unit ==NULL ) -return -ENOMEM ; + unit =uvc_alloc_new_entity (dev,UVC_VC_EXTENSION_UNIT , + buffer[3 ], p +1 ,2 * n); +if (IS_ERR (unit)) +return PTR_ERR (unit);memcpy (unit->extension.guidExtensionCode, &buffer[4 ],16 ); unit->extension.bNumControls = buffer[20 ];
@@ -1231,10 +1244,10 @@ static int uvc_parse_standard_control(streturn -EINVAL ; } - term =uvc_alloc_entity (type |UVC_TERM_INPUT , buffer[3 ], -1 , n + p); -if (term ==NULL ) -return -ENOMEM ; + term =uvc_alloc_new_entity (dev, type |UVC_TERM_INPUT , + buffer[3 ],1 , n + p); +if (IS_ERR (term)) +return PTR_ERR (term);if (UVC_ENTITY_TYPE (term) ==UVC_ITT_CAMERA ) { term->camera.bControlSize = n;
@@ -1290,10 +1303,10 @@ static int uvc_parse_standard_control(streturn 0 ; } - term =uvc_alloc_entity (type |UVC_TERM_OUTPUT , buffer[3 ], -1 ,0 ); -if (term ==NULL ) -return -ENOMEM ; + term =uvc_alloc_new_entity (dev, type |UVC_TERM_OUTPUT , + buffer[3 ],1 ,0 ); +if (IS_ERR (term)) +return PTR_ERR (term);memcpy (term->baSourceID, &buffer[7 ],1 );
@@ -1314,9 +1327,10 @@ static int uvc_parse_standard_control(streturn -EINVAL ; } - unit =uvc_alloc_entity (buffer[2 ], buffer[3 ], p +1 ,0 ); -if (unit ==NULL ) -return -ENOMEM ; + unit =uvc_alloc_new_entity (dev, buffer[2 ], buffer[3 ], + p +1 ,0 ); +if (IS_ERR (unit)) +return PTR_ERR (unit);memcpy (unit->baSourceID, &buffer[5 ], p);
@@ -1338,9 +1352,9 @@ static int uvc_parse_standard_control(streturn -EINVAL ; } - unit =uvc_alloc_entity (buffer[2 ], buffer[3 ],2 , n); -if (unit ==NULL ) -return -ENOMEM ; + unit =uvc_alloc_new_entity (dev, buffer[2 ], buffer[3 ],2 , n); +if (IS_ERR (unit)) +return PTR_ERR (unit);memcpy (unit->baSourceID, &buffer[4 ],1 ); unit->processing.wMaxMultiplier =
@@ -1369,9 +1383,10 @@ static int uvc_parse_standard_control(streturn -EINVAL ; } - unit =uvc_alloc_entity (buffer[2 ], buffer[3 ], p +1 , n); -if (unit ==NULL ) -return -ENOMEM ; + unit =uvc_alloc_new_entity (dev, buffer[2 ], buffer[3 ], + p +1 , n); +if (IS_ERR (unit)) +return PTR_ERR (unit);memcpy (unit->extension.guidExtensionCode, &buffer[4 ],16 ); unit->extension.bNumControls = buffer[20 ];
Greg Kroah-Hartman
maintainerPATCH 458/459 octeontx2: Fix condition.
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: David S. Miller <[email protected]>
commit b0aae0bde26f276401640e05e81a8a0ce3d8f70e upstream.
--- drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c +1 -1
@@ -801,7 +801,7 @@ static int otx2_get_fecparam(struct net_if (IS_ERR (rsp))return PTR_ERR (rsp); -if (rsp->fwdata.supported_fec <=FEC_MAX_INDEX ) { +if (rsp->fwdata.supported_fec <FEC_MAX_INDEX ) {if (!rsp->fwdata.supported_fec) fecparam->fec =ETHTOOL_FEC_NONE ;else
Greg Kroah-Hartman
maintainerPATCH 459/459 octeontx2-pf: Fix otx2_get_fecparam()
In reply to Greg Kroah-Hartman5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dan Carpenter <[email protected]>
commit 38b5133ad607ecdcc8d24906d1ac9cc8df41acd5 upstream.
Static checkers complained about an off by one read overflow in otx2_get_fecparam() and we applied two conflicting fixes for it.
Correct: b0aae0bde26f ("octeontx2: Fix condition.")
Wrong: 93efb0c65683 ("octeontx2-pf: Fix out-of-bounds read in otx2_get_fecparam()")
Revert the incorrect fix.
--- drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c +1 -1
@@ -805,7 +805,7 @@ static int otx2_get_fecparam(struct net_if (!rsp->fwdata.supported_fec) fecparam->fec =ETHTOOL_FEC_NONE ;else - fecparam->fec = fec[rsp->fwdata.supported_fec -1 ]; + fecparam->fec = fec[rsp->fwdata.supported_fec]; }return 0 ; }
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.10.231 release. There are 459 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sat, 14 Dec 2024 14:41:35 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.10.231-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.10.y
and the diffstat can be found below.thanks,
greg k-h
On ARCH_BRCMSTB using 32-bit and 64-bit ARM kernels, build tested on BMIPS_GENERIC:
Signature · 1 line
Florian
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.10.231 release. There are 459 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sat, 14 Dec 2024 14:41:35 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.10.231-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.10.y
and the diffstat can be found below.thanks,
greg k-h
All tests passing for Tegra ...
Test results for stable-v5.10:
10 builds: 10 pass, 0 fail
26 boots: 26 pass, 0 fail
67 tests: 67 pass, 0 failLinux version: 5.10.231-rc1-g2146a7485c27
Boards tested: tegra124-jetson-tk1, tegra186-p2771-0000,
tegra194-p2972-0000, tegra194-p3509-0000+p3668-0000,
tegra20-ventana, tegra210-p2371-2180,
tegra210-p3450-0000, tegra30-cardhu-a04Jon
Quoted 4 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.10.231 release. There are 459 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Greg Kroah-Hartman wrote on Thu, Dec 12, 2024 at 03:55:38PM +0100:
Quoted 5 lines
This is the start of the stable review cycle for the 5.10.231 release. There are 459 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Quoted 8 lines
Responses should be made by Sat, 14 Dec 2024 14:41:35 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.10.231-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.10.y
and the diffstat can be found below.
Tested 2146a7485c27 ("Linux 5.10.231-rc1") on:
- arm i.MX6ULL (Armadillo 640)
- arm64 i.MX8MP (Armadillo G4)
No obvious regression in dmesg or basic tests:
Quoted 6 lines
Shengjiu Wang <[email protected]>
ASoC:fsl_micfil: fix the naming style for mask definitionShengjiu Wang <[email protected]>
ASoC:fsl_micfil: fixregmap_write_bitsusage
Quoted 8 lines
Sascha Hauer <[email protected]>
ASoC:fsl_micfil: use GENMASK to define register bit fieldsSascha Hauer <[email protected]>
ASoC:fsl_micfil: do not define SHIFT/MASK for single bitsSascha Hauer <[email protected]>
ASoC:fsl_micfil: Drop unnecessary register read
Just a note on these, our version (from nxp) of this was full of conflicts and too much effort to merge for something I cannot test easily, so I squashed out this part and re-cherry-picked just commits c808e277bcdf ("ASoC: fsl_micfil: Drop unnecessary register read") and 06df673d2023 ("ASoC: fsl_micfil: fix regmap_write_bits usage")
The other three commits are marked as a stable dep of 06df673d2023 but it really is trivial to backport and not worth the risk to me; if you'd like me to send the minimal backport I used I'll be happy to.
(but, as far as I'm concerned I'm fine as is as well and consider this closed; just reporting I didn't test this 100% as is. Not that my automated test actually exercises the micfil code anyway...)
Thanks,
Signature · 1 line
Dominique Martinet
Hi!
Quoted 4 lines
This is the start of the stable review cycle for the 5.10.231 release. There are 459 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
CIP testing did not find any problems here:
https://gitlab.com/cip-project/cip-testing/linux-stable-rc-ci/-/tree/linux-5.10.y
Best regards,
Pavel
Signature · 2 lines
DENX Software Engineering GmbH, Managing Director: Erika Unter HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.10.231 release. There are 459 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sat, 14 Dec 2024 14:41:35 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.10.231-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.10.y
and the diffstat can be found below.thanks,
greg k-h
OVERVIEW
Builds: 23 passed, 0 failed
Boot tests: 186 passed, 5 failed
CI systems: broonie, maestro
REVISION
Commit
name: v5.10.230-460-g2146a7485c27f
hash: 2146a7485c27f6f8373bb5570dee22631a7183a4
Checked out from
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.10.yBUILDS
No build failures found
BOOT TESTS
Failures
i386:(defconfig)
-hp-x360-14a-cb0001xx-zork
https://kcidb.kernelci.org/d/test/test?var-datasource=edquppk2ghfcwc&var-origin=maestro&var-build_architecture=$__all&var-build_config_name=$__all&var-id=maestro:675b11c5ca49c97d299a1b30&from=now-100y&to=now&timezone=browser&var-test_path=&var-issue_presence=$__all
-lenovo-TPad-C13-Yoga-zork
https://kcidb.kernelci.org/d/test/test?var-datasource=edquppk2ghfcwc&var-origin=maestro&var-build_architecture=$__all&var-build_config_name=$__all&var-id=maestro:675b11c6ca49c97d299a1b33&from=now-100y&to=now&timezone=browser&var-test_path=&var-issue_presence=$__all
-asus-CM1400CXA-dalboz
https://kcidb.kernelci.org/d/test/test?var-datasource=edquppk2ghfcwc&var-origin=maestro&var-build_architecture=$__all&var-build_config_name=$__all&var-id=maestro:675b11c4ca49c97d299a1b24&from=now-100y&to=now&timezone=browser&var-test_path=&var-issue_presence=$__all
CI system: maestro
arm:(multi_v7_defconfig)
-multi_v7_defconfig
https://kcidb.kernelci.org/d/test/test?var-datasource=edquppk2ghfcwc&var-origin=maestro&var-build_architecture=$__all&var-build_config_name=$__all&var-id=maestro:675b2f53ca49c97d299ab709&from=now-100y&to=now&timezone=browser&var-test_path=&var-issue_presence=$__all
-imx6q-udoo
https://kcidb.kernelci.org/d/test/test?var-datasource=edquppk2ghfcwc&var-origin=maestro&var-build_architecture=$__all&var-build_config_name=$__all&var-id=maestro:675b2f54ca49c97d299ab70c&from=now-100y&to=now&timezone=browser&var-test_path=&var-issue_presence=$__all
CI system: maestroSee complete and up-to-date report at:
https://kcidb.kernelci.org/d/revision/revision?orgId=1&var-git_commit_hash=2146a7485c27f6f8373bb5570dee22631a7183a4&var-patchset_hash=
Thanks,
KernelCI team
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.10.231 release. There are 459 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sat, 14 Dec 2024 14:41:35 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.10.231-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.10.y
and the diffstat can be found below.thanks,
greg k-h
Hi,
Please find the KernelCI report below :-
OVERVIEW
Builds: 28 passed, 0 failed
Boot tests: 154 passed, 0 failed
CI systems: maestro
REVISION
Commit
name:
hash: 26bbc21725ae44d2b10994af6d0fe6b3a2bb9d8b
Checked out from
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.15.y
BUILDS
No new build failures found
BOOT TESTS
No new boot failures found
See complete and up-to-date report at:
https://kcidb.kernelci.org/d/revision/revision?orgId=1&var-git_commit_hash=26bbc21725ae44d2b10994af6d0fe6b3a2bb9d8b&var-patchset_hash=&from=now-100y&to=now&timezone=browser&var-datasource=edquppk2ghfcwc&var-origin=maestro&var-build_architecture=$__all&var-build_config_name=$__all&var-test_path=boot
Thanks,
KernelCI team
Quoted 10 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.10.231 release. There are 459 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sat, 14 Dec 2024 14:41:35 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.10.231-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.10.y
and the diffstat can be found below.thanks,
greg k-h
Results from Linaro’s test farm.
No regressions on arm64, arm, x86_64, and i386.
NOTE:
-----
The following build warning seen with gcc-12 and clang-19 and clang-nightly builds.
Build warnings:
--------linux/kernel/sched/fair.c:8653:13: warning: 'update_nohz_stats' defined but not used [-Wunused-function]
8653 | static bool update_nohz_stats(struct rq *rq)
| ^~~~~~~~~~~~~~~~~
Link:
----
- https://storage.tuxsuite.com/public/linaro/lkft/builds/2q7sxmkFm8o6GI3rpD4gmlFmbVj/
## Build
* kernel: 5.10.231-rc1
* git: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
* git commit: 2146a7485c27f6f8373bb5570dee22631a7183a4
* git describe: v5.10.230-460-g2146a7485c27
* test details:
https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-5.10.y/build/v5.10.230-460-g2146a7485c27
## Test Regressions (compared to v5.10.229-83-gd7359abfa20d)
## Metric Regressions (compared to v5.10.229-83-gd7359abfa20d)
## Test Fixes (compared to v5.10.229-83-gd7359abfa20d)
## Metric Fixes (compared to v5.10.229-83-gd7359abfa20d)
## Test result summary
total: 49631, pass: 35698, fail: 2910, skip: 10999, xfail: 24
## Build Summary
* arc: 5 total, 5 passed, 0 failed
* arm: 101 total, 101 passed, 0 failed
* arm64: 28 total, 28 passed, 0 failed
* i386: 22 total, 22 passed, 0 failed
* mips: 22 total, 22 passed, 0 failed
* parisc: 3 total, 0 passed, 3 failed
* powerpc: 21 total, 21 passed, 0 failed
* riscv: 9 total, 9 passed, 0 failed
* s390: 9 total, 9 passed, 0 failed
* sh: 10 total, 10 passed, 0 failed
* sparc: 6 total, 6 passed, 0 failed
* x86_64: 24 total, 24 passed, 0 failed
## Test suites summary
* boot
* kselftest-arm64
* kselftest-breakpoints
* kselftest-capabilities
* kselftest-cgroup
* kselftest-clone3
* kselftest-core
* kselftest-cpu-hotplug
* kselftest-cpufreq
* kselftest-efivarfs
* kselftest-exec
* kselftest-filesystems
* kselftest-filesystems-binderfs
* kselftest-filesystems-epoll
* kselftest-firmware
* kselftest-fpu
* kselftest-ftrace
* kselftest-futex
* kselftest-gpio
* kselftest-intel_pstate
* kselftest-ipc
* kselftest-kcmp
* kselftest-livepatch
* kselftest-membarrier
* kselftest-memfd
* kselftest-mincore
* kselftest-mqueue
* kselftest-net
* kselftest-net-mptcp
* kselftest-openat2
* kselftest-ptrace
* kselftest-rseq
* kselftest-rtc
* kselftest-sigaltstack
* kselftest-size
* kselftest-tc-testing
* kselftest-timers
* kselftest-tmpfs
* kselftest-tpm2
* kselftest-user_events
* kselftest-vDSO
* kselftest-x86
* kunit
* libgpiod
* libhugetlbfs
* log-parser-boot
* log-parser-build-clang
* log-parser-build-gcc
* log-parser-test
* ltp-commands
* ltp-containers
* ltp-controllers
* ltp-crypto
* ltp-cve
* ltp-dio
* ltp-fcntl-locktests
* ltp-filecaps
* ltp-fs
* ltp-fs_bind
* ltp-fs_perms_simple
* ltp-hugetlb
* ltp-ipc
* ltp-math
* ltp-mm
* ltp-nptl
* ltp-pty
* ltp-sched
* ltp-smoke
* ltp-syscalls
* ltp-tracing
* perf
* rcutorture
--
Linaro LKFT
https://lkft.linaro.org
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.10.231 release. There are 459 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sat, 14 Dec 2024 14:41:35 +0000. Anything received after that time might be too late.
Build results:
total: 156 pass: 147 fail: 9 Failed builds: m68k:allnoconfig m68k:tinyconfig m68k_nommu:m5272c3_defconfig m68k_nommu:m5307c3_defconfig m68k_nommu:m5249evb_defconfig m68k_nommu:m5407c3_defconfig m68k_nommu:m5475evb_defconfig mips:ar7_defconfig nds32:allmodconfig Qemu test results: total: 480 pass: 479 fail: 1 Failed tests: m68k:mcf5208evb:m5208:m5208evb_defconfig:initrd
Some details below. Reverting
ef1db3d1d2bf clocksource/drivers:sp804: Make user selectable d08932bb6e38 clkdev: remove CONFIG_CLKDEV_LOOKUP
fixes the problem for m68k:tinyconfig and m68k:m5272c3_defconfig. I didn't check if it fixes the other failures, or if the revert affects anything else.
Guenter
---
Building m68k:allnoconfig ... failed
Building m68k:tinyconfig ... failed
--------------
Error log:
m68k-linux-ld: drivers/clk/clkdev.o: in function `clk_get':
clkdev.c:(.text+0x1b8): multiple definition of `clk_get'; arch/m68k/coldfire/clk.o:clk.c:(.text+0x44): first defined here
m68k-linux-ld: drivers/clk/clkdev.o: in function `clk_put':
clkdev.c:(.text+0x23e): multiple definition of `clk_put'; arch/m68k/coldfire/clk.o:clk.c:(.text+0x114): first defined here
Building m68k_nommu:m5272c3_defconfig ... failed
Building m68k_nommu:m5307c3_defconfig ... failed
(affects all nommu builds)
--------------
Error log:
m68k-linux-ld: drivers/clk/clkdev.o: in function `clk_get':
clkdev.c:(.text+0x1b8): multiple definition of `clk_get'; arch/m68k/coldfire/clk.o:clk.c:(.text+0x0): first defined here
m68k-linux-ld: drivers/clk/clkdev.o: in function `clk_put':
clkdev.c:(.text+0x23e): multiple definition of `clk_put'; arch/m68k/coldfire/clk.o:clk.c:(.text+0xe0): first defined here
Building mips:ar7_defconfig ... failed
--------------
Error log:
mips64-linux-ld: drivers/clk/clkdev.o: in function `clk_put':
clkdev.c:(.text+0x0): multiple definition of `clk_put'; arch/mips/ar7/clock.o:clock.c:(.text+0x1f8): first defined here
mips64-linux-ld: drivers/clk/clkdev.o: in function `clk_get':
clkdev.c:(.text+0x654): multiple definition of `clk_get'; arch/mips/ar7/clock.o:clock.c:(.text+0x28): first defined here
Building nds32:allmodconfig ... failed
--------------
Error log:ipc/sem.o: in function `perform_atomic_semop_slow':
sem.c:(.text+0x834): relocation truncated to fit: R_NDS32_9_PCREL_RELA against `.text'
Greg Kroah-Hartman
maintainerQuoted 27 lines · Guenter Roeck
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.10.231 release. There are 459 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sat, 14 Dec 2024 14:41:35 +0000. Anything received after that time might be too late.
Build results:
total: 156 pass: 147 fail: 9 Failed builds: m68k:allnoconfig m68k:tinyconfig m68k_nommu:m5272c3_defconfig m68k_nommu:m5307c3_defconfig m68k_nommu:m5249evb_defconfig m68k_nommu:m5407c3_defconfig m68k_nommu:m5475evb_defconfig mips:ar7_defconfig nds32:allmodconfig Qemu test results: total: 480 pass: 479 fail: 1 Failed tests: m68k:mcf5208evb:m5208:m5208evb_defconfig:initrd
Quoted 7 lines
Some details below. Reverting
ef1db3d1d2bfclocksource/drivers:sp804: Make user selectabled08932bb6e38clkdev: removeCONFIG_CLKDEV_LOOKUPfixes the problem for m68k:tinyconfig and m68k:m5272c3_defconfig. I didn't check if it fixes the other failures, or if the revert affects anything else.
Now dropped, thanks.
greg k-h