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 654285 Details for
Bug 881729
logsys: Race between logsys_format_set and log_printf_to_logs functions
[?]
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.
[patch]
Proposed patch
patch.patch (text/plain), 1.21 KB, created by
Jan Friesse
on 2012-11-29 13:13:42 UTC
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Jan Friesse
Created:
2012-11-29 13:13:42 UTC
Size:
1.21 KB
patch
obsolete
>commit a282eeecb4899ec415f76442217836338edfbeec >Author: jason <huzhijiang@gmail.com> >Date: Thu Nov 29 13:48:42 2012 +0100 > > log: Handle race in printf_to_logs and format_set > > When logsys_format_set is called, it can set format to NULL and if > logsys thread is actually reading it, corosync can segfault (NULL > pointer access). > > Solution is to lock format in log_printf_to_logs function. > > Signed-off-by: jason <huzhijiang@gmail.com> > Reviewed-by: Jan Friesse <jfriesse@redhat.com> > >diff --git a/exec/logsys.c b/exec/logsys.c >index 34de644..b82c647 100644 >--- a/exec/logsys.c >+++ b/exec/logsys.c >@@ -443,6 +443,8 @@ static void log_printf_to_logs ( > subsysid = LOGSYS_DECODE_SUBSYSID(rec_ident); > level = LOGSYS_DECODE_LEVEL(rec_ident); > >+ pthread_mutex_lock (&logsys_config_mutex); >+ > if (!((LOGSYS_DECODE_RECID(rec_ident) == LOGSYS_RECID_LOG) || > (logsys_loggers[subsysid].trace1_allowed && LOGSYS_DECODE_RECID(rec_ident) == LOGSYS_RECID_TRACE1))) { > return; >@@ -539,6 +541,8 @@ static void log_printf_to_logs ( > } > } > >+ pthread_mutex_unlock (&logsys_config_mutex); >+ > normal_output_buffer[normal_output_buffer_idx] = '\0'; > syslog_output_buffer[syslog_output_buffer_idx] = '\0'; >
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 Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 881729
: 654285 |
656433