From: Bob Peterson <rpeterso@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [GFS2 PATCH 0/4 v5] Clean up and fix quota data allocate and free
Date: Thu, 26 Mar 2020 13:35:59 -0500 [thread overview]
Message-ID: <20200326183603.123323-1-rpeterso@redhat.com> (raw)
This patch set cleans up a recently discovered race between file close
and chown. The problem was that file close would free the quota data
structures attached to the in-core inode, but chown relied on them to
exist. So if the timing of the close is wrong, the chown can result in
kernel panic. The problem is easily recreated with this:
On terminal session 1:
while true; do chown test /mnt/gfs2/test; chown root /mnt/gfs2/test; done
On terminal session 2:
while true; do echo "a" > /mnt/gfs2/test; echo "b" > /mnt/gfs2/test;done
This is version 5, which implements more of Andreas's suggestions and
fixes up a bug or two, plus some patches written by Andreas.
Andreas Gruenbacher (2):
gfs2: Split gfs2_rsqa_delete into gfs2_rs_delete and gfs2_qa_put
gfs2: Remove unnecessary gfs2_qa_{get,put} pairs
Bob Peterson (2):
gfs2: eliminate gfs2_rsqa_alloc in favor of gfs2_qa_alloc
gfs2: Change inode qa_data to allow multiple users
fs/gfs2/acl.c | 7 ++++--
fs/gfs2/bmap.c | 5 ++--
fs/gfs2/file.c | 43 +++++++++++++--------------------
fs/gfs2/incore.h | 1 +
fs/gfs2/inode.c | 35 ++++++++++++++++-----------
fs/gfs2/quota.c | 63 +++++++++++++++++++++++++++++-------------------
fs/gfs2/quota.h | 4 +--
fs/gfs2/rgrp.c | 15 ++----------
fs/gfs2/rgrp.h | 3 +--
fs/gfs2/super.c | 5 +++-
fs/gfs2/xattr.c | 12 ++++++---
11 files changed, 102 insertions(+), 91 deletions(-)
--
2.25.1
next reply other threads:[~2020-03-26 18:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-26 18:35 Bob Peterson [this message]
2020-03-26 18:36 ` [Cluster-devel] [GFS2 PATCH 1/4] gfs2: eliminate gfs2_rsqa_alloc in favor of gfs2_qa_alloc Bob Peterson
2020-03-26 18:36 ` [Cluster-devel] [GFS2 PATCH 2/4] gfs2: Change inode qa_data to allow multiple users Bob Peterson
2020-03-26 18:36 ` [Cluster-devel] [GFS2 PATCH 3/4] gfs2: Split gfs2_rsqa_delete into gfs2_rs_delete and gfs2_qa_put Bob Peterson
2020-03-26 18:36 ` [Cluster-devel] [GFS2 PATCH 4/4] gfs2: Remove unnecessary gfs2_qa_{get, put} pairs Bob Peterson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200326183603.123323-1-rpeterso@redhat.com \
--to=rpeterso@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.