When copying a 9pfs response chunk from the ring buffer across the
ring end, the local ring pointer and length field are not updated
correctly. Fix that.
Fixes: 0924fec1de58 ("Mini-OS: add 9pfs transport layer")
Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
printk("9pfs: short copy (dropping %u bytes)\n", len - *len1);
len = *len1;
}
- memcpy(target, *buf1, *len1);
+ memcpy(target, *buf1, len);
+ *buf1 += len;
+ *len1 -= len;
}
}