CVE-2025-40040 mm/ksm: fix flag-dropping behavior in ksm_madvise