public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Minchan Kim <minchan@kernel.org>
To: Luis Henriques <luis.henriques@canonical.com>
Cc: Nitin Gupta <ngupta@vflare.org>,
	Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>,
	linux-kernel@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH v3] zram: fix possible use after free in zcomp_create()
Date: Tue, 8 Sep 2015 22:35:49 +0900	[thread overview]
Message-ID: <20150908133548.GB2174@bbox> (raw)
In-Reply-To: <1441705168-14682-1-git-send-email-luis.henriques@canonical.com>

On Tue, Sep 08, 2015 at 10:39:28AM +0100, Luis Henriques wrote:
> zcomp_create() verifies the success of zcomp_strm_{multi,siggle}_create()
> through comp->stream, which can potentially be pointing to memory that was
> freed if these functions returned an error.
> 
> While at it, replace a 'ERR_PTR(-ENOMEM)' by a more generic
> 'ERR_PTR(error)' as in the future zcomp_strm_{multi,siggle}_create() could
> return other error codes.  Function documentation updated accordingly.
> 
> Fixes: beca3ec71fe5 ("zram: add multi stream functionality")
> Cc: stable@vger.kernel.org
> Cc: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
> Cc: Minchan Kim <minchan@kernel.org>
> Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
Acked-by: Minchan Kim <minchan@kernel.org>

Thanks for the fix!

      parent reply	other threads:[~2015-09-08 13:35 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-07 10:33 [PATCH] zram: fix possible use after free in zcomp_create() Luis Henriques
2015-09-07 11:11 ` Sergey Senozhatsky
2015-09-07 12:53   ` Luis Henriques
2015-09-07 13:33     ` Sergey Senozhatsky
2015-09-07 14:11       ` Luis Henriques
2015-09-07 14:13       ` [PATCH v2] " Luis Henriques
2015-09-07 23:59         ` Sergey Senozhatsky
2015-09-08  1:07         ` Minchan Kim
2015-09-08  1:20           ` Sergey Senozhatsky
2015-09-08  1:34             ` Minchan Kim
2015-09-08  9:39               ` [PATCH v3] " Luis Henriques
2015-09-08  9:56                 ` Sergey Senozhatsky
2015-09-08 10:27                   ` Sergey Senozhatsky
2015-09-08 13:35                 ` Minchan Kim [this message]

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=20150908133548.GB2174@bbox \
    --to=minchan@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luis.henriques@canonical.com \
    --cc=ngupta@vflare.org \
    --cc=sergey.senozhatsky.work@gmail.com \
    /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