Hide Forgot
This bz is for valid issues reported by covscan for gfs2-utils and not covered by other bug reports. Just the one to begin with: http://cov01.lab.eng.brq.redhat.com/covscanhub/waiving/15317/54510/#defect_1057213 1. Defect type: CLANG_WARNING 1. cluster-3.0.12.1/gfs2/fsck/main.c:187:18: warning: The left operand of '==' is a garbage value # if (sc.sc_total == sdp->blks_total && # ~~~~~~~~~~~ ^ 4. cluster-3.0.12.1/gfs2/fsck/main.c:162:16: note: Left side of '&&' is false # if (sdp->gfs1 && !sdp->md.statfs->i_di.di_size) { # ^ 7. cluster-3.0.12.1/gfs2/fsck/main.c:169:2: note: Taking false branch # if (count == sizeof(struct gfs2_statfs_change)) # ^ 10. cluster-3.0.12.1/gfs2/fsck/main.c:177:2: note: Loop condition is false. Execution continues on line 187 # for (n = osi_first(&sdp->rgtree); n; n = next) { # ^ 13. cluster-3.0.12.1/gfs2/fsck/main.c:187:18: note: The left operand of '==' is a garbage value # if (sc.sc_total == sdp->blks_total && # ~~~~~~~~~~~ ^ # 185| # 186| /* See if they match */ # 187|-> if (sc.sc_total == sdp->blks_total && # 188| sc.sc_free == (sdp->blks_total - sdp->blks_alloced) && # 189| sc.sc_dinodes == sdp->dinodes_alloced) { Upstream fixes this just by initialising sc but a better fix would be to handle the earlier error condition from gfs2_readi() such that the function returns instead of leaving sc to be a garbage value.
Created attachment 1220829 [details] RHEL6 version of the upstream patch The RHEL6 version of the patch is slightly larger than upstream as check_statfs() was a void function. I've run it through covscan using the same base as ET and it shows that the issue has been fixed: http://cov01.lab.eng.brq.redhat.com/covscanhub/task/32817/log/fixed.html
Verified source of cluster-3.0.12.1-84.el6 include the attached patch.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2017-0601.html