Re: linux-next boot error (2)

From: Stephen Rothwell
Date: Tue Sep 11 2018 - 16:35:04 EST


Hi David,

On Tue, 11 Sep 2018 21:16:27 +0100 David Howells <dhowells@xxxxxxxxxx> wrote:
>
> Andrei Vagin spotted a missing change to apparmor:
> apparmor_fs_context_parse_param() needs to return -ENOPARAM, not 0.

I will apply this fix until the proper fix arrives in the vfs tree:

From: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
Date: Wed, 12 Sep 2018 06:27:43 +1000
Subject: [PATCH] apparmor: fix a return value

Signed-off-by: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
---
security/apparmor/lsm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c
index c316d4237d94..416204ea713d 100644
--- a/security/apparmor/lsm.c
+++ b/security/apparmor/lsm.c
@@ -602,7 +602,7 @@ static int apparmor_fs_context_parse_param(struct fs_context *fc,

afc->saved_options = p;
afc->saved_size += 1 + len;
- return 0;
+ return -ENOPARAM;
}

static int apparmor_sb_mountpoint(struct fs_context *fc, struct path *mountpoint,
--
2.19.0.rc2

--
Cheers,
Stephen Rothwell

Attachment: pgpOBVDdv6TUs.pgp
Description: OpenPGP digital signature