lkml.org 
[lkml]   [2012]   [Dec]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: zram: fix invalid memory references during disk write
On 12/19/2012 07:08 AM, Greg KH wrote:
> On Tue, Dec 18, 2012 at 11:21:28PM -0800, Nitin Gupta wrote:
>> On 12/18/2012 07:49 PM, Greg KH wrote:
>>> On Tue, Dec 18, 2012 at 01:12:05PM -0800, Nitin Gupta wrote:
>>>> On Tue, Dec 11, 2012 at 10:27 AM, Greg KH <gregkh@linuxfoundation.org> wrote:
>>>>> On Thu, Nov 29, 2012 at 10:45:09PM -0800, Nitin Gupta wrote:
>>>>>> Fixes a bug introduced by commit c8f2f0db1 ("zram: Fix handling
>>>>>> of incompressible pages") which caused invalid memory references
>>>>>> during disk write. Invalid references could occur in two cases:
>>>>>> - Incoming data expands on compression: In this case, reference was
>>>>>> made to kunmap()'ed bio page.
>>>>>> - Partial (non PAGE_SIZE) write with incompressible data: In this
>>>>>> case, reference was made to a kfree()'ed buffer.
>>>>>>
>>>>>> Fixes bug 50081:
>>>>>> https://bugzilla.kernel.org/show_bug.cgi?id=50081
>>>>>>
>>>>>> Upstream commit ID: c8f2f0d: zram: Fix handling of incompressible pages
>>>>>> Apply to versions: 3.6.5, 3.6.6, 3.6.7, 3.6.8
>>>>>>
>>>>>> Cc: <stable@vger.kernel.org> # staging-next: 37b51fd: zram: factor-out
>>>>>> # zram_decompress_page() function
>>>>>> Signed-off-by: Nitin Gupta <ngupta@vflare.org>
>>>>>> Reported-by: Mihail Kasadjikov <hamer.mk@gmail.com>
>>>>>> Reported-by: Tomas M <tomas@slax.org>
>>>>>> Reviewed-by: Minchan Kim <minchan@kernel.org>
>>>>>> ---
>>>>>> drivers/staging/zram/zram_drv.c | 39 ++++++++++++++++++++++++---------------
>>>>>> 1 file changed, 24 insertions(+), 15 deletions(-)
>>>>>
>>>>> This patch fails to apply to 3.6.10:
>>>>>
>>>>> patching file drivers/staging/zram/zram_drv.c
>>>>> Hunk #1 succeeded at 282 (offset 17 lines).
>>>>> Hunk #2 FAILED at 286.
>>>>> Hunk #3 succeeded at 319 (offset 17 lines).
>>>>> Hunk #4 succeeded at 340 (offset 17 lines).
>>>>> Hunk #5 succeeded at 353 (offset 17 lines).
>>>>> Hunk #6 succeeded at 368 (offset 17 lines).
>>>>> Hunk #7 succeeded at 385 (offset 17 lines).
>>>>> 1 out of 7 hunks FAILED -- saving rejects to file drivers/staging/zram/zram_drv.c.rej
>>>>>
>>>>> Please redo this patch and resend it if you wish for it to be applied to
>>>>> the 3.6-stable tree.
>>>>>
>>>>>
>>>>
>>>> Please apply this patch to stable tree asap.
>>>
>>> 3.6 is now end-of-life, there will not be any more releases for that
>>> kernel series anymore, sorry.
>>>
>>
>> Then please apply to 3.7.
>
> That is impossible to do so, for the obvious reason.
>

I meant to include it in whatever 3.7.x is released in future. Or put it
in staging, so it may eventually make it to mainline (by 3.8?).


Nitin



\
 
 \ /
  Last update: 2012-12-19 17:41    [W:0.259 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site