diff options
| author | Slava Pestov <[email protected]> | 2010-11-24 23:13:16 +0000 |
|---|---|---|
| committer | Steven Rostedt <[email protected]> | 2010-11-30 17:18:17 +0000 |
| commit | 364829b1263b44aa60383824e4c1289d83d78ca7 (patch) | |
| tree | daaaf4cecd56ff9f3f9a2eadc69d0cc4f361c607 /tools/perf/scripts/python/futex-contention.py | |
| parent | perf header: Don't assume there's no attr info if no sample ids is provided (diff) | |
| download | kernel-364829b1263b44aa60383824e4c1289d83d78ca7.tar.gz kernel-364829b1263b44aa60383824e4c1289d83d78ca7.zip | |
tracing: Fix panic when lseek() called on "trace" opened for writing
The file_ops struct for the "trace" special file defined llseek as seq_lseek().
However, if the file was opened for writing only, seq_open() was not called,
and the seek would dereference a null pointer, file->private_data.
This patch introduces a new wrapper for seq_lseek() which checks if the file
descriptor is opened for reading first. If not, it does nothing.
Cc: <[email protected]>
Signed-off-by: Slava Pestov <[email protected]>
LKML-Reference: <[email protected]>
Signed-off-by: Steven Rostedt <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/futex-contention.py')
0 files changed, 0 insertions, 0 deletions
