Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -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;
	}