[Bug 1795813] Re: backport fix for SIGSEGV when using mysql plugin
Andreas Hasenack
andreas at canonical.com
Tue Oct 9 18:46:32 UTC 2018
Via code inspection, it looks like this affects cosmic as well:
/**
* Release a mysql connection
*/
static void conn_release(private_mysql_database_t *this, conn_t *conn)
{
this->mutex->lock(this->mutex);
conn->in_use = FALSE;
this->mutex->unlock(this->mutex);
}
The diff that was committed is:
--- a/src/libstrongswan/plugins/mysql/mysql_database.c
+++ b/src/libstrongswan/plugins/mysql/mysql_database.c
@@ -131,9 +131,13 @@ typedef struct {
*/
static void conn_release(private_mysql_database_t *this, conn_t *conn)
{
- this->mutex->lock(this->mutex);
- conn->in_use = FALSE;
- this->mutex->unlock(this->mutex);
+ /* do not release the connection while transactions are using it */
+ if (!this->transaction->get(this->transaction))
+ {
+ this->mutex->lock(this->mutex);
+ conn->in_use = FALSE;
+ this->mutex->unlock(this->mutex);
+ }
}
/**
** Summary changed:
- backport fix for SIGSEGV when using mysql plugin
+ fix for SIGSEGV when using mysql plugin
** Changed in: strongswan (Ubuntu)
Status: New => Triaged
** Changed in: strongswan (Ubuntu)
Importance: Undecided => Medium
--
You received this bug notification because you are a member of Ubuntu
Server, which is subscribed to strongswan in Ubuntu.
https://bugs.launchpad.net/bugs/1795813
Title:
fix for SIGSEGV when using mysql plugin
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/strongswan/+bug/1795813/+subscriptions
More information about the Ubuntu-server-bugs
mailing list