zfs/module
Richard Yao 380b08098e
Linux SPL module init: Handle memory allocation failures correctly
Upon inspection of our code, I noticed that we assume that
__alloc_percpu() cannot fail, and while it probably never has failed in
practice, technically, it can fail, so we should handle that.

Additionally, we incorrectly assume that `taskq_create()` in
spl_kmem_cache_init() cannot fail. The same remark applies to it.

Lastly, `spl-init()` failures should always return negative error
values, but in some places, we are returning positive 1, which is
incorrect. We change those values to their correct error codes.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Closes #13847
2022-09-08 10:28:20 -07:00
..
avl Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
icp Fix build on FreeBSD/powerpc64* 2022-09-08 10:27:25 -07:00
lua Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
nvpair Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
os Linux SPL module init: Handle memory allocation failures correctly 2022-09-08 10:28:20 -07:00
unicode Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
zcommon Enable relatime by default 2022-08-12 14:20:25 -07:00
zfs Cleanup Raid-Z Typo fixes 2022-09-06 09:43:21 -07:00
zstd Tiered early abort, zstd edition 2022-05-24 09:43:22 -07:00
.gitignore FreeBSD: Ignore symlink to i386 includes 2022-08-02 16:34:23 -07:00
Kbuild.in Add support for ARCH=um for x86 sub-architectures 2022-06-15 14:22:52 -07:00
Makefile.bsd FreeBSD: add knlist_init_sx() for exclusive locks 2022-09-06 09:48:57 -07:00
Makefile.in autoconf: use include directives instead of recursing down lib 2022-05-10 10:18:11 -07:00