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
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]> Cc: [email protected] [2.6.38+]
- Loading branch information