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
  • linux
  • lib
  • flex_array.c
Find file BlameHistoryPermalink
  • Eric Paris's avatar
    flex_arrays: allow zero length flex arrays · bf69d41d
    Eric Paris authored Apr 28, 2011
    
    
    Just like kmalloc will allow one to allocate a 0 length segment of memory
    flex arrays should do the same thing.  It should bomb if you try to use
    something, but it should at least allow the allocation.
    
    This is needed because when SELinux switched to using flex_arrays in 2.6.38
    the inability to allocate a 0 length array resulted in SELinux policy load
    returning -ENOSPC when previously it worked.
    
    Based-on-patch-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
    Signed-off-by: default avatarEric Paris <eparis@redhat.com>
    Tested-by: default avatarChris Richards <gizmo@giz-works.com>
    Cc: stable@kernel.org [2.6.38+]
    bf69d41d
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7