Commit eed68075 authored by Federico Vaga's avatar Federico Vaga

sw:drv: bugfix copy the safe copy of the message

Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent 7840e6f3
......@@ -750,7 +750,7 @@ static ssize_t trtl_hmq_read(struct file *f, char __user *ubuf,
spin_unlock(&buf->lock);
/* now we copy to user space and we can safely sleep */
if (copy_to_user(ubuf + count, msg, copy_size)) {
if (copy_to_user(ubuf + count, &buf->msg_tmp, copy_size)) {
err = -EFAULT;
break;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment