summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorSlava Pestov <slavapestov@google.com>2010-11-24 15:13:16 -0800
committerWilly Tarreau <w@1wt.eu>2011-02-09 22:15:39 +0100
commitab42f1f2ba5bea8d266ed383438ad5652617b366 (patch)
tree77e7c3f72e4abbceec819ad2f50944c741a5dfb8 /Makefile
parent19e91969bdb9e50973805dfaa7c0e9cd80ab6657 (diff)
tracing: Fix panic when lseek() called on "trace" opened for writing
commit 364829b1263b44aa60383824e4c1289d83d78ca7 upstream. 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. Signed-off-by: Slava Pestov <slavapestov@google.com> LKML-Reference: <1290640396-24179-1-git-send-email-slavapestov@google.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> [wt: applied to tracing_lt_fops too /wt] Signed-off-by: Willy Tarreau <w@1wt.eu>
Diffstat (limited to 'Makefile')
0 files changed, 0 insertions, 0 deletions