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 660930 Details for
Bug 883429
Incorrect synchronization in mmap cache
[?]
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]
mmap-cache.patch
mmap-cache.patch (text/plain), 1.53 KB, created by
Florian Weimer
on 2012-12-10 15:57:18 UTC
(
hide
)
Description:
mmap-cache.patch
Filename:
MIME Type:
Creator:
Florian Weimer
Created:
2012-12-10 15:57:18 UTC
Size:
1.53 KB
patch
obsolete
>diff --git a/src/sss_client/nss_mc_common.c b/src/sss_client/nss_mc_common.c >index a361f57..5c36e7b 100644 >--- a/src/sss_client/nss_mc_common.c >+++ b/src/sss_client/nss_mc_common.c >@@ -45,13 +45,15 @@ errno_t sss_nss_check_header(struct sss_cli_mc_ctx *ctx) > > /* retry barrier protected reading max 5 times then give up */ > for (count = 5; count > 0; count--) { >- memcpy(&h, ctx->mmap_base, sizeof(struct sss_mc_header)); >- /* we need a barrier here to make sure the compiler does not optimize >- * too much and avoids updating the register for the next check */ >- __sync_synchronize(); >- if (MC_VALID_BARRIER(h.b1) && h.b1 == h.b2) { >- /* record is consistent so we can proceed */ >- break; >+ struct sss_mc_header *ph = ctx->mmap_base; >+ uint32_t b1 = ph->b1; >+ if (MC_VALID_BARRIER(b1)) { >+ __sync_synchronize(); >+ memcpy(&h, ph, sizeof(struct sss_mc_header)); >+ __sync_synchronize(); >+ if (ph->b2 == b1) { >+ break; >+ } > } > } > if (count == 0) { >@@ -219,9 +221,8 @@ errno_t sss_nss_mc_get_record(struct sss_cli_mc_ctx *ctx, > rec = (struct sss_mc_rec *)rec_buf; > > /* we must check data is consistent again after the copy */ >- if (MC_VALID_BARRIER(rec->b1) && >- rec->b1 == rec->b2 && >- rec->len == rec_len) { >+ __sync_synchronize(); >+ if (rec->b2 == b1) { > /* record is consistent, use it */ > break; > }
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 883429
: 660930 |
661730
|
662504