From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx3-rdu2.redhat.com ([66.187.233.73]:35148 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727753AbeIFOvL (ORCPT ); Thu, 6 Sep 2018 10:51:11 -0400 From: David Howells In-Reply-To: <20180906001051.24015-1-avagin@openvz.org> References: <20180906001051.24015-1-avagin@openvz.org> To: Andrei Vagin Cc: dhowells@redhat.com, linux-fsdevel@vger.kernel.org, Andrei Vagin Subject: Re: [PATCH dhowells/mount-api] fs: fix checking an error code of security_fs_context_parse_param MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <18702.1536228984.1@warthog.procyon.org.uk> Date: Thu, 06 Sep 2018 11:16:24 +0100 Message-ID: <18703.1536228984@warthog.procyon.org.uk> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Andrei Vagin wrote: > security_fs_context_parse_param() returns 0 if everything is okay. Not quite. It returns 0 to indicate that it processed the argument and that the argument doesn't belong to the filesystem. It returns -ENOPARAM to indicate that the argument should be passed along to the filesystem. Any other error is an actual error. > ret = security_fs_context_parse_param(fc, param); > - if (ret != -ENOPARAM) > + if (ret) So this change is wrong. The change that needs making is to the documentation - in particular lsm_hooks.h. David