mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
UPSTREAM: fuse: dax: set fc->dax to NULL in fuse_dax_conn_free()
commit 7f8ed28d1401320bcb02dda81b3c23ab2dc5a6d8 upstream.
fuse_dax_conn_free() will be called when fuse_fill_super_common() fails
after fuse_dax_conn_alloc(). Then deactivate_locked_super() in
virtio_fs_get_tree() will call virtio_kill_sb() to release the discarded
superblock. This will call fuse_dax_conn_free() again in fuse_conn_put(),
resulting in a possible double free.
Fixes: 1dd539577c42 ("virtiofs: add a mount option to enable dax")
Change-Id: I5aabc81ad4f96078c612f2ec1c9077f21f4ffae4
Signed-off-by: Hangyu Hua <[email protected]>
Acked-by: Vivek Goyal <[email protected]>
Reviewed-by: Jingbo Xu <[email protected]>
Cc: <[email protected]> # v5.10
Signed-off-by: Miklos Szeredi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
fa625f8622
commit
2068b53c6a
1 changed files with 1 additions and 0 deletions
|
|
@ -1228,6 +1228,7 @@ void fuse_dax_conn_free(struct fuse_conn *fc)
|
|||
if (fc->dax) {
|
||||
fuse_free_dax_mem_ranges(&fc->dax->free_ranges);
|
||||
kfree(fc->dax);
|
||||
fc->dax = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue