summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2017-02-24 18:01:04 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2017-02-24 20:46:57 -0500
commitf231aebfc4cae2f6ed27a46a31e2630909513d77 (patch)
tree5abce0379ed59e0fc011258c59b42f01a8293908 /lib
parent4f5901f5a6724f4ed1641e4a94978c5039a1f8c4 (diff)
rbtree: 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. Link: http://lkml.kernel.org/r/20161217010253.GA140470@beast Signed-off-by: Kees Cook <keescook@chromium.org> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: David Howells <dhowells@redhat.com> Cc: Jie Chen <fykcee1@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/rbtree.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/rbtree.c b/lib/rbtree.c
index 1f8b112a7c35..4ba2828a67c0 100644
--- a/lib/rbtree.c
+++ b/lib/rbtree.c
@@ -427,7 +427,9 @@ static inline void dummy_copy(struct rb_node *old, struct rb_node *new) {}
427static inline void dummy_rotate(struct rb_node *old, struct rb_node *new) {} 427static inline void dummy_rotate(struct rb_node *old, struct rb_node *new) {}
428 428
429static const struct rb_augment_callbacks dummy_callbacks = { 429static const struct rb_augment_callbacks dummy_callbacks = {
430 dummy_propagate, dummy_copy, dummy_rotate 430 .propagate = dummy_propagate,
431 .copy = dummy_copy,
432 .rotate = dummy_rotate
431}; 433};
432 434
433void rb_insert_color(struct rb_node *node, struct rb_root *root) 435void rb_insert_color(struct rb_node *node, struct rb_root *root)