linux-unionfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Miklos Szeredi <miklos@szeredi.hu>
To: Christian Brauner <brauner@kernel.org>
Cc: Amir Goldstein <amir73il@gmail.com>,
	Josef Bacik <josef@toxicpanda.com>,
	 linux-fsdevel@vger.kernel.org, linux-unionfs@vger.kernel.org
Subject: Re: [PATCH v3 2/5] ovl: specify layers via file descriptors
Date: Fri, 18 Oct 2024 11:42:09 +0200	[thread overview]
Message-ID: <CAJfpegvqDPqVMfUkTxVSE580QF5mqOeorH7fT+zUoZGqqZ3TNA@mail.gmail.com> (raw)
In-Reply-To: <20241014-work-overlayfs-v3-2-32b3fed1286e@kernel.org>

On Mon, 14 Oct 2024 at 11:41, Christian Brauner <brauner@kernel.org> wrote:

> +static int ovl_parse_layer(struct fs_context *fc, struct fs_parameter *param,
> +                          enum ovl_opt layer)
> +{
> +       struct path layer_path __free(path_put) = {};
> +       int err = 0;
> +
> +       switch (param->type) {
> +       case fs_value_is_string:
> +               err = ovl_kern_path(param->string, &layer_path, layer);
> +               if (err)
> +                       return err;

What guarantees, that layer_path will not be stored to in the error case?

Common sense, yes.  But I'm sure there are hundreds of cases where
it's not the case, despite common sense.

Can static checkers deal with this?

Thanks,
Miklos

  reply	other threads:[~2024-10-18  9:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-14  9:40 [PATCH v3 0/5] ovl: file descriptors based layer setup Christian Brauner
2024-10-14  9:40 ` [PATCH v3 1/5] fs: add helper to use mount option as path or fd Christian Brauner
2024-10-14  9:40 ` [PATCH v3 2/5] ovl: specify layers via file descriptors Christian Brauner
2024-10-18  9:42   ` Miklos Szeredi [this message]
2024-10-18 10:34     ` Christian Brauner
2024-10-14  9:40 ` [PATCH v3 3/5] Documentation,ovl: document new file descriptor based layers Christian Brauner
2024-10-14  9:40 ` [PATCH v3 4/5] selftests: use shared header Christian Brauner
2024-10-14  9:41 ` [PATCH v3 5/5] selftests: add overlayfs fd mounting selftests Christian Brauner
2024-10-14 14:16 ` [PATCH v3 0/5] ovl: file descriptors based layer setup Amir Goldstein

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=CAJfpegvqDPqVMfUkTxVSE580QF5mqOeorH7fT+zUoZGqqZ3TNA@mail.gmail.com \
    --to=miklos@szeredi.hu \
    --cc=amir73il@gmail.com \
    --cc=brauner@kernel.org \
    --cc=josef@toxicpanda.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-unionfs@vger.kernel.org \
    /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).