[for-next-3.11][PATCH 12/12] tracing: Do not (ab)use trace_seq in event_id_read()

2013-07-19 Thread Steven Rostedt
From: Oleg Nesterov event_id_read() has no reason to kmalloc "struct trace_seq" (more than PAGE_SIZE!), it can use a small buffer instead. Note: "if (*ppos) return 0" looks strange and even wrong, simple_read_from_buffer() handles ppos != 0 case corrrectly. And it seems that almost every user

[for-next-3.11][PATCH 12/12] tracing: Do not (ab)use trace_seq in event_id_read()

2013-07-19 Thread Steven Rostedt
From: Oleg Nesterov o...@redhat.com event_id_read() has no reason to kmalloc struct trace_seq (more than PAGE_SIZE!), it can use a small buffer instead. Note: if (*ppos) return 0 looks strange and even wrong, simple_read_from_buffer() handles ppos != 0 case corrrectly. And it seems that almost