All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ftrace: return error instead of 12 bytes read
@ 2009-11-11 21:26 Roel Kluin
  2009-11-11 21:47 ` Andrew Morton
                   ` (3 more replies)
  0 siblings, 4 replies; 34+ messages in thread
From: Roel Kluin @ 2009-11-11 21:26 UTC (permalink / raw)
  To: Andrew Morton, LKML, ingo, rostedt

A negative error value is required: now we cannot
distinguish ENOMEM from a valid read of 12 bytes.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
 kernel/trace/trace.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index b20d3ec..03c7fd5 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -3730,7 +3730,7 @@ tracing_stats_read(struct file *filp, char __user *ubuf,
 
 	s = kmalloc(sizeof(*s), GFP_KERNEL);
 	if (!s)
-		return ENOMEM;
+		return -ENOMEM;
 
 	trace_seq_init(s);
 

^ permalink raw reply related	[flat|nested] 34+ messages in thread

end of thread, other threads:[~2009-11-18 17:14 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-11 21:26 [PATCH] ftrace: return error instead of 12 bytes read Roel Kluin
2009-11-11 21:47 ` Andrew Morton
2009-11-11 21:58   ` Steven Rostedt
2009-11-12  8:10   ` [patch] Fix: 'return -ENOMEM' instead of 'return ENOMEM' Ingo Molnar
2009-11-12  8:10     ` Ingo Molnar
2009-11-12  8:10     ` [Ocfs2-devel] " Ingo Molnar
2009-11-12  8:43     ` Dave Airlie
2009-11-12  8:43       ` Dave Airlie
2009-11-12  8:43       ` [Ocfs2-devel] " Dave Airlie
2009-11-12  9:31     ` roel kluin
2009-11-12  9:31       ` roel kluin
2009-11-12  9:31       ` [Ocfs2-devel] " roel kluin
2009-11-12 15:10       ` Mike Christie
2009-11-12 15:10         ` [Ocfs2-devel] " Mike Christie
2009-11-12  9:47     ` Alexey Dobriyan
2009-11-12 19:17     ` Joel Becker
2009-11-12 19:17       ` Joel Becker
2009-11-12 19:17       ` [Ocfs2-devel] " Joel Becker
2009-11-12 20:27       ` Joel Becker
2009-11-12 20:27         ` Joel Becker
2009-11-12 20:27         ` [Ocfs2-devel] " Joel Becker
2009-11-13  7:53         ` Ingo Molnar
2009-11-13 11:56           ` Joel Becker
2009-11-13 11:56             ` Joel Becker
2009-11-13 11:56             ` [Ocfs2-devel] " Joel Becker
2009-11-12 13:31   ` [PATCH] ftrace: return error instead of 12 bytes read Andy Whitcroft
2009-11-12 13:45     ` Ingo Molnar
2009-11-12 14:10       ` Andy Whitcroft
2009-11-18 10:18       ` Dan Merillat
2009-11-18 17:15         ` scameron
2009-11-11 21:57 ` Steven Rostedt
2009-11-12  2:33 ` [PATCH][GIT PULL][v2.6.32] tracing: Fix return value of tracing_stats_read() Steven Rostedt
2009-11-12  7:50   ` Ingo Molnar
2009-11-12  8:21 ` [tip:tracing/urgent] " tip-bot for Roel Kluin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.