All of lore.kernel.org
 help / color / mirror / Atom feed
* [Cluster-devel] [GFS2 PATCH 0/4 v5] Clean up and fix quota data allocate and free
@ 2020-03-26 18:35 Bob Peterson
  2020-03-26 18:36 ` [Cluster-devel] [GFS2 PATCH 1/4] gfs2: eliminate gfs2_rsqa_alloc in favor of gfs2_qa_alloc Bob Peterson
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Bob Peterson @ 2020-03-26 18:35 UTC (permalink / raw)
  To: cluster-devel.redhat.com

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



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-03-26 18:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-26 18:35 [Cluster-devel] [GFS2 PATCH 0/4 v5] Clean up and fix quota data allocate and free Bob Peterson
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

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.