mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 06:31:49 +00:00
driver core fix for 4.3-rc3
Here is one driver core fix for 4.3-rc3 that resolves a reported oops. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEABECAAYFAlYGyxEACgkQMUfUDdst+ymSHQCeLbNU+CN+kiCrEVRBxTKud08u yXUAoIy62VQpqHqJZaAYsLhSj9a9DHL3 =Y3WE -----END PGP SIGNATURE----- Merge tag 'driver-core-4.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core fix from Greg KH: "Here is one driver core fix for 4.3-rc3 that resolves a reported oops" * tag 'driver-core-4.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: cpu/cacheinfo: Fix teardown path
This commit is contained in:
commit
7c1efeae6d
@ -148,7 +148,11 @@ static void cache_shared_cpu_map_remove(unsigned int cpu)
|
|||||||
|
|
||||||
if (sibling == cpu) /* skip itself */
|
if (sibling == cpu) /* skip itself */
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
sib_cpu_ci = get_cpu_cacheinfo(sibling);
|
sib_cpu_ci = get_cpu_cacheinfo(sibling);
|
||||||
|
if (!sib_cpu_ci->info_list)
|
||||||
|
continue;
|
||||||
|
|
||||||
sib_leaf = sib_cpu_ci->info_list + index;
|
sib_leaf = sib_cpu_ci->info_list + index;
|
||||||
cpumask_clear_cpu(cpu, &sib_leaf->shared_cpu_map);
|
cpumask_clear_cpu(cpu, &sib_leaf->shared_cpu_map);
|
||||||
cpumask_clear_cpu(sibling, &this_leaf->shared_cpu_map);
|
cpumask_clear_cpu(sibling, &this_leaf->shared_cpu_map);
|
||||||
@ -159,6 +163,9 @@ static void cache_shared_cpu_map_remove(unsigned int cpu)
|
|||||||
|
|
||||||
static void free_cache_attributes(unsigned int cpu)
|
static void free_cache_attributes(unsigned int cpu)
|
||||||
{
|
{
|
||||||
|
if (!per_cpu_cacheinfo(cpu))
|
||||||
|
return;
|
||||||
|
|
||||||
cache_shared_cpu_map_remove(cpu);
|
cache_shared_cpu_map_remove(cpu);
|
||||||
|
|
||||||
kfree(per_cpu_cacheinfo(cpu));
|
kfree(per_cpu_cacheinfo(cpu));
|
||||||
@ -514,8 +521,7 @@ static int cacheinfo_cpu_callback(struct notifier_block *nfb,
|
|||||||
break;
|
break;
|
||||||
case CPU_DEAD:
|
case CPU_DEAD:
|
||||||
cache_remove_dev(cpu);
|
cache_remove_dev(cpu);
|
||||||
if (per_cpu_cacheinfo(cpu))
|
free_cache_attributes(cpu);
|
||||||
free_cache_attributes(cpu);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return notifier_from_errno(rc);
|
return notifier_from_errno(rc);
|
||||||
|
Loading…
Reference in New Issue
Block a user