Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • L linux
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Kirill Smelkov
  • linux
  • Repository
You need to sign in or sign up before continuing.
  • linux
  • lib
  • bitmap.c
Find file BlameHistoryPermalink
  • Linus Torvalds's avatar
    bitmap: fix end condition in bitmap_find_free_region · aa8e4fc6
    Linus Torvalds authored Mar 12, 2009
    
    
    Guennadi Liakhovetski noticed that the end condition for the loop in
    bitmap_find_free_region() is wrong, and the "return if error" was also
    using the wrong conditional that would only trigger if the bitmap was an
    exact multiple of the allocation size, which is not necessarily the case
    with dma_alloc_from_coherent().
    
    Such a failure would end up in bitmap_find_free_region() accessing
    beyond the end of the bitmap.
    
    Reported-by: default avatarGuennadi Liakhovetski <lg@denx.de>
    Cc: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    aa8e4fc6
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7