Skip to content

mm_slot: fix the usage of mm_slot_entry()

Wei Yang linux-mm 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest2 patches 9 repliesIn review
  2. v32 patches 13 repliesSuperseded
  3. v22 patches 13 repliesSuperseded 1 of 2 applied

Changes in v4 from the cover letter

* adjust change log
* use invert style in patch 1
* rename slab to "mm_slot"

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2mm/ksm: don't call mm_slot_entry() when the slot is NULLmm/ksm.c+13 -105 replies
2/2mm/khugepaged: remove definition of struct khugepaged_mm_slotmm/khugepaged.c+18 -374 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchLance YangDev JainMuhammad Usama AnjumDavid HildenbrandKiryl ShutsemauZi YanRaghavendra K T
1/2R-b R-b A-b A-b A-b
2/2A-b R-b A-b A-b A-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 7 reviewers.

Read the v4 thread

Cover letter [Patch v4 0/2] mm_slot: fix the usage of mm_slot_entry()

The usage of mm_slot_entry() in ksm/khugepaged is not correct. In case mm_slot_lookup() return a NULL slot, mm_slot_entry() should not be called.

To fix this:

Patch 1: check slot before continue in ksm.c Patch 2: remove the definition of khugepaged_mm_slot

v4:
* adjust change log
* use invert style in patch 1
* rename slab to "mm_slot"

v3:
fix a pf because of slot change
fix uninitialized mm_slot

v2:
fix the error in code instead guard by compiler

V1:
add a BUILD_BUG_ON_MSG() to make sure slot is the first element

[1]: https://lkml.kernel.org/r/[email protected]
[2]: https://lkml.kernel.org/r/[email protected]
[3]: https://lkml.kernel.org/r/[email protected]

Wei Yang (2):
mm/ksm: don't call mm_slot_entry() when the slot is NULL mm/khugepaged: remove definition of struct khugepaged_mm_slot

 mm/khugepaged.c | 55 ++++++++++++++++---------------------------------
 mm/ksm.c        | 23 ++++++++++++---------
 2 files changed, 31 insertions(+), 47 deletions(-)
Signature · 1 line
2.34.1