backport commit ("739f79fc9db1 mm: memcontrol: fix NULL pointer crash in test_clear_page_writeback()") to linux-4.9-stable