From: Kees Cook Date: Wed, 29 Mar 2017 20:59:23 +0000 (-0700) Subject: scsi: qedi: qedf: Use designated initializers X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=efacae6d4c095a5a99a012713089def1c5ad8906;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git scsi: qedi: qedf: Use designated initializers 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 Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen --- diff --git a/drivers/scsi/qedf/qedf_debugfs.c b/drivers/scsi/qedf/qedf_debugfs.c index cb08b625c594..00a1d6405ebe 100644 --- a/drivers/scsi/qedf/qedf_debugfs.c +++ b/drivers/scsi/qedf/qedf_debugfs.c @@ -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 */ diff --git a/drivers/scsi/qedi/qedi_debugfs.c b/drivers/scsi/qedi/qedi_debugfs.c index 955936274241..b064c882411c 100644 --- a/drivers/scsi/qedi/qedi_debugfs.c +++ b/drivers/scsi/qedi/qedi_debugfs.c @@ -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 }, + { }, };