coredump: factor out the setting of PF_DUMPCORE