[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [mini-os master] Mini-OS: fix 9pfs response receiving
commit b08019f0b2fbc30c75169a160acb9fd9af5d68f4 Author: Juergen Gross <jgross@xxxxxxxx> AuthorDate: Tue Nov 21 10:49:53 2023 +0100 Commit: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> CommitDate: Tue Nov 21 21:05:11 2023 +0000 Mini-OS: fix 9pfs response receiving 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@xxxxxxxx> Reviewed-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx> --- 9pfront.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/9pfront.c b/9pfront.c index 43c7409..35c5552 100644 --- a/9pfront.c +++ b/9pfront.c @@ -386,7 +386,9 @@ static void copy_bufs(unsigned char **buf1, unsigned char **buf2, printk("9pfs: short copy (dropping %u bytes)\n", len - *len1); len = *len1; } - memcpy(target, *buf1, *len1); + memcpy(target, *buf1, len); + *buf1 += len; + *len1 -= len; } } -- generated by git-patchbot for /home/xen/git/mini-os.git#master
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |