Skip to contentSkip to conversation

bna: use designated initializers

PATCH Applied Kees Cook 2 participants 2 messages Dec 17, 2016

Subsystems (3)
lore
Share & tools
lore

Kees Cook

author
#0 lore raw

PATCH 1/1 bna: 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.

---
 drivers/net/ethernet/brocade/bna/bna_enet.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/net/ethernet/brocade/bna/bna_enet.c +4 -4
index 4e5c3874a50f..bba81735ce87 100644
@@ -1676,10 +1676,10 @@ bna_cb_ioceth_reset(void *arg)
 }
 
 static struct bfa_ioc_cbfn bna_ioceth_cbfn = {
-	bna_cb_ioceth_enable,
-	bna_cb_ioceth_disable,
-	bna_cb_ioceth_hbfail,
-	bna_cb_ioceth_reset
+	.enable_cbfn = bna_cb_ioceth_enable,
+	.disable_cbfn = bna_cb_ioceth_disable,
+	.hbfail_cbfn = bna_cb_ioceth_hbfail,
+	.reset_cbfn = bna_cb_ioceth_reset
 };
 
 static void bna_attr_init(struct bna_ioceth *ioceth)
Signature · 6 lines
2.7.4


-- 
Kees Cook
Nexus Security
maintainer Applied
#1 lore raw

From: Kees Cook <[email protected]>
Date: Fri, 16 Dec 2016 17:00:54 -0800

Quoted 6 lines

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.

Applied.