Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'sh-for-v6.13-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/glaubitz/sh-linux

Pull sh updates from John Paul Adrian Glaubitz:
"Two small fixes.

The first one by Huacai Chen addresses a runtime warning when
CONFIG_CPUMASK_OFFSTACK and CONFIG_DEBUG_PER_CPU_MAPS are selected
which occurs because the cpuinfo code on sh incorrectly uses NR_CPUS
when iterating CPUs instead of the runtime limit nr_cpu_ids.

A second fix by Dan Carpenter fixes a use-after-free bug in
register_intc_controller() which occurred as a result of improper
error handling in the interrupt controller driver code when
registering an interrupt controller during plat_irq_setup() on sh"

* tag 'sh-for-v6.13-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/glaubitz/sh-linux:
sh: intc: Fix use-after-free bug in register_intc_controller()
sh: cpuinfo: Fix a warning for CONFIG_CPUMASK_OFFSTACK

+2 -2
+1 -1
arch/sh/kernel/cpu/proc.c
··· 132 132 133 133 static void *c_start(struct seq_file *m, loff_t *pos) 134 134 { 135 - return *pos < NR_CPUS ? cpu_data + *pos : NULL; 135 + return *pos < nr_cpu_ids ? cpu_data + *pos : NULL; 136 136 } 137 137 static void *c_next(struct seq_file *m, void *v, loff_t *pos) 138 138 {
+1 -1
drivers/sh/intc/core.c
··· 209 209 goto err0; 210 210 211 211 INIT_LIST_HEAD(&d->list); 212 - list_add_tail(&d->list, &intc_list); 213 212 214 213 raw_spin_lock_init(&d->lock); 215 214 INIT_RADIX_TREE(&d->tree, GFP_ATOMIC); ··· 368 369 369 370 d->skip_suspend = desc->skip_syscore_suspend; 370 371 372 + list_add_tail(&d->list, &intc_list); 371 373 nr_intc_controllers++; 372 374 373 375 return 0;