| commit | 19cae4b11accf692fb67d6ba92833ca45dd63197 | [log] [tgz] |
|---|---|---|
| author | Marco Elver <elver@google.com> | Wed Feb 05 11:14:19 2020 +0100 |
| committer | Paul E. McKenney <paulmck@kernel.org> | Wed Feb 05 06:28:37 2020 -0800 |
| tree | e35d4de3bc0a5f3dae124d16d2ab65dcfd7baae4 | |
| parent | 34c19ad2424481c5c5218fe36665c59086f7303d [diff] |
kcsan: Fix 0-sized checks
Instrumentation of arbitrary memory-copy functions, such as user-copies,
may be called with size of 0, which could lead to false positives.
To avoid this, add a comparison in check_access() for size==0, which
will be optimized out for constant sized instrumentation
(__tsan_{read,write}N), and therefore not affect the common-case
fast-path.
Signed-off-by: Marco Elver <elver@google.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>