* + hugetlbfs-fix-hugetlbfs_statfs-locking.patch added to mm-unstable branch
@ 2022-04-30 18:40 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2022-04-30 18:40 UTC (permalink / raw)
To: mm-commits, mike.kravetz, almasrymina, akpm
The patch titled
Subject: hugetlbfs: fix hugetlbfs_statfs() locking
has been added to the -mm mm-unstable branch. Its filename is
hugetlbfs-fix-hugetlbfs_statfs-locking.patch
This patch should soon appear in the mm-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days
------------------------------------------------------
From: Mina Almasry <almasrymina@google.com>
Subject: hugetlbfs: fix hugetlbfs_statfs() locking
After commit db71ef79b59b ("hugetlb: make free_huge_page irq safe"), the
subpool lock should be locked with spin_lock_irq() and all call sites was
modified as such, except for the ones in hugetlbfs_statfs().
Link: https://lkml.kernel.org/r/20220429202207.3045-1-almasrymina@google.com
Fixes: db71ef79b59b ("hugetlb: make free_huge_page irq safe")
Signed-off-by: Mina Almasry <almasrymina@google.com>
Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
fs/hugetlbfs/inode.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/fs/hugetlbfs/inode.c~hugetlbfs-fix-hugetlbfs_statfs-locking
+++ a/fs/hugetlbfs/inode.c
@@ -1051,12 +1051,12 @@ static int hugetlbfs_statfs(struct dentr
if (sbinfo->spool) {
long free_pages;
- spin_lock(&sbinfo->spool->lock);
+ spin_lock_irq(&sbinfo->spool->lock);
buf->f_blocks = sbinfo->spool->max_hpages;
free_pages = sbinfo->spool->max_hpages
- sbinfo->spool->used_hpages;
buf->f_bavail = buf->f_bfree = free_pages;
- spin_unlock(&sbinfo->spool->lock);
+ spin_unlock_irq(&sbinfo->spool->lock);
buf->f_files = sbinfo->max_inodes;
buf->f_ffree = sbinfo->free_inodes;
}
_
Patches currently in -mm which might be from almasrymina@google.com are
hugetlbfs-fix-hugetlbfs_statfs-locking.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-04-30 18:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-30 18:40 + hugetlbfs-fix-hugetlbfs_statfs-locking.patch added to mm-unstable branch Andrew Morton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.