Date: Wed, 11 Aug 2021 22:14:16 GMT From: John Baldwin <jhb@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 001f3d25518c - stable/13 - bhyve: fix regression in legacy virtio-9p config parsing Message-ID: <202108112214.17BMEG8u013876@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=001f3d25518c9179136629abf5ab42cab58c9347 commit 001f3d25518c9179136629abf5ab42cab58c9347 Author: Roman Bogorodskiy <novel@FreeBSD.org> AuthorDate: 2021-04-08 14:44:58 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2021-08-11 22:12:42 +0000 bhyve: fix regression in legacy virtio-9p config parsing Commit 621b5090487de9fed1b503769702a9a2a27cc7bb introduced a regression in legacy virtio-9p config parsing by not initializing *sharename to NULL. As a result, "sharename != NULL" check in the first iteration fails and bhyve exits with "virtio-9p: more than one share name given". Fix by adding NULL back. Approved by: grehan (cherry picked from commit f2ecc0d1b7d569b4b2c930c7450390c04778ee8a) --- usr.sbin/bhyve/pci_virtio_9p.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/bhyve/pci_virtio_9p.c b/usr.sbin/bhyve/pci_virtio_9p.c index 10023158f8bd..6c6dc483b7ba 100644 --- a/usr.sbin/bhyve/pci_virtio_9p.c +++ b/usr.sbin/bhyve/pci_virtio_9p.c @@ -232,7 +232,7 @@ pci_vt9p_notify(void *vsc, struct vqueue_info *vq) static int pci_vt9p_legacy_config(nvlist_t *nvl, const char *opts) { - char *sharename, *tofree, *token, *tokens; + char *sharename = NULL, *tofree, *token, *tokens; if (opts == NULL) return (0);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202108112214.17BMEG8u013876>