You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "zhaoyunjiong (JIRA)" <ji...@apache.org> on 2014/10/27 08:36:34 UTC
[jira] [Updated] (HADOOP-11234) Potential thread unsafe in
NetgroupCache
[ https://issues.apache.org/jira/browse/HADOOP-11234?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
zhaoyunjiong updated HADOOP-11234:
----------------------------------
Attachment: HADOOP-11234.patch
Add volatile for netgroupToUsersMapUpdated.
No need to add unit test.
> Potential thread unsafe in NetgroupCache
> ----------------------------------------
>
> Key: HADOOP-11234
> URL: https://issues.apache.org/jira/browse/HADOOP-11234
> Project: Hadoop Common
> Issue Type: Bug
> Components: security
> Reporter: zhaoyunjiong
> Assignee: zhaoyunjiong
> Priority: Minor
> Attachments: HADOOP-11234.patch
>
>
> In function getNetgroups:
> {code}
> if(netgroupToUsersMapUpdated) {
> netgroupToUsersMapUpdated = false; // at the beginning to avoid race
> {code}
> However, netgroupToUsersMapUpdated was not thread safe:
> {code}
> private static boolean netgroupToUsersMapUpdated = true;
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)