diff options
author | Eric Paris <eparis@redhat.com> | 2011-04-28 15:55:52 -0400 |
---|---|---|
committer | Eric Paris <eparis@redhat.com> | 2011-04-28 15:56:07 -0400 |
commit | 150cdf6ec0ede8d9f102f1817212447727dcf08c (patch) | |
tree | 4044554d4a6824c3ca9a13cad911019b21b8e9d2 /lib/debugobjects.c | |
parent | 5a3ea8782c63d3501cb764c176f153c0d9a400e1 (diff) | |
download | kernel_samsung_smdk4412-150cdf6ec0ede8d9f102f1817212447727dcf08c.zip kernel_samsung_smdk4412-150cdf6ec0ede8d9f102f1817212447727dcf08c.tar.gz kernel_samsung_smdk4412-150cdf6ec0ede8d9f102f1817212447727dcf08c.tar.bz2 |
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 <steffen.klassert@secunet.com>
Signed-off-by: Eric Paris <eparis@redhat.com>
Tested-by: Chris Richards <gizmo@giz-works.com>
Cc: stable@kernel.org [2.6.38+]
Diffstat (limited to 'lib/debugobjects.c')
0 files changed, 0 insertions, 0 deletions