Commit f307bc28 authored by Juergen Gross's avatar Juergen Gross Committed by sanglipeng
Browse files

9p/xen: fix version parsing

stable inclusion
from stable-v5.10.173
commit c959a53b62a6d5bdcf6f2c4295714f68a2381f6a
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I7X0QU

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=c959a53b62a6d5bdcf6f2c4295714f68a2381f6a

--------------------------------

[ Upstream commit f1956f4e ]

When connecting the Xen 9pfs frontend to the backend, the "versions"
Xenstore entry written by the backend is parsed in a wrong way.

The "versions" entry is defined to contain the versions supported by
the backend separated by commas (e.g. "1,2"). Today only version "1"
is defined. Unfortunately the frontend doesn't look for "1" being
listed in the entry, but it is expecting the entry to have the value
"1".

This will result in failure as soon as the backend will support e.g.
versions "1" and "2".

Fix that by scanning the entry correctly.

Link: https://lkml.kernel.org/r/20230130113036.7087-2-jgross@suse.com


Fixes: 71ebd719 ("xen/9pfs: connect to the backend")
Signed-off-by: default avatarJuergen Gross <jgross@suse.com>
Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
Signed-off-by: default avatarDominique Martinet <asmadeus@codewreck.org>
Signed-off-by: default avatarEric Van Hensbergen <ericvh@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent e5584ee7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment