linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@kernel.org>
To: Chanho Min <chanho.min@lge.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>,
	Andrew Morton <akpm@linux-foundation.org>,
	Kees Cook <keescook@chromium.org>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	"David S. Miller" <davem@davemloft.net>,
	Alexei Starovoitov <ast@kernel.org>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	Seungho Park <seungho1.park@lge.com>
Subject: Re: [PATCH] exec: make prepare_bprm_creds static
Date: Mon, 10 Dec 2018 09:30:49 +0100	[thread overview]
Message-ID: <20181210083049.GI1286@dhcp22.suse.cz> (raw)
In-Reply-To: <1544428194-2431-1-git-send-email-chanho.min@lge.com>

On Mon 10-12-18 16:49:54, Chanho Min wrote:
> prepare_bprm_creds is not used outside exec.c, so there's no reason for it
> to have external linkage.
> 
> Signed-off-by: Chanho Min <chanho.min@lge.com>

Acked-by: Michal Hocko <mhocko@suse.com>

> ---
>  fs/exec.c               | 2 +-
>  include/linux/binfmts.h | 1 -
>  2 files changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/fs/exec.c b/fs/exec.c
> index fc281b7..b6c9e5f 100644
> --- a/fs/exec.c
> +++ b/fs/exec.c
> @@ -1399,7 +1399,7 @@ EXPORT_SYMBOL(finalize_exec);
>   * Or, if exec fails before, free_bprm() should release ->cred and
>   * and unlock.
>   */
> -int prepare_bprm_creds(struct linux_binprm *bprm)
> +static int prepare_bprm_creds(struct linux_binprm *bprm)
>  {
>  	if (mutex_lock_interruptible(&current->signal->cred_guard_mutex))
>  		return -ERESTARTNOINTR;
> diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h
> index e9f5fe6..6a9e43d 100644
> --- a/include/linux/binfmts.h
> +++ b/include/linux/binfmts.h
> @@ -138,7 +138,6 @@ extern int transfer_args_to_stack(struct linux_binprm *bprm,
>  extern int bprm_change_interp(const char *interp, struct linux_binprm *bprm);
>  extern int copy_strings_kernel(int argc, const char *const *argv,
>  			       struct linux_binprm *bprm);
> -extern int prepare_bprm_creds(struct linux_binprm *bprm);
>  extern void install_exec_creds(struct linux_binprm *bprm);
>  extern void set_binfmt(struct linux_binfmt *new);
>  extern ssize_t read_code(struct file *, unsigned long, loff_t, size_t);
> -- 
> 2.1.4
> 

-- 
Michal Hocko
SUSE Labs

  reply	other threads:[~2018-12-10  8:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-10  7:49 [PATCH] exec: make prepare_bprm_creds static Chanho Min
2018-12-10  8:30 ` Michal Hocko [this message]
2018-12-10  8:39 ` Al Viro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181210083049.GI1286@dhcp22.suse.cz \
    --to=mhocko@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=ast@kernel.org \
    --cc=chanho.min@lge.com \
    --cc=davem@davemloft.net \
    --cc=ebiederm@xmission.com \
    --cc=keescook@chromium.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=seungho1.park@lge.com \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).