From mboxrd@z Thu Jan 1 00:00:00 1970 From: Viacheslav Dubeyko Subject: Re: [PATCH] hfsplus: release bnode pages after use, not before Date: Mon, 08 Jun 2015 09:45:18 -0700 Message-ID: <1433781918.2659.3.camel@slavad-ubuntu-14.04> References: <1433637776-3559-1-git-send-email-saproj@gmail.com> <1433778309.2513.11.camel@ubuntu-slavad-14.04> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: "linux-fsdevel@vger.kernel.org" , Sasha Levin , Anton Altaparmakov , Al Viro , Christoph Hellwig , Andrew Morton , Hin-Tak Leung , Sougata Santra To: Sergei Antonov Return-path: Received: from mail-pd0-f176.google.com ([209.85.192.176]:36196 "EHLO mail-pd0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753215AbbFHQpU (ORCPT ); Mon, 8 Jun 2015 12:45:20 -0400 Received: by pdjm12 with SMTP id m12so108379679pdj.3 for ; Mon, 08 Jun 2015 09:45:20 -0700 (PDT) In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Mon, 2015-06-08 at 18:32 +0200, Sergei Antonov wrote: > On 8 June 2015 at 17:45, Vyacheslav Dubeyko wrote= : > > On Sun, 2015-06-07 at 02:42 +0200, Sergei Antonov wrote: > >> Fix this bugreport by Sasha Levin: > >> http://lkml.org/lkml/2015/2/20/85 ("use after free") > >> Make sure mapped pages are available for the entire lifetime of hf= s_bnode. > >> > > > > Sorry, I missed the point. What do you try to fix? How this change = fixes > > the issue? > > > > I think that maybe this fix makes sense. But it needs to describe i= t > > more deeply. Could you describe the fix with more details? >=20 > You are basically saying you don=E2=80=99t understand it. Too bad, be= cause the > bug is very simple. It is the =E2=80=9Euse after free=E2=80=9C type o= f bug, and it can > be illustrated by this: > (1) void *ptr =3D malloc(=E2=80=A6); > (2) free(ptr); > (3) memcpy(=E2=80=A6, ptr, 1); > Guess which two of these three lines are executed in wrong order. >=20 > My patch is about the same type of bug, but with memory pages mapping= =2E > The driver currently accesses pages that may be unavailable, or > contain different data. The problem is more likely to occur when > memory is a limited resource. I reproduced it while running a > memory-hungry program. I worried not about myself but about potential readers of description o= f the fix. The description is completely obscure. And it needs to describ= e the fix in clear and descriptive manner. This is my request. Please, describe the fix in a clear way. Thanks, Vyacheslav Dubeyko. -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel= " in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html