Skip to contentSkip to conversation

remove unnecessary ftrace WARN_ONCE's.

PATCH Dave Jones 2 participants 3 messages Apr 12, 2012 – Apr 20, 2012 Tracing

lore
Share & tools
lore

Dave Jones

author
#0 lore raw

These warnings are trivially triggerable by any user, and serve no useful purpose afaics Just -EINVAL and be done.

kernel/trace/trace.c +0 -2
index ed7b5d1..a745317 100644
@@ -4136,13 +4136,11 @@ tracing_buffers_splice_read(struct file *file, loff_t *ppos,
 		return -ENOMEM;
 
 	if (*ppos & (PAGE_SIZE - 1)) {
-		WARN_ONCE(1, "Ftrace: previous read must page-align\n");
 		ret = -EINVAL;
 		goto out;
 	}
 
 	if (len & (PAGE_SIZE - 1)) {
-		WARN_ONCE(1, "Ftrace: splice_read should page-align\n");
 		if (len < PAGE_SIZE) {
 			ret = -EINVAL;
 			goto out;
author
#1 lore raw
Quoted 14 lines · Dave Jones

These warnings are trivially triggerable by any user, and serve no useful purpose afaics Just -EINVAL and be done.

kernel/trace/trace.c +0 -1
index ed7b5d1..a745317 100644
@@ -4136,13 +4136,11 @@ tracing_buffers_splice_read(struct file *file, loff_t *ppos,
 		return -ENOMEM;
 
 	if (*ppos & (PAGE_SIZE - 1)) {
-		WARN_ONCE(1, "Ftrace: previous read must page-align\n");

kernel/trace/trace.c tracing_buffers_splice_read(struct file *file, loff_t *ppos,

Quoted 10 lines
kernel/trace/trace.c +0 -2
 		ret = -EINVAL;
 		goto out;
 	}
 
 	if (len & (PAGE_SIZE - 1)) {
-		WARN_ONCE(1, "Ftrace: splice_read should page-align\n");
 		if (len < PAGE_SIZE) {
 			ret = -EINVAL;
 			goto out;
--

Anyone want to pick this up, or shall I just send it to Linus myself ?

Dave

#2 lore raw
Quoted 19 lines · Dave Jones
Quoted 18 lines · Dave Jones

These warnings are trivially triggerable by any user, and serve no useful purpose afaics Just -EINVAL and be done.

kernel/trace/trace.c +0 -1
index ed7b5d1..a745317 100644
@@ -4136,13 +4136,11 @@ tracing_buffers_splice_read(struct file *file, loff_t *ppos,
 		return -ENOMEM;
 
 	if (*ppos & (PAGE_SIZE - 1)) {
-		WARN_ONCE(1, "Ftrace: previous read must page-align\n");
 		ret = -EINVAL;
 		goto out;
 	}
 
Quoted 8 lines

kernel/trace/trace.c tracing_buffers_splice_read(struct file *file, loff_t *ppos,

Quoted 6 lines
kernel/trace/trace.c +0 -2
 	if (len & (PAGE_SIZE - 1)) {
-		WARN_ONCE(1, "Ftrace: splice_read should page-align\n");
 		if (len < PAGE_SIZE) {
 			ret = -EINVAL;
 			goto out;
--

Anyone want to pick this up, or shall I just send it to Linus myself ?

I can pick this up, if you don't mind them going in on 3.5. As they are only WARN_ONCE errors, I don't think they are that big of a deal.

-- Steve