diff options
| author | Jiasheng Jiang <jiasheng@iscas.ac.cn> | 2023-03-16 14:55:06 +0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-04-05 11:15:38 +0200 |
| commit | 0d96bd507ed7e7d565b6d53ebd3874686f123b2e (patch) | |
| tree | 92ec0e0466eca038335aecf3121dbd3efd0d954e /kernel | |
| parent | 5fc2b9485a8722c8350c3379992f5931ccfeaf98 (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 'kernel')
0 files changed, 0 insertions, 0 deletions
