Re: [PATCH v2 3/3] perf tools: Add dso__data_get/put_fd()

From: Adrian Hunter
Date: Thu May 21 2015 - 03:09:15 EST


On 20/05/15 19:03, Namhyung Kim wrote:
> Using dso__data_fd() in multi-thread environment is not safe since
> returned fd can be closed and/or reused anytime. So convert it to the
> dso__data_get/put_fd() pair to protect the access with lock.
>
> The original dso__data_fd() is deprecated and kept only for testing.
>
> Cc: Adrian Hunter <adrian.hunter@xxxxxxxxx>
> Signed-off-by: Namhyung Kim <namhyung@xxxxxxxxxx>

Could convert dso_cache__read() and data_file_size() over to
dso__data_get/put_fd() too, but that can come later, so:

Acked-by: Adrian Hunter <adrian.hunter@xxxxxxxxx>


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/