Bug 217748

Summary: sys/dev/ixgbe/if_ix.c: PVS-Studio: Assignment to Variable without Use (CWE-563) (1)
Product: Base System Reporter: Svyatoslav <razmyslov>
Component: kernAssignee: freebsd-net (Nobody) <net>
Status: Closed FIXED    
Severity: Affects Many People CC: sbruno
Priority: --- Keywords: IntelNetworking, patch
Version: CURRENTFlags: sbruno: mfc-stable11?
sbruno: mfc-stable10?
Hardware: Any   
OS: Any   
Description Flags
git patch none

Description Svyatoslav 2017-03-13 12:14:12 UTC
Created attachment 180771 [details]
git patch

We have found and fixed a vulnerability 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 'vf->flags' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 5992, 5994. if_ix.c 5994
Comment 1 commit-hook freebsd_committer 2017-04-05 22:02:03 UTC
A commit references this bug:

Author: sbruno
Date: Wed Apr  5 22:01:49 UTC 2017
New revision: 316544
URL: https://svnweb.freebsd.org/changeset/base/316544

  Don't overrite vf->flags variable at the end of ixgbe(4) ixgbe_add_vf().

  Found by PVS-Studio Static code analyzer.

  PR:		217748
  Submitted by:	razmyslov@viva64.com
  MFC after:	1 week

Comment 2 Sean Bruno freebsd_committer 2018-05-28 00:58:57 UTC
verified that this is fixed in stable11.