CONFIG_PREEMPT and JFFS2 oops

Joakim Tjernlund joakim.tjernlund at transmode.se
Thu Jan 26 12:33:37 EST 2012


> From: Paul Walmsley <paul at pwsan.com>
> To: Joakim Tjernlund <joakim.tjernlund at transmode.se>
> Cc: "linux-mtd at lists.infradead.org" <linux-mtd at lists.infradead.org>, Richard Purdie <rpurdie at openedhand.com>, "linux-omap at vger.kernel.org" <linux-omap at vger.kernel.org>, David Woodhouse <dwmw2 at infradead.org>, Orjan Friberg <of at flatfrog.com>
> Date: 2012/01/26 18:00
> Subject: Re: CONFIG_PREEMPT and JFFS2 oops
> Sent by: linux-mtd-bounces at lists.infradead.org
>
> On Thu, 26 Jan 2012, Joakim Tjernlund wrote:
>
> > Still leeks:
> > +                            best_slen = tdl;
> > +                            best_buf = tmp_buf;
> > +                            best = this;
> >
> > You just throw away best_buf here, don't you?
>
> You're right.  It's even worse than that.  best_buf will contain the data
> from the last compressor used.  And it will be prematurely freed.  Here's
> a fixed version.
>
> Time for breakfast.

hmm, that memcpy is costly. Just swap tmp_buf and best_buf instead?

Time to go home :)

 Jocke




More information about the linux-mtd mailing list