lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Tue, 12 May 2009 03:11:09 -0400
From:	Amerigo Wang <amwang@...hat.com>
To:	linux-kernel@...r.kernel.org
Cc:	Steven Rostedt <rostedt@...dmis.org>, akpm@...ux-foundation.org,
	Amerigo Wang <amwang@...hat.com>
Subject: [PATCH] trace: fix a wrong usage of simple_read_from_buffer()


The last argument of simple_read_from_buffer() is the amount of the
available bytes in the buffer, not the size of the buffer.

Signed-off-by: WANG Cong <amwang@...hat.com>
Cc: Steven Rostedt <rostedt@...dmis.org>

---
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index a884c09..3a0bc70 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -2125,7 +2125,7 @@ tracing_cpumask_read(struct file *filp, char __user *ubuf,
 		goto out_err;
 	}
 	len += sprintf(mask_str + len, "\n");
-	count = simple_read_from_buffer(ubuf, count, ppos, mask_str, NR_CPUS+1);
+	count = simple_read_from_buffer(ubuf, count, ppos, mask_str, len);
 
 out_err:
 	mutex_unlock(&tracing_cpumask_update_lock);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ