On Wed 07 Nov 07:06 PST 2018, Xiang Xiao wrote: > because the trace buffer may contain the binary data > I think this patch is good. @Suman, as I know you're using this and would now read past the first \0 in the buffer, do you have any objections to it? Regards, Bjorn > Signed-off-by: Xiang Xiao <xiaoxiang@xxxxxxxxxx> > --- > 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 >