|
@@ -9206,7 +9206,7 @@ static void perf_event_init_cpu(int cpu)
|
|
struct swevent_htable *swhash = &per_cpu(swevent_htable, cpu);
|
|
struct swevent_htable *swhash = &per_cpu(swevent_htable, cpu);
|
|
|
|
|
|
mutex_lock(&swhash->hlist_mutex);
|
|
mutex_lock(&swhash->hlist_mutex);
|
|
- if (swhash->hlist_refcount > 0) {
|
|
|
|
|
|
+ if (swhash->hlist_refcount > 0 && !swevent_hlist_deref(swhash)) {
|
|
struct swevent_hlist *hlist;
|
|
struct swevent_hlist *hlist;
|
|
|
|
|
|
hlist = kzalloc_node(sizeof(*hlist), GFP_KERNEL, cpu_to_node(cpu));
|
|
hlist = kzalloc_node(sizeof(*hlist), GFP_KERNEL, cpu_to_node(cpu));
|