Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 618048 Details for
Bug 861069
Potential libvirtd segfault in netcf driver
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
Rough patch to fix mutex issue
libvirt-0.10.2-netcf-global-mutex.patch (text/plain), 2.87 KB, created by
Vladislav Bogdanov
on 2012-09-27 13:12:01 UTC
(
hide
)
Description:
Rough patch to fix mutex issue
Filename:
MIME Type:
Creator:
Vladislav Bogdanov
Created:
2012-09-27 13:12:01 UTC
Size:
2.87 KB
patch
obsolete
>diff -urNp libvirt-0.10.2.orig/src/interface/netcf_driver.c libvirt-0.10.2/src/interface/netcf_driver.c >--- libvirt-0.10.2.orig/src/interface/interface_backend_netcf.c 2011-07-20 01:23:18.000000000 +0000 >+++ libvirt-0.10.2/src/interface/interface_backend_netcf.c 2011-12-19 09:07:45.037310408 +0000 >@@ -44,6 +44,7 @@ > struct netcf *netcf; > }; > >+static struct interface_driver *driverState = NULL; > > static void interfaceDriverLock(struct interface_driver *driver) > { >@@ -123,59 +124,21 @@ > virConnectAuthPtr auth ATTRIBUTE_UNUSED, > unsigned int flags) > { >- struct interface_driver *driverState; > > virCheckFlags(VIR_CONNECT_RO, VIR_DRV_OPEN_ERROR); > >- if (VIR_ALLOC(driverState) < 0) >- { >- virReportOOMError(); >- goto alloc_error; >- } >- >- /* initialize non-0 stuff in driverState */ >- if (virMutexInit(&driverState->lock) < 0) >- { >- /* what error to report? */ >- goto mutex_error; >- } >- >- /* open netcf */ >- if (ncf_init(&driverState->netcf, NULL) != 0) >- { >- /* what error to report? */ >- goto netcf_error; >+ if (driverState == NULL) { >+ return VIR_DRV_OPEN_ERROR; > } > > conn->interfacePrivateData = driverState; > return VIR_DRV_OPEN_SUCCESS; > >-netcf_error: >- if (driverState->netcf) >- { >- ncf_close(driverState->netcf); >- } >- virMutexDestroy (&driverState->lock); >-mutex_error: >- VIR_FREE(driverState); >-alloc_error: >- return VIR_DRV_OPEN_ERROR; > } > > static int interfaceCloseInterface(virConnectPtr conn) > { > >- if (conn->interfacePrivateData != NULL) >- { >- struct interface_driver *driver = conn->interfacePrivateData; >- >- /* close netcf instance */ >- ncf_close(driver->netcf); >- /* destroy lock */ >- virMutexDestroy(&driver->lock); >- /* free driver state */ >- VIR_FREE(driver); >- } > conn->interfacePrivateData = NULL; > return 0; > } >@@ -662,6 +625,39 @@ > }; > > int interfaceRegister(void) { >+ if (driverState == NULL) { >+ if (VIR_ALLOC(driverState) < 0) >+ { >+ virReportOOMError(); >+ goto alloc_error; >+ } >+ >+ /* initialize non-0 stuff in driverState */ >+ if (virMutexInit(&driverState->lock) < 0) >+ { >+ /* what error to report? */ >+ goto mutex_error; >+ } >+ >+ /* open netcf */ >+ if (ncf_init(&driverState->netcf, NULL) != 0) >+ { >+ /* what error to report? */ >+ goto netcf_error; >+ } >+ } > virRegisterInterfaceDriver(&interfaceDriver); > return 0; >+ >+netcf_error: >+ if (driverState->netcf) >+ { >+ ncf_close(driverState->netcf); >+ } >+ virMutexDestroy (&driverState->lock); >+mutex_error: >+ VIR_FREE(driverState); >+ driverState = NULL; >+alloc_error: >+ return -1; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 861069
: 618048