public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Richard Purdie <rpurdie@openedhand.com>
To: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Cc: linux-mtd@lists.infradead.org,
	David Woodhouse <dwmw2@infradead.org>,
	Linux Kernel Development <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] jffs2: Fix race condition in jffs2_lzo_compress()
Date: Tue, 04 Nov 2008 15:57:40 +0000	[thread overview]
Message-ID: <1225814260.5433.13.camel@dax.rpnet.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0811031714590.6298@vixen.sonytel.be>


On Mon, 2008-11-03 at 17:17 +0100, Geert Uytterhoeven wrote:
> deflate_mutex protects the globals lzo_mem and lzo_compress_buf. However,
> jffs2_lzo_compress() unlocks deflate_mutex _before_ it has copied out the
> compressed data from lzo_compress_buf. Correct this by moving the mutex unlock
> after the copy.
> In addition, document what deflate_mutex actually protects.
> 
> Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>

Acked-by: Richard Purdie <rpurdie@linux.intel.com>

This should probably be queued as a bugfix for the current -rc series.

> ---
> Just noticed this when looking at the code.
> The patch is untested, except for a quick compile test.
> 
>  fs/jffs2/compr_lzo.c |   15 +++++++++------
>  1 file changed, 9 insertions(+), 6 deletions(-)
> 

      reply	other threads:[~2008-11-04 15:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-03 16:17 [PATCH] jffs2: Fix race condition in jffs2_lzo_compress() Geert Uytterhoeven
2008-11-04 15:57 ` Richard Purdie [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=1225814260.5433.13.camel@dax.rpnet.com \
    --to=rpurdie@openedhand.com \
    --cc=Geert.Uytterhoeven@sonycom.com \
    --cc=dwmw2@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.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