[PATCH 0/6] KSM fixes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

With a stress test leveraging Hugh's allksm old patch, I found a
random memory corruption bug (modify and user after free). It's firing
oopses and generic instability so it's not just theoretical, but it
can only be reproduced in practice with frequent exits and KSM at 100%
CPU load. Note that it's common to give an entire core to KSM when the
system is low on memory in production, http://www.ovirt.org/MoM is
likely to do that as well. The allksm hack (not in this patchset) only
facilitates at creating a workload that exit frequently to increase
the frequency of the race window, without having to patch and rebuild
binaries to call the MADV_MERGEABLE by hand.

I also did some other orthogonal optimization and cleanup.

I'm sending those upstream standalone, separately from some more
complex larger and orthogonal pending changes I'm currently working
on. Those will take more time to review and this fix is higher
priority.

I haven't added -stable but at least 1/6 is definitely a candidate for
stable, IMHO 2/6 would be good idea too. If this passes review and the
fix is confirmed, I can resubmit at least 1/6 to stable. Comments?

Thanks,
Andrea

Andrea Arcangeli (6):
  ksm: fix rmap_item->anon_vma memory corruption and vma user after free
  ksm: add cond_resched() to the rmap_walks
  ksm: don't fail stable tree lookups if walking over stale stable_nodes
  ksm: use the helper method to do the hlist_empty check
  ksm: use find_mergeable_vma in try_to_merge_with_ksm_page
  ksm: unstable_tree_search_insert error checking cleanup

 mm/ksm.c  | 97 ++++++++++++++++++++++++++++++++++++++++++++++++++++++---------
 mm/rmap.c |  4 +++
 2 files changed, 88 insertions(+), 13 deletions(-)

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]