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

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'driver-core-5.18-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core

Pull driver core fixes from Greg KH:
"Here are some small driver core and kernfs fixes for some reported
problems. They include:

- kernfs regression that is causing oopses in 5.17 and newer releases

- topology sysfs fixes for a few small reported problems.

All of these have been in linux-next for a while with no reported
issues"

* tag 'driver-core-5.18-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
kernfs: fix NULL dereferencing in kernfs_remove
topology: Fix up build warning in topology_is_visible()
arch_topology: Do not set llc_sibling if llc_id is invalid
topology: make core_mask include at least cluster_siblings
topology/sysfs: Hide PPIN on systems that do not support it.

+26 -2
+10 -1
drivers/base/arch_topology.c
··· 667 667 core_mask = &cpu_topology[cpu].llc_sibling; 668 668 } 669 669 670 + /* 671 + * For systems with no shared cpu-side LLC but with clusters defined, 672 + * extend core_mask to cluster_siblings. The sched domain builder will 673 + * then remove MC as redundant with CLS if SCHED_CLUSTER is enabled. 674 + */ 675 + if (IS_ENABLED(CONFIG_SCHED_CLUSTER) && 676 + cpumask_subset(core_mask, &cpu_topology[cpu].cluster_sibling)) 677 + core_mask = &cpu_topology[cpu].cluster_sibling; 678 + 670 679 return core_mask; 671 680 } 672 681 ··· 693 684 for_each_online_cpu(cpu) { 694 685 cpu_topo = &cpu_topology[cpu]; 695 686 696 - if (cpuid_topo->llc_id == cpu_topo->llc_id) { 687 + if (cpu_topo->llc_id != -1 && cpuid_topo->llc_id == cpu_topo->llc_id) { 697 688 cpumask_set_cpu(cpu, &cpuid_topo->llc_sibling); 698 689 cpumask_set_cpu(cpuid, &cpu_topo->llc_sibling); 699 690 }
+10
drivers/base/topology.c
··· 152 152 NULL 153 153 }; 154 154 155 + static umode_t topology_is_visible(struct kobject *kobj, 156 + struct attribute *attr, int unused) 157 + { 158 + if (attr == &dev_attr_ppin.attr && !topology_ppin(kobj_to_dev(kobj)->id)) 159 + return 0; 160 + 161 + return attr->mode; 162 + } 163 + 155 164 static const struct attribute_group topology_attr_group = { 156 165 .attrs = default_attrs, 157 166 .bin_attrs = bin_attrs, 167 + .is_visible = topology_is_visible, 158 168 .name = "topology" 159 169 }; 160 170
+6 -1
fs/kernfs/dir.c
··· 1406 1406 */ 1407 1407 void kernfs_remove(struct kernfs_node *kn) 1408 1408 { 1409 - struct kernfs_root *root = kernfs_root(kn); 1409 + struct kernfs_root *root; 1410 + 1411 + if (!kn) 1412 + return; 1413 + 1414 + root = kernfs_root(kn); 1410 1415 1411 1416 down_write(&root->kernfs_rwsem); 1412 1417 __kernfs_remove(kn);