Xiaomeng Tong f730a46b93
ASoC: soc-dapm: fix two incorrect uses of list iterator
These two bug are here:
	list_for_each_entry_safe_continue(w, n, list,
					power_list);
	list_for_each_entry_safe_continue(w, n, list,
					power_list);

After the list_for_each_entry_safe_continue() exits, the list iterator
will always be a bogus pointer which point to an invalid struct objdect
containing HEAD member. The funciton poniter 'w->event' will be a
invalid value which can lead to a control-flow hijack if the 'w' can be
controlled.

The original intention was to continue the outer list_for_each_entry_safe()
loop with the same entry if w->event is NULL, but misunderstanding the
meaning of list_for_each_entry_safe_continue().

So just add a 'continue;' to fix the bug.

Cc: stable@vger.kernel.org
Fixes: 163cac061c973 ("ASoC: Factor out DAPM sequence execution")
Signed-off-by: Xiaomeng Tong <xiam0nd.tong@gmail.com>
Link: https://lore.kernel.org/r/20220329012134.9375-1-xiam0nd.tong@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-04-05 10:24:44 +01:00
..
2022-03-21 16:19:21 +01:00
2021-11-03 17:00:52 -07:00
2022-03-30 14:04:22 +02:00
2021-12-20 12:47:16 +00:00
2021-12-31 13:23:28 +00:00
2022-03-21 16:19:21 +01:00
2022-03-07 13:14:56 +00:00
2021-12-20 12:47:23 +00:00
2022-02-01 08:08:08 +01:00