diff options
-rw-r--r-- | kernel/perf_event.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/perf_event.c b/kernel/perf_event.c index 040ee517c808..6b7ddba1dd64 100644 --- a/kernel/perf_event.c +++ b/kernel/perf_event.c | |||
@@ -2210,6 +2210,7 @@ static void perf_mmap_data_free(struct perf_mmap_data *data) | |||
2210 | perf_mmap_free_page((unsigned long)data->user_page); | 2210 | perf_mmap_free_page((unsigned long)data->user_page); |
2211 | for (i = 0; i < data->nr_pages; i++) | 2211 | for (i = 0; i < data->nr_pages; i++) |
2212 | perf_mmap_free_page((unsigned long)data->data_pages[i]); | 2212 | perf_mmap_free_page((unsigned long)data->data_pages[i]); |
2213 | kfree(data); | ||
2213 | } | 2214 | } |
2214 | 2215 | ||
2215 | #else | 2216 | #else |
@@ -2250,6 +2251,7 @@ static void perf_mmap_data_free_work(struct work_struct *work) | |||
2250 | perf_mmap_unmark_page(base + (i * PAGE_SIZE)); | 2251 | perf_mmap_unmark_page(base + (i * PAGE_SIZE)); |
2251 | 2252 | ||
2252 | vfree(base); | 2253 | vfree(base); |
2254 | kfree(data); | ||
2253 | } | 2255 | } |
2254 | 2256 | ||
2255 | static void perf_mmap_data_free(struct perf_mmap_data *data) | 2257 | static void perf_mmap_data_free(struct perf_mmap_data *data) |
@@ -2355,7 +2357,6 @@ static void perf_mmap_data_free_rcu(struct rcu_head *rcu_head) | |||
2355 | 2357 | ||
2356 | data = container_of(rcu_head, struct perf_mmap_data, rcu_head); | 2358 | data = container_of(rcu_head, struct perf_mmap_data, rcu_head); |
2357 | perf_mmap_data_free(data); | 2359 | perf_mmap_data_free(data); |
2358 | kfree(data); | ||
2359 | } | 2360 | } |
2360 | 2361 | ||
2361 | static void perf_mmap_data_release(struct perf_event *event) | 2362 | static void perf_mmap_data_release(struct perf_event *event) |