Whamcloud - gitweb
LU-12352 libcfs: crashes with certain cpu part numbers 94/37994/4
authorAndrew Perepechko <c17827@cray.com>
Thu, 17 Jan 2019 21:58:10 +0000 (00:58 +0300)
committerOleg Drokin <green@whamcloud.com>
Thu, 22 Oct 2020 06:18:35 +0000 (06:18 +0000)
commit6677b0ad0db9d4b826d77a768bf561bfe6533ffe
tree51946f7b571a664ba3c3d019514eca663c9889dd
parent284595fe2aa0c3898fbb3330e50cb669102a92d1
LU-12352 libcfs: crashes with certain cpu part numbers

Due to a bug in the code, libcfs will crash if the
number of online cpus does not divide by the number
of cpu partitions.

Based on the checks in cfs_cpt_table_create(), it
appears that the original intent was to push the
remaining cpus into the initial partitions.

So let's do that properly.

Lustre-commit: e33e3da58972a811e6eafc479f95f6df2baf4b9b
Lustre-change: https://review.whamcloud.com/34991

Change-Id: I3c5e2aa1fdfca4c07e7afce143c984973373f009
Cray-bug-id: LUS-6455
Signed-off-by: Andrew Perepechko <c17827@cray.com>
Reviewed-by: Alexander Boyko <c17825@cray.com>
Reviewed-by: Alexander Zarochentsev <c17826@cray.com>
Reviewed-by: Gu Zheng <gzheng@ddn.com>
Reviewed-by: Alexandr Boyko <c17825@cray.com>
Reviewed-on: https://review.whamcloud.com/37994
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
libcfs/libcfs/libcfs_cpu.c