[libvirt] [PATCH]POWER Hypervisor: Fix the segment fault issue for the "list" command

Daniel P. Berrange berrange at redhat.com
Wed Jul 11 14:59:41 UTC 2012


On Wed, Jul 11, 2012 at 06:05:28PM +0800, Dennis Chen wrote:
> When connect to the remote IBM HMC/IVM server, the remoteNetworkOpen() called
> after the phypOpen() in do_open function will re-assign a NULL pointer to the
> virConnectPtr conn->networkPrivateData which is allocated in phypOpen(), this
> will result in a segment fault issue when execute the following commands,
> eg, "virsh# list --all"
> 
> Signed-off-by: Dennis Chen<dennis.chen at tnsoft.com.cn>
> ---
>  src/remote/remote_driver.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
> index eac50e6..22ef129 100644
> --- a/src/remote/remote_driver.c
> +++ b/src/remote/remote_driver.c
> @@ -2504,7 +2504,8 @@ static virDrvOpenStatus ATTRIBUTE_NONNULL (1)
>  remoteGenericOpen(virConnectPtr conn, virConnectAuthPtr auth,
>                    unsigned int flags, void **genericPrivateData)
>  {
> -    if (inside_daemon)
> +    if (inside_daemon ||
> +       STREQ (conn->driver->name, "PHYP"))
>          return VIR_DRV_OPEN_DECLINED;
> 
>      if (conn->driver&&

This needs to be fixed in the PHYP driver code actually. In its
phypRegister() method it should be registering a network driver
impl of its own.


Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|




More information about the libvir-list mailing list