diff options
author | Jiasheng Jiang <jiasheng@iscas.ac.cn> | 2023-03-16 14:55:06 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-03-30 12:51:42 +0200 |
commit | 5b66e36a3efd24041b7374432bfa4dec2ff01e95 (patch) | |
tree | 44bb4dc0538b2a0d645736211c57af60464958b9 /lib/net_utils.c | |
parent | cc3c3ee6d035d38f116a6dec88acf7f74598aebd (diff) |
dm stats: check for and propagate alloc_percpu failure
commit d3aa3e060c4a80827eb801fc448debc9daa7c46b upstream.
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: fd2ed4d25270 ("dm: add statistics support")
Cc: stable@vger.kernel.org
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'lib/net_utils.c')
0 files changed, 0 insertions, 0 deletions