lkml.org 
[lkml]   [2017]   [Oct]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] f2fs: avoid stale fi->gdirty_list pointer
Date
When doing fault injection test, f2fs_evict_inode() didn't remove gdirty_list
which incurs a kernel panic due to wrong pointer access.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
fs/f2fs/inode.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c
index f6db9d533ca4..1ae5396c97d6 100644
--- a/fs/f2fs/inode.c
+++ b/fs/f2fs/inode.c
@@ -535,6 +535,8 @@ void f2fs_evict_inode(struct inode *inode)

if (!is_set_ckpt_flags(sbi, CP_ERROR_FLAG))
f2fs_bug_on(sbi, is_inode_flag_set(inode, FI_DIRTY_INODE));
+ else
+ f2fs_inode_synced(inode);

/* ino == 0, if f2fs_new_inode() was failed t*/
if (inode->i_ino)
--
2.14.0.rc1.383.gd1ce394fe2-goog
\
 
 \ /
  Last update: 2017-10-13 04:14    [W:0.044 / U:3.288 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site