Michael Ellerman 6f07048c00 powerpc: Define arch_is_kernel_initmem_freed() for lockdep
Under certain circumstances, we hit a warning in lockdep_register_key:

        if (WARN_ON_ONCE(static_obj(key)))
                return;

This occurs when the key falls into initmem that has since been freed
and can now be reused. This has been observed on boot, and under
memory pressure.

Define arch_is_kernel_initmem_freed(), which allows lockdep to
correctly identify this memory as dynamic.

This fixes a bug picked up by the powerpc64 syzkaller instance where
we hit the WARN via alloc_netdev_mqs.

Reported-by: Qian Cai <cai@lca.pw>
Reported-by: ppc syzbot c/o Andrew Donnellan <ajd@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Daniel Axtens <dja@axtens.net>
Link: https://lore.kernel.org/r/87lfs4f7d6.fsf@dja-thinkpad.axtens.net
2019-11-27 18:41:26 +11:00
..
2019-11-18 22:27:51 +11:00
2019-09-14 00:01:14 +10:00
2019-07-13 16:08:36 -07:00
2019-11-19 19:38:38 +11:00
2018-06-07 10:23:33 -07:00
2019-11-18 22:27:52 +11:00
2016-03-01 19:27:20 +11:00
2019-08-27 13:03:35 +10:00
2019-08-30 09:52:57 +10:00
2019-05-03 01:20:26 +10:00
2019-09-20 11:48:06 -07:00
2019-07-13 16:08:36 -07:00
2019-09-05 14:22:41 +10:00
2019-07-13 16:08:36 -07:00
2016-06-14 13:58:26 +10:00
2019-07-13 16:08:36 -07:00
2019-07-13 16:08:36 -07:00
2019-07-13 16:08:36 -07:00
2019-06-15 12:25:49 +02:00
2019-07-13 16:08:36 -07:00
2019-11-18 22:27:52 +11:00
2018-05-25 12:04:43 +10:00
2019-07-16 19:23:24 -07:00
2018-07-30 22:48:21 +10:00
2019-05-01 16:45:05 +10:00
2019-07-29 09:34:27 +10:00
2019-07-13 16:08:36 -07:00
2019-09-20 11:48:06 -07:00