From: "Kirill A. Shutemov" <kirill@shutemov.name>
To: Sasha Levin <sasha.levin@oracle.com>
Cc: akpm@linux-foundation.org, mhocko@suse.com, mgorman@suse.de,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm, oom: initiallize all new zap_details fields before use
Date: Sat, 19 Dec 2015 21:52:37 +0200 [thread overview]
Message-ID: <20151219195237.GA31380@node.shutemov.name> (raw)
In-Reply-To: <1450487091-7822-1-git-send-email-sasha.levin@oracle.com>
On Fri, Dec 18, 2015 at 08:04:51PM -0500, Sasha Levin wrote:
> Commit "mm, oom: introduce oom reaper" forgot to initialize the two new fields
> of struct zap_details in unmap_mapping_range(). This caused using stack garbage
> on the call to unmap_mapping_range_tree().
>
> Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
> ---
> mm/memory.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/mm/memory.c b/mm/memory.c
> index 206c8cd..0e32993 100644
> --- a/mm/memory.c
> +++ b/mm/memory.c
> @@ -2431,6 +2431,7 @@ void unmap_mapping_range(struct address_space *mapping,
> details.last_index = hba + hlen - 1;
> if (details.last_index < details.first_index)
> details.last_index = ULONG_MAX;
> + details.check_swap_entries = details.ignore_dirty = false;
Should we use c99 initializer instead to make it future-proof?
--
Kirill A. Shutemov
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
WARNING: multiple messages have this Message-ID (diff)
From: "Kirill A. Shutemov" <kirill@shutemov.name>
To: Sasha Levin <sasha.levin@oracle.com>
Cc: akpm@linux-foundation.org, mhocko@suse.com, mgorman@suse.de,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm, oom: initiallize all new zap_details fields before use
Date: Sat, 19 Dec 2015 21:52:37 +0200 [thread overview]
Message-ID: <20151219195237.GA31380@node.shutemov.name> (raw)
In-Reply-To: <1450487091-7822-1-git-send-email-sasha.levin@oracle.com>
On Fri, Dec 18, 2015 at 08:04:51PM -0500, Sasha Levin wrote:
> Commit "mm, oom: introduce oom reaper" forgot to initialize the two new fields
> of struct zap_details in unmap_mapping_range(). This caused using stack garbage
> on the call to unmap_mapping_range_tree().
>
> Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
> ---
> mm/memory.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/mm/memory.c b/mm/memory.c
> index 206c8cd..0e32993 100644
> --- a/mm/memory.c
> +++ b/mm/memory.c
> @@ -2431,6 +2431,7 @@ void unmap_mapping_range(struct address_space *mapping,
> details.last_index = hba + hlen - 1;
> if (details.last_index < details.first_index)
> details.last_index = ULONG_MAX;
> + details.check_swap_entries = details.ignore_dirty = false;
Should we use c99 initializer instead to make it future-proof?
--
Kirill A. Shutemov
next prev parent reply other threads:[~2015-12-19 19:52 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-19 1:04 [PATCH] mm, oom: initiallize all new zap_details fields before use Sasha Levin
2015-12-19 1:04 ` Sasha Levin
2015-12-19 19:52 ` Kirill A. Shutemov [this message]
2015-12-19 19:52 ` Kirill A. Shutemov
2015-12-19 22:03 ` Sasha Levin
2015-12-19 22:03 ` Sasha Levin
2015-12-21 22:24 ` Andrew Morton
2015-12-21 22:24 ` Andrew Morton
2015-12-22 0:57 ` Sasha Levin
2015-12-22 0:57 ` Sasha Levin
2015-12-21 8:30 ` Michal Hocko
2015-12-21 8:30 ` Michal Hocko
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=20151219195237.GA31380@node.shutemov.name \
--to=kirill@shutemov.name \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
--cc=mhocko@suse.com \
--cc=sasha.levin@oracle.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.