* [bug report] percpu: add tracepoint support for percpu memory
@ 2017-06-29 11:19 Dan Carpenter
2017-06-29 14:56 ` [PATCH 1/1] percpu: fix static checker warnings in pcpu_destroy_chunk Dennis Zhou
0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2017-06-29 11:19 UTC (permalink / raw)
To: dennisz; +Cc: linux-mm
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>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/1] percpu: fix static checker warnings in pcpu_destroy_chunk
2017-06-29 11:19 [bug report] percpu: add tracepoint support for percpu memory Dan Carpenter
@ 2017-06-29 14:56 ` Dennis Zhou
2017-06-29 15:24 ` Tejun Heo
0 siblings, 1 reply; 3+ messages in thread
From: Dennis Zhou @ 2017-06-29 14:56 UTC (permalink / raw)
To: Tejun Heo; +Cc: Dan Carpenter, linux-mm
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] percpu: fix static checker warnings in pcpu_destroy_chunk
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
0 siblings, 0 replies; 3+ messages in thread
From: Tejun Heo @ 2017-06-29 15:24 UTC (permalink / raw)
To: Dennis Zhou; +Cc: Dan Carpenter, linux-mm
On Thu, Jun 29, 2017 at 10:56:26AM -0400, Dennis Zhou wrote:
> From 5021b97f4026334d2c8dfad80797dd1028cddd73 Mon Sep 17 00:00:00 2001
> From: Dennis Zhou <dennisz@fb.com>
> Date: Thu, 29 Jun 2017 07:11:41 -0700
>
> Add NULL check in pcpu_destroy_chunk to correct static checker warnings.
>
> Signed-off-by: Dennis Zhou <dennisz@fb.com>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Applied to percpu/for-4.13.
Thanks.
--
tejun
--
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>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-06-29 15:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-29 11:19 [bug report] percpu: add tracepoint support for percpu memory Dan Carpenter
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
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).