|
@@ -1014,9 +1014,9 @@ int __kprobes register_kretprobe(struct kretprobe *rp)
|
|
/* Pre-allocate memory for max kretprobe instances */
|
|
/* Pre-allocate memory for max kretprobe instances */
|
|
if (rp->maxactive <= 0) {
|
|
if (rp->maxactive <= 0) {
|
|
#ifdef CONFIG_PREEMPT
|
|
#ifdef CONFIG_PREEMPT
|
|
- rp->maxactive = max(10, 2 * NR_CPUS);
|
|
|
|
|
|
+ rp->maxactive = max(10, 2 * num_possible_cpus());
|
|
#else
|
|
#else
|
|
- rp->maxactive = NR_CPUS;
|
|
|
|
|
|
+ rp->maxactive = num_possible_cpus();
|
|
#endif
|
|
#endif
|
|
}
|
|
}
|
|
spin_lock_init(&rp->lock);
|
|
spin_lock_init(&rp->lock);
|