linux/Documentation
David Gow cdc87bda60 Documentation: kunit: Warn that exit functions run even if init fails
KUnit's exit functions will run even if the corresponding init function
fails. It's easy, when writing an exit function, to assume the init
function succeeded, and (for example) access uninitialised memory or
dereference NULL pointers.

Note that this case exists and should be handled in the documentation.

Suggested-by: Benjamin Berg <benjamin@sipsolutions.net>
Link: https://lore.kernel.org/linux-kselftest/a39af0400abedb2e9b31d84c37551cecc3eed0e1.camel@sipsolutions.net/
Reviewed-by: Sadiya Kazi <sadiyakazi@google.com>
Signed-off-by: David Gow <davidgow@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2023-05-11 18:17:35 -06:00
..
ABI
accel
accounting
admin-guide
arch
arm
arm64
block
bpf
cdrom
core-api
cpu-freq
crypto
dev-tools Documentation: kunit: Warn that exit functions run even if init fails 2023-05-11 18:17:35 -06:00
devicetree
doc-guide
driver-api
fault-injection
fb
features
filesystems
firmware-guide
firmware_class
fpga
gpu
hid
hwmon
i2c
iio
images
infiniband
input
isdn
kbuild
kernel-hacking
leds
litmus-tests
livepatch
locking
loongarch
maintainer
mhi
mips
misc-devices
mm
netlabel
netlink
networking
nvdimm
nvme
PCI
pcmcia
peci
power
powerpc
process
RCU
riscv
rust
s390
scheduler
scsi
security
sound
sphinx
sphinx-static
spi
staging
target
timers
tools
trace
translations
usb
userspace-api
virt
w1
watchdog
.gitignore
atomic_bitops.txt
atomic_t.txt
Changes
CodingStyle
conf.py
docutils.conf
dontdiff
index.rst
Kconfig
Makefile
memory-barriers.txt
SubmittingPatches
subsystem-apis.rst