diff options
author | Eric Paris <eparis@redhat.com> | 2011-04-28 15:55:52 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-05-09 15:06:44 -0700 |
commit | 18ab890cdc1e014d2ced35a5b8e606871ed5e6fc (patch) | |
tree | a53580f6543a704eca40a90fca7629b135d54ca9 /crypto | |
parent | c4ac4195df7fcb85ade58dd0497e273dd10600e7 (diff) |
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 <steffen.klassert@secunet.com>
Signed-off-by: Eric Paris <eparis@redhat.com>
Tested-by: Chris Richards <gizmo@giz-works.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'crypto')
0 files changed, 0 insertions, 0 deletions