Jiasheng Jiang d3aa3e060c 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: 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>
2023-03-16 13:37:06 -04:00
..
2023-02-14 14:23:07 -05:00
2023-02-14 14:23:07 -05:00
2023-02-14 14:23:06 -05:00
2023-02-14 14:23:07 -05:00
2023-02-14 14:23:06 -05:00
2023-02-14 14:23:07 -05:00
2023-02-14 14:23:07 -05:00
2023-02-14 14:23:07 -05:00
2023-02-14 14:23:07 -05:00
2023-02-14 14:23:07 -05:00
2023-02-14 14:23:07 -05:00
2023-02-14 14:23:07 -05:00
2023-02-14 14:23:07 -05:00
2023-02-14 14:23:06 -05:00
2023-02-14 14:23:07 -05:00
2023-02-14 14:23:07 -05:00
2023-02-14 14:23:06 -05:00
2022-08-02 14:38:59 -07:00
2022-05-22 23:07:21 -07:00
2022-12-02 11:21:01 -08:00
2022-03-08 15:16:54 -08:00
2022-12-07 09:43:12 -07:00
2022-03-08 15:16:54 -08:00
2022-12-07 09:43:12 -07:00