scsi: qedi: qedf: Use designated initializers
authorKees Cook <keescook@chromium.org>
Wed, 29 Mar 2017 20:59:23 +0000 (13:59 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 20 Apr 2017 02:10:25 +0000 (22:10 -0400)
Prepare to mark sensitive kernel structures for randomization by making
sure they're using designated initializers. These were identified during
allyesconfig builds of x86, arm, and arm64, with most initializer fixes
extracted from grsecurity.

For these cases, terminate the list with { }, which will be zero-filled,
instead of undesignated NULLs.

Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/qedf/qedf_debugfs.c
drivers/scsi/qedi/qedi_debugfs.c

index cb08b625c59479a6c0d43c43d62cea15cbeb8e26..00a1d6405ebe1346fb4e049a006699682a5ee0fa 100644 (file)
@@ -449,7 +449,7 @@ const struct file_operations qedf_dbg_fops[] = {
        qedf_dbg_fileops(qedf, clear_stats),
        qedf_dbg_fileops_seq(qedf, offload_stats),
        /* This must be last */
-       { NULL, NULL },
+       { },
 };
 
 #else /* CONFIG_DEBUG_FS */
index 955936274241406e2c8df92a7f3a5fcd530d7f05..b064c882411cf8d312435f5b1cc314864b935e46 100644 (file)
@@ -240,5 +240,5 @@ const struct file_operations qedi_dbg_fops[] = {
        qedi_dbg_fileops_seq(qedi, gbl_ctx),
        qedi_dbg_fileops(qedi, do_not_recover),
        qedi_dbg_fileops_seq(qedi, io_trace),
-       { NULL, NULL },
+       { },
 };