Skip to content
Snippets Groups Projects
Commit eaf0e7a3 authored by Paul Moore's avatar Paul Moore
Browse files

lsm: handle the NULL buffer case in lsm_fill_user_ctx()


Passing a NULL buffer into the lsm_get_self_attr() syscall is a valid
way to quickly determine the minimum size of the buffer needed to for
the syscall to return all of the LSM attributes to the caller.
Unfortunately we/I broke that behavior in commit d7cf3412
("lsm: consolidate buffer size handling into lsm_fill_user_ctx()")
such that it returned an error to the caller; this patch restores the
original desired behavior of using the NULL buffer as a quick way to
correctly size the attribute buffer.

Cc: stable@vger.kernel.org
Fixes: d7cf3412 ("lsm: consolidate buffer size handling into lsm_fill_user_ctx()")
Signed-off-by: default avatarPaul Moore <paul@paul-moore.com>
parent a5a858f6
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment