Re: [PATCH v3 2/5] ovl: specify layers via file descriptors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 14 Oct 2024 at 11:41, Christian Brauner <brauner@xxxxxxxxxx> 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




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux