Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • linux-vf linux-vf
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • 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-vflinux-vf
  • Repository
Switch branch/tag
  • linux-vf
  • arch
  • powerpc
  • kvm
  • book3s_hv_builtin.c
Find file BlameHistoryPermalink
  • Paul Mackerras's avatar
    KVM: PPC: Book3S HV: Fix kvm_alloc_linear in case where no linears exist · b4e51229
    Paul Mackerras authored Feb 03, 2012
    
    
    In kvm_alloc_linear we were using and deferencing ri after the
    list_for_each_entry had come to the end of the list.  In that
    situation, ri is not really defined and probably points to the
    list head.  This will happen every time if the free_linears list
    is empty, for instance.  This led to a NULL pointer dereference
    crash in memset on POWER7 while trying to allocate an HPT in the
    case where no HPTs were preallocated.
    
    This fixes it by using a separate variable for the return value
    from the loop iterator.
    
    Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
    Signed-off-by: default avatarAlexander Graf <agraf@suse.de>
    Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
    b4e51229