Bug 217782 - sys/dev/bhnd/cores/pmu/bhnd_pmu_subr.c: PVS-Studio: Assignment to Variable without Use (CWE-563) (3)
Summary: sys/dev/bhnd/cores/pmu/bhnd_pmu_subr.c: PVS-Studio: Assignment to Variable wi...
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Many People
Assignee: Michael Zhilin
Keywords: security
Depends on:
Reported: 2017-03-14 13:22 UTC by Svyatoslav
Modified: 2020-11-24 22:12 UTC (History)
4 users (show)

See Also:
koobs: mfc-stable11?

git patch (694 bytes, patch)
2017-03-14 13:22 UTC, Svyatoslav
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Svyatoslav 2017-03-14 13:22:32 UTC
Created attachment 180815 [details]
git patch

We have found and fixed a weakness using PVS-Studio tool. PVS-Studio is a static code analyzer for C, C++ and C#: https://www.viva64.com/en/pvs-studio/

Analyzer warning: V519 The 'pmuctrl' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 2025, 2026. bhnd_pmu_subr.c 2026
Comment 1 commit-hook freebsd_committer 2017-03-15 18:57:50 UTC
A commit references this bug:

Author: mizhka
Date: Wed Mar 15 18:57:19 UTC 2017
New revision: 315324
URL: https://svnweb.freebsd.org/changeset/base/315324

  [bhnd] fix mask for PMU control

  This patch fixes typo which results in extra bits of PMU control register.

  PR:     217782
  Submitted by:	Svyatoslav <razmyslov at viva64.com>
  Found by:	PVS-Studio

Comment 2 Eitan Adler freebsd_committer freebsd_triage 2018-05-23 10:26:55 UTC
batch change of PRs untouched in 2018 marked "in progress" back to open.
Comment 3 Ed Maste freebsd_committer 2018-05-23 14:44:10 UTC
This still needs to be evaluated for MFC
Comment 4 Oleksandr Tymoshenko freebsd_committer freebsd_triage 2019-01-21 19:29:30 UTC
FreeBSD 10 is EOL, should we close this PR as fixed?
Comment 5 Ed Maste freebsd_committer 2019-01-21 19:43:13 UTC
Does it need to go to stable/11?
Comment 6 Oleksandr Tymoshenko freebsd_committer freebsd_triage 2019-01-21 19:47:04 UTC
(In reply to Ed Maste from comment #5)

Looks like majority of bhnd commits never has been MFCed to stable/11, so I don't think there is any point in merging this one. But I'd leave it to maintainers.
Comment 7 Kubilay Kocak freebsd_committer freebsd_triage 2019-01-23 02:30:50 UTC
Assign to committer resolving (committed to head in base r315324)