android_kernel_motorola_sm6375/drivers/lightnvm
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Geert Uytterhoeven 2f5af4ab7d lightnvm: fix uninitialized pointer in nvm_remove_tgt()
With gcc 4.1:

    drivers/lightnvm/core.c: In function ‘nvm_remove_tgt’:
    drivers/lightnvm/core.c:510: warning: ‘t’ is used uninitialized in this function

Indeed, if no NVM devices have been registered, t will be an
uninitialized pointer, and may be dereferenced later.  A call to
nvm_remove_tgt() can be triggered from userspace by issuing the
NVM_DEV_REMOVE ioctl on the lightnvm control device.

Fix this by preinitializing t to NULL.

Fixes: 843f2edbdd ("lightnvm: do not remove instance under global lock")
Signed-off-by: Geert Uytterhoeven <[email protected]>
Signed-off-by: Matias Bjørling <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
2019-06-21 03:14:30 -06:00
..
core.c lightnvm: fix uninitialized pointer in nvm_remove_tgt() 2019-06-21 03:14:30 -06:00
Kconfig
Makefile
pblk-cache.c
pblk-core.c
pblk-gc.c
pblk-init.c
pblk-map.c
pblk-rb.c
pblk-read.c
pblk-recovery.c
pblk-rl.c
pblk-sysfs.c
pblk-trace.h
pblk-write.c
pblk.h