diff options
Diffstat (limited to 'tools/perf/util/vdso.c')
| -rw-r--r-- | tools/perf/util/vdso.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/tools/perf/util/vdso.c b/tools/perf/util/vdso.c index 4b89118f158d..44d440da15dc 100644 --- a/tools/perf/util/vdso.c +++ b/tools/perf/util/vdso.c | |||
| @@ -236,18 +236,16 @@ static struct dso *__machine__findnew_compat(struct machine *machine, | |||
| 236 | const char *file_name; | 236 | const char *file_name; |
| 237 | struct dso *dso; | 237 | struct dso *dso; |
| 238 | 238 | ||
| 239 | pthread_rwlock_wrlock(&machine->dsos.lock); | ||
| 240 | dso = __dsos__find(&machine->dsos, vdso_file->dso_name, true); | 239 | dso = __dsos__find(&machine->dsos, vdso_file->dso_name, true); |
| 241 | if (dso) | 240 | if (dso) |
| 242 | goto out_unlock; | 241 | goto out; |
| 243 | 242 | ||
| 244 | file_name = vdso__get_compat_file(vdso_file); | 243 | file_name = vdso__get_compat_file(vdso_file); |
| 245 | if (!file_name) | 244 | if (!file_name) |
| 246 | goto out_unlock; | 245 | goto out; |
| 247 | 246 | ||
| 248 | dso = __machine__addnew_vdso(machine, vdso_file->dso_name, file_name); | 247 | dso = __machine__addnew_vdso(machine, vdso_file->dso_name, file_name); |
| 249 | out_unlock: | 248 | out: |
| 250 | pthread_rwlock_unlock(&machine->dsos.lock); | ||
| 251 | return dso; | 249 | return dso; |
| 252 | } | 250 | } |
| 253 | 251 | ||
