forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto fixes from Herbert Xu: - Fix for CPU hotplug hang in padata. - Avoid using cpu_active inappropriately in pcrypt and padata. - Fix for user-space algorithm lookup hang with IV generators. - Fix for netlink dump of algorithms where stuff went missing due to incorrect calculation of message size. * git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: user - Fix size of netlink dump message crypto: user - Fix lookup of algorithms with IV generator crypto: pcrypt - Use the online cpumask as the default padata: Fix cpu hotplug padata: Use the online cpumask as the default padata: Add a reference to the api documentation
- Loading branch information
Showing
8 changed files
with
103 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
/* | ||
* padata.c - generic interface to process data streams in parallel | ||
* | ||
* See Documentation/padata.txt for an api documentation. | ||
* | ||
* Copyright (C) 2008, 2009 secunet Security Networks AG | ||
* Copyright (C) 2008, 2009 Steffen Klassert <[email protected]> | ||
* | ||
|
@@ -354,13 +356,13 @@ static int padata_setup_cpumasks(struct parallel_data *pd, | |
if (!alloc_cpumask_var(&pd->cpumask.pcpu, GFP_KERNEL)) | ||
return -ENOMEM; | ||
|
||
cpumask_and(pd->cpumask.pcpu, pcpumask, cpu_active_mask); | ||
cpumask_and(pd->cpumask.pcpu, pcpumask, cpu_online_mask); | ||
if (!alloc_cpumask_var(&pd->cpumask.cbcpu, GFP_KERNEL)) { | ||
free_cpumask_var(pd->cpumask.cbcpu); | ||
return -ENOMEM; | ||
} | ||
|
||
cpumask_and(pd->cpumask.cbcpu, cbcpumask, cpu_active_mask); | ||
cpumask_and(pd->cpumask.cbcpu, cbcpumask, cpu_online_mask); | ||
return 0; | ||
} | ||
|
||
|
@@ -564,7 +566,7 @@ EXPORT_SYMBOL(padata_unregister_cpumask_notifier); | |
static bool padata_validate_cpumask(struct padata_instance *pinst, | ||
const struct cpumask *cpumask) | ||
{ | ||
if (!cpumask_intersects(cpumask, cpu_active_mask)) { | ||
if (!cpumask_intersects(cpumask, cpu_online_mask)) { | ||
pinst->flags |= PADATA_INVALID; | ||
return false; | ||
} | ||
|
@@ -678,7 +680,7 @@ static int __padata_add_cpu(struct padata_instance *pinst, int cpu) | |
{ | ||
struct parallel_data *pd; | ||
|
||
if (cpumask_test_cpu(cpu, cpu_active_mask)) { | ||
if (cpumask_test_cpu(cpu, cpu_online_mask)) { | ||
pd = padata_alloc_pd(pinst, pinst->cpumask.pcpu, | ||
pinst->cpumask.cbcpu); | ||
if (!pd) | ||
|
@@ -746,6 +748,9 @@ static int __padata_remove_cpu(struct padata_instance *pinst, int cpu) | |
return -ENOMEM; | ||
|
||
padata_replace(pinst, pd); | ||
|
||
cpumask_clear_cpu(cpu, pd->cpumask.cbcpu); | ||
cpumask_clear_cpu(cpu, pd->cpumask.pcpu); | ||
} | ||
|
||
return 0; | ||
|