linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Hugh Dickins <hughd@google.com>
Cc: Greg Thelen <gthelen@google.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] tmpfs: fix mempolicy object leaks
Date: Wed, 20 Feb 2013 13:06:43 -0800	[thread overview]
Message-ID: <20130220130643.992f7c6e.akpm@linux-foundation.org> (raw)
In-Reply-To: <alpine.LNX.2.00.1302201221270.1152@eggly.anvils>

On Wed, 20 Feb 2013 12:26:26 -0800 (PST)
Hugh Dickins <hughd@google.com> 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, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2013-02-20 21:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-20  7:11 [PATCH 1/2] tmpfs: fix use-after-free of mempolicy object Greg Thelen
2013-02-20  7:11 ` [PATCH 2/2] tmpfs: fix mempolicy object leaks Greg Thelen
2013-02-20 20:26   ` Hugh Dickins
2013-02-20 21:06     ` Andrew Morton [this message]
2013-03-03 23:49     ` Will Huck
2013-03-05 19:40       ` Hugh Dickins
2013-03-07  6:41         ` Will Huck
2013-02-20 20:21 ` [PATCH 1/2] tmpfs: fix use-after-free of mempolicy object Hugh Dickins

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=20130220130643.992f7c6e.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=gthelen@google.com \
    --cc=hughd@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.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).