diff options
author | Lukasz Pawelczyk <l.pawelczyk@samsung.com> | 2015-04-20 17:12:54 +0200 |
---|---|---|
committer | Casey Schaufler <casey@schaufler-ca.com> | 2015-05-15 17:36:03 +0200 |
commit | e774ad683f425a51f87711164ea166d9dcc41477 (patch) | |
tree | 0dcb99f91fe29472664f1ac4cd8714f30a6a020c /fs/locks.c | |
parent | Smack: ignore private inode for smack_file_receive (diff) | |
download | linux-e774ad683f425a51f87711164ea166d9dcc41477.tar.xz linux-e774ad683f425a51f87711164ea166d9dcc41477.zip |
smack: pass error code through pointers
This patch makes the following functions to use ERR_PTR() and related
macros to pass the appropriate error code through returned pointers:
smk_parse_smack()
smk_import_entry()
smk_fetch()
It also makes all the other functions that use them to handle the
error cases properly. This ways correct error codes from places
where they happened can be propagated to the user space if necessary.
Doing this it fixes a bug in onlycap and unconfined files
handling. Previously their content was cleared on any error from
smk_import_entry/smk_parse_smack, be it EINVAL (as originally intended)
or ENOMEM. Right now it only reacts on EINVAL passing other codes
properly to userspace.
Comments have been updated accordingly.
Signed-off-by: Lukasz Pawelczyk <l.pawelczyk@samsung.com>
Diffstat (limited to 'fs/locks.c')
0 files changed, 0 insertions, 0 deletions