linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nitin Gupta <ngupta@vflare.org>
To: Mitch Harder <mitch.harder@sabayonlinux.org>
Cc: Greg KH <gregkh@linuxfoundation.org>,
	Seth Jennings <sjenning@linux.vnet.ibm.com>,
	Jerome Marchand <jmarchan@redhat.com>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	stable@vger.kernel.org, Minchan Kim <minchan.kim@gmail.com>,
	Linux Driver Project <devel@linuxdriverproject.org>,
	Dan Carpenter <dan.carpenter@oracle.com>
Subject: Re: zram: fix invalid memory references during disk write
Date: Thu, 20 Dec 2012 14:48:00 -0800	[thread overview]
Message-ID: <CAPkvG_dxPg2M1vcdWZOzpoTS=No8d34fgVKDP-wAevMR+Y-+7w@mail.gmail.com> (raw)
In-Reply-To: <CAKcLGm9eFRQrAc_Nm0Z658ct46psVemWt4c8NbpETjhMF3A+jQ@mail.gmail.com>

On Wed, Dec 19, 2012 at 9:39 AM, Mitch Harder
<mitch.harder@sabayonlinux.org> wrote:
> On Wed, Dec 19, 2012 at 11:21 AM, Nitin Gupta <ngupta@vflare.org> wrote:
>> On 12/19/2012 08:17 AM, Greg KH wrote:
>>> On Wed, Dec 19, 2012 at 07:53:36AM -0800, Nitin Gupta wrote:
>>>> 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?).
>>>
>>> {sigh}
>>>
>>> Please think for a moment for how it would be impossible for me to add
>>> this patch to either the 3.7-stable tree, or the 3.8 tree, _again_.
>>>
>>
>> I'm simply not getting it, I'm sorry, I must be missing something
>> obvious -- what's really the problem with this: "whenever 3.8 is
>> released, sometime in the future, just make sure that this fix is
>> included in it" ?  Also, what's stopping it from staging, at least?
>>
>
> Greg:
>
> I think there is still some residual confusion from the mix of patches
> sent out for this issue.
>
> You appear to be saying that this patch as well as "37b51fd: zram:
> factor-out  zram_decompress_page() function" have already been
> applied.
>
> But I do not see either patch in 3.7.0 or in your message for
> "3.7.1-stable review"
>
> I see the "37b51fd: zram: factor-out  zram_decompress_page() function"
> patch in Linus' tree for 3.8_rc, but not the patch discussed in this
> thread.

Yes, both staging and linus' tree HEAD now contains the
"37b51fd: zram: factor-out  zram_decompress_page() function" patch.
So, all that's need to be done is to apply this patch only.

Since this patch is really critical for zram, please let me know how to
move forward and get it included.

Thanks,
Nitin

  reply	other threads:[~2012-12-20 22:48 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-30  6:45 zram: fix invalid memory references during disk write Nitin Gupta
2012-11-30  6:58 ` Nitin Gupta
2012-12-08  0:50 ` Nitin Gupta
2012-12-08 19:47   ` Greg KH
2012-12-11 18:27 ` Greg KH
2012-12-13  4:30   ` Nitin Gupta
2012-12-18 21:12   ` Nitin Gupta
2012-12-19  3:49     ` Greg KH
2012-12-19  7:21       ` Nitin Gupta
2012-12-19 15:08         ` Greg KH
2012-12-19 15:53           ` Nitin Gupta
2012-12-19 16:17             ` Greg KH
2012-12-19 17:21               ` Nitin Gupta
2012-12-19 17:39                 ` Mitch Harder
2012-12-20 22:48                   ` Nitin Gupta [this message]
2013-01-14 19:19                   ` Greg KH
2013-01-15  0:48                     ` Nitin Gupta
2013-01-15 12:33                       ` Greg KH

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='CAPkvG_dxPg2M1vcdWZOzpoTS=No8d34fgVKDP-wAevMR+Y-+7w@mail.gmail.com' \
    --to=ngupta@vflare.org \
    --cc=dan.carpenter@oracle.com \
    --cc=devel@linuxdriverproject.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jmarchan@redhat.com \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=minchan.kim@gmail.com \
    --cc=mitch.harder@sabayonlinux.org \
    --cc=sjenning@linux.vnet.ibm.com \
    --cc=stable@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).