diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2014-11-04 16:11:03 +0100 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2014-11-05 14:49:38 +0100 |
commit | 3f822c6264954660babce757fb45792fd3af273e (patch) | |
tree | c89c9b7ddf6c1a7628b9c6fd2246574aec9d500f /fs | |
parent | Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/evalent... (diff) | |
download | linux-3f822c6264954660babce757fb45792fd3af273e.tar.xz linux-3f822c6264954660babce757fb45792fd3af273e.zip |
ovl: don't poison cursor
ovl_cache_put() can be called from ovl_dir_reset() if the cache needs to be
rebuilt. We did list_del() on the cursor, which results in an Oops on the
poisoned pointer in ovl_seek_cursor().
Reported-by: Jordi Pujol Palomer <jordipujolp@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Tested-by: Jordi Pujol Palomer <jordipujolp@gmail.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/overlayfs/readdir.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/overlayfs/readdir.c b/fs/overlayfs/readdir.c index 4e9d7c1fea52..2a7ef4f8e2a6 100644 --- a/fs/overlayfs/readdir.c +++ b/fs/overlayfs/readdir.c @@ -168,7 +168,7 @@ static void ovl_cache_put(struct ovl_dir_file *od, struct dentry *dentry) { struct ovl_dir_cache *cache = od->cache; - list_del(&od->cursor.l_node); + list_del_init(&od->cursor.l_node); WARN_ON(cache->refcount <= 0); cache->refcount--; if (!cache->refcount) { |