Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
flex_arrays: allow zero length flex arrays
commit bf69d41d198138e3c601e9a6645f4f1369aff7e0 upstream. 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: Steffen Klassert <[email protected]> Signed-off-by: Eric Paris <[email protected]> Tested-by: Chris Richards <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
- Loading branch information