linux/drivers/block/drbd
Kees Cook 805cdb8bc6 drbd: Remove uninitialized_var() usage
Using uninitialized_var() is dangerous as it papers over real bugs[1]
(or can in the future), and suppresses unrelated compiler warnings (e.g.
"unused variable"). If the compiler thinks it is uninitialized, either
simply initialize the variable or make compiler changes. As a precursor
to removing[2] this[3] macro[4], just initialize this variable to NULL.

[1] https://lore.kernel.org/lkml/20200603174714.192027-1-glider@google.com/
[2] https://lore.kernel.org/lkml/CA+55aFw+Vbj0i=1TGqCR5vQkCzWJ0QxK6CernOU6eedsudAixw@mail.gmail.com/
[3] https://lore.kernel.org/lkml/CA+55aFwgbgqhbp1fkxvRKEpzyR5J8n1vKT1VZdz9knmPuXhOeg@mail.gmail.com/
[4] https://lore.kernel.org/lkml/CA+55aFz2500WfbKXAx8s67wrm9=yVJu65TpLgN_ybYNv0VEOKA@mail.gmail.com/

Fixes: a29728463b ("drbd: Backport the "events2" command")
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
2020-07-16 12:32:25 -07:00
..
drbd_actlog.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 91 2019-05-24 17:37:53 +02:00
drbd_bitmap.c mm: remove the pgprot argument to __vmalloc 2020-06-02 10:59:11 -07:00
drbd_debugfs.c block: drbd: no need to check return value of debugfs_create functions 2019-06-20 03:28:16 -06:00
drbd_debugfs.h block: drbd: no need to check return value of debugfs_create functions 2019-06-20 03:28:16 -06:00
drbd_int.h drbd: Replace zero-length array with flexible-array 2020-06-15 23:08:31 -05:00
drbd_interval.c augmented rbtree: add new RB_DECLARE_CALLBACKS_MAX macro 2019-09-25 17:51:39 -07:00
drbd_interval.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
drbd_main.c tcp: add tcp_sock_set_nodelay 2020-05-28 11:11:45 -07:00
drbd_nl.c drbd: fifo_alloc() should use struct_size 2020-01-29 21:03:33 -07:00
drbd_nla.c netlink: make validation more configurable for future strictness 2019-04-27 17:07:21 -04:00
drbd_nla.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
drbd_proc.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 91 2019-05-24 17:37:53 +02:00
drbd_protocol.h drbd: Replace zero-length array with flexible-array 2020-06-15 23:08:31 -05:00
drbd_receiver.c tcp: add tcp_sock_set_quickack 2020-05-28 11:11:45 -07:00
drbd_req.c drbd: use bio_{start,end}_io_acct 2020-05-27 05:21:23 -06:00
drbd_req.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 91 2019-05-24 17:37:53 +02:00
drbd_state_change.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
drbd_state.c drbd: Remove uninitialized_var() usage 2020-07-16 12:32:25 -07:00
drbd_state.h drbd: Change drbd_request_detach_interruptible's return type to int 2018-12-20 09:51:31 -07:00
drbd_strings.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 91 2019-05-24 17:37:53 +02:00
drbd_strings.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
drbd_vli.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 91 2019-05-24 17:37:53 +02:00
drbd_worker.c tcp: add tcp_sock_set_cork 2020-05-28 11:11:45 -07:00
Kconfig drivers/block: remove redundant 'default n' from Kconfig-s 2018-10-10 14:11:08 -06:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00