All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] remoteproc: debug: remove strlen call in rproc_trace_read
@ 2018-11-07 15:06 Xiang Xiao
  2018-11-08  6:13 ` Bjorn Andersson
  0 siblings, 1 reply; 6+ messages in thread
From: Xiang Xiao @ 2018-11-07 15:06 UTC (permalink / raw)
  To: linux-remoteproc, bjorn.andersson; +Cc: Xiang Xiao

because the trace buffer may contain the binary data

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
---
 drivers/remoteproc/remoteproc_debugfs.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/remoteproc/remoteproc_debugfs.c b/drivers/remoteproc/remoteproc_debugfs.c
index e90135c..0808466 100644
--- a/drivers/remoteproc/remoteproc_debugfs.c
+++ b/drivers/remoteproc/remoteproc_debugfs.c
@@ -48,9 +48,8 @@ static ssize_t rproc_trace_read(struct file *filp, char __user *userbuf,
 				size_t count, loff_t *ppos)
 {
 	struct rproc_mem_entry *trace = filp->private_data;
-	int len = strnlen(trace->va, trace->len);
 
-	return simple_read_from_buffer(userbuf, count, ppos, trace->va, len);
+	return simple_read_from_buffer(userbuf, count, ppos, trace->va, trace->len);
 }
 
 static const struct file_operations trace_rproc_ops = {
-- 
2.7.4

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

end of thread, other threads:[~2018-11-09  8:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-07 15:06 [PATCH] remoteproc: debug: remove strlen call in rproc_trace_read Xiang Xiao
2018-11-08  6:13 ` Bjorn Andersson
2018-11-08  8:10   ` Loic PALLARDY
2018-11-08 10:08     ` xiang xiao
2018-11-08 21:01       ` Loic PALLARDY
2018-11-09  8:13         ` xiang xiao

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.