Skip to content

mm/hugetlb: Fix missing hugetlb_lock for memcg resv uncharge

Peter Xu linux-mm lkml stable 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 5 repliesIn review 2 of 3 applied

Patches in v1 2 of 3 applied

#Subject and filesSizeRepliesApplied
1/3fixup! mm: always initialise folio->_deferred_listmm/memcontrol.c+1 -02 replies
2/3mm/hugetlb: Fix missing hugetlb_lock for resv unchargemm/hugetlb.c+4 -11 replyApplied
3/3mm/hugetlb: Assert hugetlb_lock in __hugetlb_cgroup_commit_chargemm/hugetlb_cgroup.c+1 -12 repliesApplied

Reviews trailers per patch

2 of 3 patches have a Reviewed-by or Acked-by.

PatchMina Almasry
1/3
2/3R-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/3] mm/hugetlb: Fix missing hugetlb_lock for memcg resv uncharge

Should fix the recent syzbot report for:

https://lore.kernel.org/all/[email protected]/

Patch 1 is a small fixup where I notice mm-unstable crashes with the new hugetlb memcg accounting when testing the changes.

Patch 2 should be the fix to the reported issue.

Patch 3 is an oneliner to add an assertion similar to what found the issue in patch 2.

Only smoke tested over a bunch of hugetlb unit tests. Reviews welcomed.

Thanks,

Peter Xu (3):
fixup! mm: always initialise folio->_deferred_list mm/hugetlb: Fix missing hugetlb_lock for resv uncharge mm/hugetlb: Assert hugetlb_lock in __hugetlb_cgroup_commit_charge

 mm/hugetlb.c        | 5 ++++-
 mm/hugetlb_cgroup.c | 2 +-
 mm/memcontrol.c     | 1 +
 3 files changed, 6 insertions(+), 2 deletions(-)
Signature · 1 line
2.44.0