From patchwork Thu Sep 6 00:10:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Vagin X-Patchwork-Id: 10589691 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E471B112B for ; Thu, 6 Sep 2018 00:11:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CA7F12A965 for ; Thu, 6 Sep 2018 00:11:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BD2FA2A969; Thu, 6 Sep 2018 00:11:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D06B02A965 for ; Thu, 6 Sep 2018 00:11:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725850AbeIFEoH (ORCPT ); Thu, 6 Sep 2018 00:44:07 -0400 Received: from mail-lf1-f68.google.com ([209.85.167.68]:34160 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725781AbeIFEoH (ORCPT ); Thu, 6 Sep 2018 00:44:07 -0400 Received: by mail-lf1-f68.google.com with SMTP id c29-v6so7548007lfj.1 for ; Wed, 05 Sep 2018 17:11:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id; bh=Ib/dZxX4QjUA0k1Aa1W01xulRxf+pKWGIC2Lc7woLoE=; b=W8agGKDyUvcusnoRi651wyTDbZVgrAs4+uKEmubv2LjlkLUTJi1Pba4gkae9j0ujVK PaoFYwroa6N6kzwJb9t6+xIVHyley5F743Vr9mi1Kir8U+1cS38XmTZYk4/erPMAu4LT B38muGv37Ga/idkpKwKv0UqPdlLvIc6Onv49jDzj0iHxKsVOFOo1UvPXlgrG2PNDOBir 9WBi3OWkrBmm6t4Iqhn5JYRJ785Q0VWAYPYFVO8A+ZuSCsU9rQo4CI2CvbIq0o87bkN5 PSHEPdsBPKpECpycixJKlA4ldQ2q4dm1C5vDdMzboPtDmUXlxlyns+I/OtRYzC2IhY3U IrQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id; bh=Ib/dZxX4QjUA0k1Aa1W01xulRxf+pKWGIC2Lc7woLoE=; b=SMspxesQ2nl7xTWedMMsk4wweufl1n+nWjz4PiQzCWjCLrA3lq06z3kzNCRRvDlDdB TChjrCluF8SHs10bEn201lhrhD4ooucsHiJVblpa5zXZkf7sMdwlJ/ZsnuIbN+XNH560 ftCCxoteOORPeO2o2MjwYqCog6r3T5gaXDvodM2YfyzI58J1TNvS6hhzozBIcvdxBm3d A7Tg8gKCZvIkAXwXYl6HfqkNAzcJrizwWEJXVN8RdkwQ+hNpT/cI2pnH+Q8qaFTDMZpY jXXugut0HPf3xO1/oCjAtyAJ9MgNNTXHLMhK4S2k7/pQ5DJOgiMPf4p3PRiTFNmfqBi8 u22w== X-Gm-Message-State: APzg51B2bjUJerlnGJGyrGyjmgTx3SzB+cG7yCTce4ivLOicpdwXDHLX nv7koa8bFf7fXOG0xHn4RII= X-Google-Smtp-Source: ANB0VdYbCtg1v+3Uq6ECVUVCz48MiuwHtHImOM+gkTWpq3IM5XCy8sfCoSDgsboouBmTUJERrmzSJw== X-Received: by 2002:a19:ed17:: with SMTP id y23-v6mr77717lfy.65.1536192689786; Wed, 05 Sep 2018 17:11:29 -0700 (PDT) Received: from laptop.sw.ru ([4.16.175.162]) by smtp.gmail.com with ESMTPSA id f7-v6sm533551lfc.4.2018.09.05.17.11.27 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 05 Sep 2018 17:11:29 -0700 (PDT) From: Andrei Vagin To: David Howells Cc: linux-fsdevel@vger.kernel.org, Andrei Vagin Subject: [PATCH dhowells/mount-api] fs: fix checking an error code of security_fs_context_parse_param Date: Wed, 5 Sep 2018 17:10:51 -0700 Message-Id: <20180906001051.24015-1-avagin@openvz.org> X-Mailer: git-send-email 2.17.1 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Andrei Vagin security_fs_context_parse_param() returns 0 if everything is okay. Signed-off-by: Andrei Vagin --- fs/fs_context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/fs_context.c b/fs/fs_context.c index a82679441031..16bf2cb57534 100644 --- a/fs/fs_context.c +++ b/fs/fs_context.c @@ -146,7 +146,7 @@ int vfs_parse_fs_param(struct fs_context *fc, struct fs_parameter *param) return ret; ret = security_fs_context_parse_param(fc, param); - if (ret != -ENOPARAM) + if (ret) /* Param belongs to the LSM or is disallowed by the LSM; so * don't pass to the FS. */