Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • L linux-iv
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • linux-arm
  • linux-iv
  • Repository
  • linux-iv
  • drivers
  • net
  • ethernet
  • broadcom
  • bnxt
  • bnxt_sriov.c
Find file BlameHistoryPermalink
  • Venkat Duvvuru's avatar
    bnxt_en: Fix the 'Invalid VF' id check in bnxt_vf_ndo_prep routine. · 78f30004
    Venkat Duvvuru authored Jan 04, 2018
    In bnxt_vf_ndo_prep (which is called by bnxt_get_vf_config ndo), there is a
    check for "Invalid VF id". Currently, the check is done against max_vfs.
    However, the user doesn't always create max_vfs. So, the check should be
    against the created number of VFs. The number of bnxt_vf_info structures
    that are allocated in bnxt_alloc_vf_resources routine is the "number of
    requested VFs". So, if an "invalid VF id" falls between the requested
    number of VFs and the max_vfs, the driver will be dereferencing an invalid
    pointer.
    
    Fixes: c0c050c5
    
     ("bnxt_en: New Broadcom ethernet driver.")
    Signed-off-by: default avatarVenkat Devvuru <venkatkumar.duvvuru@broadcom.com>
    Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    78f30004