From: Mauro Dreissig <mukadr@gmail.com>
To: linux-mm@kvack.org
Cc: Mauro D <mukadr@gmail.com>
Subject: Re: [PATCH] mm: numa: fix NULL pointer dereference
Date: Tue, 6 Aug 2013 23:10:24 -0300 [thread overview]
Message-ID: <CABk0prQj7DjQ0+oX59KL1vGqLw3NM9tQ9XfUFgoB0fS5ZesZ3Q@mail.gmail.com> (raw)
In-Reply-To: <20130807000154.GA3507@z460>
[-- Attachment #1: Type: text/plain, Size: 1372 bytes --]
2013/8/6 Mauro Dreissig <mukadr@gmail.com>
> From: Mauro Dreissig <mukadr@gmail.com>
>
> The "pol->mode" field is accessed even when no mempolicy
> is assigned to the "pol" variable.
>
> Signed-off-by: Mauro Dreissig <mukadr@gmail.com>
> ---
> mm/mempolicy.c | 12 ++++++++----
> 1 file changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/mm/mempolicy.c b/mm/mempolicy.c
> index 6b1d426..105fff0 100644
> --- a/mm/mempolicy.c
> +++ b/mm/mempolicy.c
> @@ -127,12 +127,16 @@ static struct mempolicy *get_task_policy(struct
> task_struct *p)
>
> if (!pol) {
> node = numa_node_id();
> - if (node != NUMA_NO_NODE)
> + if (node != NUMA_NO_NODE) {
> pol = &preferred_node_policy[node];
>
> - /* preferred_node_policy is not initialised early in boot
> */
> - if (!pol->mode)
> - pol = NULL;
> + /*
> + * preferred_node_policy is not initialised early
> + * in boot
> + */
> + if (!pol->mode)
> + pol = NULL;
> + }
> }
>
> return pol;
> --
> 1.8.1.2
>
>
A patch about this issue already exist, please ignore my message.
http://marc.info/?l=linux-mm&m=137576205227365&w=2
[-- Attachment #2: Type: text/html, Size: 2180 bytes --]
prev parent reply other threads:[~2013-08-07 2:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-07 0:02 Mauro Dreissig
2013-08-07 0:19 ` zhouxinxing
2013-08-07 2:10 ` Mauro Dreissig [this message]
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=CABk0prQj7DjQ0+oX59KL1vGqLw3NM9tQ9XfUFgoB0fS5ZesZ3Q@mail.gmail.com \
--to=mukadr@gmail.com \
--cc=linux-mm@kvack.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