Re: [PATCH V4 10/18] coresight: tmc: getting rid of multiple read access

From: Suzuki K Poulose
Date: Wed Apr 27 2016 - 04:54:50 EST


On 26/04/16 23:10, Mathieu Poirier wrote:
Allowing multiple readers to access the trace data simultaniously
via sysFS provides no shortage of opportunity for race condition,
mandates two variable to be maintained (drvdata::read_count and
drvdata::reading), makes the code complex and provide little
advantages, if any.

This patch streamlines the read process by restricting trace data
access to a single user. That way drvdata::read_count can
be eliminated and race conditions (along with faulty error handling)
in function tmc_open() and tmc_release() eliminated.

Signed-off-by: Mathieu Poirier <mathieu.poirier@xxxxxxxxxx>

Nice!

Reviewed-by: Suzuki K Poulose <suzuki.poulose@xxxxxxx>

Suzuki