diff options
author | 2024-10-09 09:49:14 +0800 | |
---|---|---|
committer | 2024-10-17 11:43:43 -0700 | |
commit | 825711e00117fc686ab89ac36a9a7b252dc349c6 (patch) | |
tree | 3626b522427104cf20ff9de52bb845211952a857 /rust/helpers/task.c | |
parent | md: ensure child flush IO does not affect origin bio->bi_status (diff) | |
download | wireguard-linux-825711e00117fc686ab89ac36a9a7b252dc349c6.tar.xz wireguard-linux-825711e00117fc686ab89ac36a9a7b252dc349c6.zip |
md/raid10: fix null ptr dereference in raid10_size()
In raid10_run() if raid10_set_queue_limits() succeed, the return value
is set to zero, and if following procedures failed raid10_run() will
return zero while mddev->private is still NULL, causing null ptr
dereference in raid10_size().
Fix the problem by only overwrite the return value if
raid10_set_queue_limits() failed.
Fixes: 3d8466ba68d4 ("md/raid10: use the atomic queue limit update APIs")
Cc: stable@vger.kernel.org
Reported-and-tested-by: ValdikSS <iam@valdikss.org.ru>
Closes: https://lore.kernel.org/all/0dd96820-fe52-4841-bc58-dbf14d6bfcc8@valdikss.org.ru/
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20241009014914.1682037-1-yukuai1@huaweicloud.com
Signed-off-by: Song Liu <song@kernel.org>
Diffstat (limited to 'rust/helpers/task.c')
0 files changed, 0 insertions, 0 deletions