All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v6 0/3] xfs: fixes for malformed on-disk i_mode
@ 2017-01-09 13:06 Amir Goldstein
  2017-01-09 13:06 ` [PATCH v6 1/3] xfs: fix the size of xfs_mode_to_ftype table Amir Goldstein
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Amir Goldstein @ 2017-01-09 13:06 UTC (permalink / raw)
  To: Darrick J . Wong; +Cc: Brian Foster, linux-xfs

Darrick,

This is 6th revision of the fixes for malformed on-disk i_mode.

I implemented the xfs specific test case (xfs/348) to test all
possible malformed file type values as you suggested.

Tested with generic/401 with -n ftype=0|1.
Tested with new xfs/348 test with -n ftype=0|1.

Test xfs/348 exposed an ASSERT on attempt to readdir of regular
file that is posing as a directory.

Patch 2 implements your suggestion to address this case.

Patch 3 fixes a very strage upsidedown unlikely() in the
xfs ASSERT macros. I hope I am not tripping...

Amir.

v6:
- Added Reviewed-by Brian for patch 1
- Added patch 2 to address new xfs/348 failures
- Added patch 3 to fix ASSERT() likely

v5:
- remove wrong argument about on-disk malformed mode from commit message
- address Brian's review comments

v4:
- independent fix patch for xfs

Amir Goldstein (3):
  xfs: fix the size of xfs_mode_to_ftype table
  xfs: sanity check directory inode di_size
  xfs: make the ASSERT() condition likely

 fs/xfs/libxfs/xfs_dir2.c      | 21 +++++++++++----------
 fs/xfs/libxfs/xfs_dir2.h      |  4 +++-
 fs/xfs/libxfs/xfs_inode_buf.c |  7 +++++--
 fs/xfs/xfs_iops.c             |  2 +-
 fs/xfs/xfs_linux.h            |  6 +++---
 5 files changed, 23 insertions(+), 17 deletions(-)

-- 
2.7.4


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

end of thread, other threads:[~2017-01-10  7:54 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-09 13:06 [PATCH v6 0/3] xfs: fixes for malformed on-disk i_mode Amir Goldstein
2017-01-09 13:06 ` [PATCH v6 1/3] xfs: fix the size of xfs_mode_to_ftype table Amir Goldstein
2017-01-09 15:51   ` Christoph Hellwig
2017-01-09 17:21     ` Amir Goldstein
2017-01-09 21:17       ` Darrick J. Wong
2017-01-10  7:54         ` Amir Goldstein
2017-01-09 13:06 ` [PATCH v6 2/3] xfs: sanity check directory inode di_size Amir Goldstein
2017-01-09 15:52   ` Christoph Hellwig
2017-01-09 13:06 ` [PATCH v6 3/3] xfs: make the ASSERT() condition likely Amir Goldstein
2017-01-09 15:53   ` Christoph Hellwig

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.