linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: dennisz@fb.com
Cc: linux-mm@kvack.org
Subject: [bug report] percpu: add tracepoint support for percpu memory
Date: Thu, 29 Jun 2017 14:19:16 +0300	[thread overview]
Message-ID: <20170629110954.uz6he7x25bg4n3pp@mwanda> (raw)

Hello Dennis Zhou,

This is a semi-automatic email about new static checker warnings.

The patch df95e795a722: "percpu: add tracepoint support for percpu
memory" from Jun 19, 2017, leads to the following Smatch complaint:

    mm/percpu-km.c:88 pcpu_destroy_chunk()
    warn: variable dereferenced before check 'chunk' (see line 86)

mm/percpu-km.c
    85		pcpu_stats_chunk_dealloc();
    86		trace_percpu_destroy_chunk(chunk->base_addr);
                                           ^^^^^^^^^^^^^^^^
There should probably be a NULL check here?

    87	
    88		if (chunk && chunk->data)
    89			__free_pages(chunk->data, order_base_2(nr_pages));
    90		pcpu_free_chunk(chunk);

regards,
dan carpenter

--
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>

             reply	other threads:[~2017-06-29 11:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-29 11:19 Dan Carpenter [this message]
2017-06-29 14:56 ` [PATCH 1/1] percpu: fix static checker warnings in pcpu_destroy_chunk Dennis Zhou
2017-06-29 15:24   ` Tejun Heo

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=20170629110954.uz6he7x25bg4n3pp@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=dennisz@fb.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;
as well as URLs for NNTP newsgroup(s).