From patchwork Thu Oct 10 23:00:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Morris X-Patchwork-Id: 11184555 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F068F76 for ; Thu, 10 Oct 2019 23:00:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CFDC020B7C for ; Thu, 10 Oct 2019 23:00:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726358AbfJJXAe (ORCPT ); Thu, 10 Oct 2019 19:00:34 -0400 Received: from namei.org ([65.99.196.166]:53540 "EHLO namei.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726321AbfJJXAe (ORCPT ); Thu, 10 Oct 2019 19:00:34 -0400 Received: from localhost (localhost [127.0.0.1]) by namei.org (8.14.4/8.14.4) with ESMTP id x9AN0Xil009597 for ; Thu, 10 Oct 2019 23:00:33 GMT Date: Fri, 11 Oct 2019 10:00:33 +1100 (AEDT) From: James Morris To: linux-security-module@vger.kernel.org Subject: shmem: fix LSM options parsing (fwd) Message-ID: User-Agent: Alpine 2.21 (LRH 202 2017-01-01) MIME-Version: 1.0 Sender: owner-linux-security-module@vger.kernel.org Precedence: bulk List-ID: ---------- Forwarded message ---------- Date: Thu, 10 Oct 2019 15:42:18 +0000 From: Linux Kernel Mailing List Reply-To: Al Viro To: git-commits-head@vger.kernel.org Subject: shmem: fix LSM options parsing Commit: 33f37c648812bdbe1bd1eea75ddab3e799d51e77 Parent: a3bc18a48e2e678efe62f1f9989902f9cd19e0ff Refname: refs/heads/master Web: https://git.kernel.org/torvalds/c/33f37c648812bdbe1bd1eea75ddab3e799d51e77 Author: Al Viro AuthorDate: Wed Oct 9 22:48:01 2019 -0400 Committer: Al Viro CommitDate: Wed Oct 9 22:48:01 2019 -0400 shmem: fix LSM options parsing ->parse_monolithic() there forgets to call security_sb_eat_lsm_opts() Signed-off-by: Al Viro --- mm/shmem.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mm/shmem.c b/mm/shmem.c index 0f7fd4a85db6..8dcc8d04cbaf 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -3482,6 +3482,12 @@ static int shmem_parse_options(struct fs_context *fc, void *data) { char *options = data; + if (options) { + int err = security_sb_eat_lsm_opts(options, &fc->security); + if (err) + return err; + } + while (options != NULL) { char *this_char = options; for (;;) {