From: Minchan Kim <minchan@kernel.org>
To: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, kernel-team <kernel-team@lge.com>,
Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Subject: Re: [PATCH] zram: fix null dereference of handle
Date: Wed, 20 Sep 2017 14:51:25 +0900 [thread overview]
Message-ID: <20170920055125.GB9428@bbox> (raw)
In-Reply-To: <20170919102125.GB401@jagdpanzerIV.localdomain>
On Tue, Sep 19, 2017 at 07:21:25PM +0900, Sergey Senozhatsky wrote:
> Minchan,
>
> I just ran across it [because I had a bug to analize where this
> part was involved]. I'd really prefer the kernel to BUG_ON immediately
> instead of dying in agony.
>
> can we, please, return BUG_ON() back?
>
> there is no point in trying to save the kernel once it did that type
> of violation.
I agree. If it happens, it would corrupt other user's buffer which ends
up leaking some private data from others so there is pointless to keep
system alive to debug it.
Do you mind sending a formal patch?
Thanks!
>
> ---
>
> diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
> index 7c38e850a8fc..685049a9048d 100644
> --- a/mm/zsmalloc.c
> +++ b/mm/zsmalloc.c
> @@ -1349,7 +1349,7 @@ void *zs_map_object(struct zs_pool *pool, unsigned long handle,
> * pools/users, we can't allow mapping in interrupt context
> * because it can corrupt another users mappings.
> */
> - WARN_ON_ONCE(in_interrupt());
> + BUG_ON(in_interrupt());
>
> /* From now on, migration cannot move the object */
> pin_tag(handle);
>
next prev parent reply other threads:[~2017-09-20 5:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-19 10:21 Sergey Senozhatsky
2017-09-19 10:38 ` BUG_ON when zsmalloc from IRQ (was zram: fix null dereference of handle) Sergey Senozhatsky
2017-09-20 5:51 ` Minchan Kim [this message]
2017-09-20 6:28 ` [PATCH] zram: fix null dereference of handle Sergey Senozhatsky
-- strict thread matches above, loose matches on Subject: below --
2017-09-19 2:34 Minchan Kim
2017-09-19 5:39 ` Sergey Senozhatsky
2017-09-19 6:59 ` Minchan Kim
2017-09-19 10:15 ` Sergey Senozhatsky
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=20170920055125.GB9428@bbox \
--to=minchan@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=kernel-team@lge.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sergey.senozhatsky.work@gmail.com \
--cc=sergey.senozhatsky@gmail.com \
/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
Powered by JetHome