[libvirt] [PATCH] NFS storage pool: Fix libvirtd crash due to refactor edit
Eric Blake
eblake at redhat.com
Fri Apr 4 15:58:57 UTC 2014
On 04/04/2014 08:36 AM, John Ferlan wrote:
> Commit id '18642d10' refactored the call to virCommandRunRegex()
> inside a new function virStorageBackendFileSystemNetFindNFSPoolSources(),
> but the cut-n-paste didn't remove the "&state". Now that state is passed
> by reference, it results in a libvirtd core with a messages entry:
>
> "...internal error: unknown storage pool type Unknow"
>
> Signed-off-by: John Ferlan <jferlan at redhat.com>
> ---
> src/storage/storage_backend_fs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/storage/storage_backend_fs.c b/src/storage/storage_backend_fs.c
> index 1d85871..4e4a7ae 100644
> --- a/src/storage/storage_backend_fs.c
> +++ b/src/storage/storage_backend_fs.c
> @@ -266,7 +266,7 @@ virStorageBackendFileSystemNetFindNFSPoolSources(virNetfsDiscoverState *state)
>
> if (virCommandRunRegex(cmd, 1, regexes, vars,
> virStorageBackendFileSystemNetFindPoolSourcesFunc,
> - &state, NULL) < 0)
> + state, NULL) < 0)
Eww that the compiler couldn't flag this - but that really is the void*
opaque argument where the burden is on us to pass the correct type. ACK.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140404/a54cd22b/attachment-0001.sig>
More information about the libvir-list
mailing list