Skip to content
Snippets Groups Projects
Commit d3aa3e06 authored by Jiasheng Jiang's avatar Jiasheng Jiang Committed by Mike Snitzer
Browse files

dm stats: check for and propagate alloc_percpu failure


Check alloc_precpu()'s return value and return an error from
dm_stats_init() if it fails. Update alloc_dev() to fail if
dm_stats_init() does.

Otherwise, a NULL pointer dereference will occur in dm_stats_cleanup()
even if dm-stats isn't being actively used.

Fixes: fd2ed4d2 ("dm: add statistics support")
Cc: stable@vger.kernel.org
Signed-off-by: default avatarJiasheng Jiang <jiasheng@iscas.ac.cn>
Signed-off-by: default avatarMike Snitzer <snitzer@kernel.org>
parent d9a02e01
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment