Re: [PATCH 2/2] tmpfs: fix mempolicy object leaks

From: Andrew Morton
Date: Wed Feb 20 2013 - 16:06:48 EST


On Wed, 20 Feb 2013 12:26:26 -0800 (PST)
Hugh Dickins <hughd@xxxxxxxxxx> wrote:

> > @@ -2463,19 +2464,23 @@ static int shmem_parse_options(char *options, struct shmem_sb_info *sbinfo,
> > if (!gid_valid(sbinfo->gid))
> > goto bad_val;
> > } else if (!strcmp(this_char,"mpol")) {
> > - if (mpol_parse_str(value, &sbinfo->mpol))
> > + mpol_put(mpol);
>
> I haven't tested to check, but don't we need
> mpol = NULL;
> here, in case the new option turns out to be bad?

We do.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/