Commit 56c631f5 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'gcc-plugins-v5.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux

Pull gcc-plugins fix from Kees Cook:
 "Fix a potential problem in randomize_layout structure auto-selection
  (that was not triggered by any existing kernel structures)"

* tag 'gcc-plugins-v5.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
  randstruct: Check member structs in is_pure_ops_struct()
parents 56c1e834 60f2c82e
......@@ -443,13 +443,13 @@ static int is_pure_ops_struct(const_tree node)
if (node == fieldtype)
continue;
if (!is_fptr(fieldtype))
if (code == RECORD_TYPE || code == UNION_TYPE) {
if (!is_pure_ops_struct(fieldtype))
return 0;
if (code != RECORD_TYPE && code != UNION_TYPE)
continue;
}
if (!is_pure_ops_struct(fieldtype))
if (!is_fptr(fieldtype))
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment