提交 3f822c62 编写于 作者: M Miklos Szeredi 提交者: Al Viro

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: NJordi Pujol Palomer <jordipujolp@gmail.com>
Signed-off-by: NMiklos Szeredi <mszeredi@suse.cz>
Tested-by: NJordi Pujol Palomer <jordipujolp@gmail.com>
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
上级 a1cff6e2
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册