Print this page
12257 resync smatch to 0.6.1-rc1-il-4

Split Close
Expand all
Collapse all
          --- old/usr/src/tools/smatch/src/check_locking.c
          +++ new/usr/src/tools/smatch/src/check_locking.c
↓ open down ↓ 1013 lines elided ↑ open up ↑
1014 1014                          goto swap_stree;
1015 1015                  line.value = return_sm->line;
1016 1016  
1017 1017                  sm = get_sm_state(my_id, name, sym);
1018 1018                  if (!sm)
1019 1019                          goto swap_stree;
1020 1020  
1021 1021                  if (parent_is_gone_var_sym(sm->name, sm->sym))
1022 1022                          goto swap_stree;
1023 1023  
1024      -                if (sm->state != &locked && sm->state != &unlocked)
     1024 +                if (sm->state != &locked &&
     1025 +                    sm->state != &unlocked &&
     1026 +                    sm->state != &restore)
1025 1027                          goto swap_stree;
1026 1028  
1027      -                if (sm->state == &unlocked && is_EINTR(estate_rl(return_sm->state)))
     1029 +                if ((sm->state == &unlocked || sm->state == &restore) &&
     1030 +                    is_EINTR(estate_rl(return_sm->state)))
1028 1031                          goto swap_stree;
1029 1032  
1030 1033                  bucket = success_fail_positive(estate_rl(return_sm->state));
1031 1034                  if (sm->state == &locked) {
1032 1035                          add_range(&locked_lines, line, line);
1033 1036                          locked_buckets[bucket] = true;
1034 1037                  }
1035      -                if (sm->state == &unlocked) {
     1038 +                if (sm->state == &unlocked || sm->state == &restore) {
1036 1039                          add_range(&unlocked_lines, line, line);
1037 1040                          unlocked_buckets[bucket] = true;
1038 1041                  }
1039 1042  swap_stree:
1040 1043                  __swap_cur_stree(orig);
1041 1044          } END_FOR_EACH_PTR(stree);
1042 1045  
1043 1046  
1044 1047          if (!locked_lines || !unlocked_lines)
1045 1048                  return;
↓ open down ↓ 245 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX