]> git.baikalelectronics.ru Git - kernel.git/commit
9p/xen: fix check for xenbus_read error in front_probe
authorDominique Martinet <dominique.martinet@cea.fr>
Tue, 14 Aug 2018 02:43:48 +0000 (02:43 +0000)
committerDominique Martinet <dominique.martinet@cea.fr>
Mon, 27 Aug 2018 05:59:29 +0000 (14:59 +0900)
commita4b90ad9d023950edf5f1d9736bbd86f91f2df2a
tree467a3db6b689c4cfcb49834890a6381ae168b0be
parentf030a7bb7b1f7de16c1c716a587185e209e25800
9p/xen: fix check for xenbus_read error in front_probe

If the xen bus exists but does not expose the proper interface, it is
possible to get a non-zero length but still some error, leading to
strcmp failing trying to load invalid memory addresses e.g.
fffffffffffffffe.

There is then no need to check length when there is no error, as the
xenbus driver guarantees that the string is nul-terminated.

Link: http://lkml.kernel.org/r/1534236007-10170-1-git-send-email-asmadeus@codewreck.org
Signed-off-by: Dominique Martinet <dominique.martinet@cea.fr>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Cc: Eric Van Hensbergen <ericvh@gmail.com>
Cc: Latchesar Ionkov <lucho@ionkov.net>
net/9p/trans_xen.c