BACKPORT: LSM: restore certain default error codes
authorJan Beulich <JBeulich@suse.com>
Mon, 24 Aug 2015 12:22:25 +0000 (06:22 -0600)
committerRafal Krypa <r.krypa@samsung.com>
Mon, 21 Nov 2016 16:02:05 +0000 (17:02 +0100)
commit162615e35e15cb11984a34fcba20f567b379f3c8
tree9912e29c88f014c1b060ef9da4396a7d9f5a6027
parent39ee73cc8f3b8b83defaac0f2a9133582e220fa7
BACKPORT: LSM: restore certain default error codes

While in most cases commit b1d9e6b064 ("LSM: Switch to lists of hooks")
retained previous error returns, in three cases it altered them without
any explanation in the commit message. Restore all of them - in the
security_old_inode_init_security() case this led to reiserfs using
uninitialized data, sooner or later crashing the system (the only other
user of this function - ocfs2 - was unaffected afaict, since it passes
pre-initialized structures).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
Signed-off-by: James Morris <james.l.morris@oracle.com>
(cherry-picked from upstream e308fd3bb2e469c4939d3f4bd22b468de3ed04ae)
security/security.c