BACKPORT: smack: fix logic in smack_inode_init_security function
authorLukasz Pawelczyk <l.pawelczyk@samsung.com>
Wed, 26 Nov 2014 14:31:07 +0000 (15:31 +0100)
committerRafal Krypa <r.krypa@samsung.com>
Thu, 30 Jun 2016 12:57:42 +0000 (14:57 +0200)
commitcef474df740bea92ad0cd16824c179ac14747a9d
treeffc40f30f262cac3a38af1c4ff7683b0e402329f
parent4684a7e2f58db74e5fecaaca461418a5af64eeb6
BACKPORT: smack: fix logic in smack_inode_init_security function

In principle if this function was called with "value" == NULL and "len"
not NULL it could return different results for the "len" compared to a
case where "name" was not NULL. This is a hypothetical case that does
not exist in the kernel, but it's a logic bug nonetheless.

Signed-off-by: Lukasz Pawelczyk <l.pawelczyk@samsung.com>
(cherry-picked from upstream 68390ccf8b0a3470032f053d50379cfd49fbe952)
security/smack/smack_lsm.c