diff options
author | Raghavendra Gowdappa <rgowdapp@redhat.com> | 2019-02-13 17:08:14 +0530 |
---|---|---|
committer | Shyamsundar Ranganathan <srangana@redhat.com> | 2019-02-22 03:33:07 +0000 |
commit | bff265f8bc12eb43e82732b6ae81abf18a4b7a97 (patch) | |
tree | ee1db62f4cfbcf2683fb92121830b678b098fc48 /xlators/cluster/dht/src/dht-common.c | |
parent | 1f8b2912c83d1e5ce95f9d73fcf7397c3435ba67 (diff) |
performance/write-behind: fix use-after-free in readdirp
Two issues were found:
1. in wb_readdirp_cbk, inode should unrefed after wb_inode is
unlocked. Otherwise, inode and hence the context wb_inode can be freed
by the type we try to unlock wb_inode
2. wb_readdirp_mark_end iterates over a list of wb_inodes of children
of a directory. But inodes could've been freed and hence the list
might be corrupted. To fix take a reference on inode before adding it
to invalidate_list of parent.
Change-Id: I911b0e0b2060f7f41ded0b05db11af6f9b7c09c5
Signed-off-by: Raghavendra Gowdappa <rgowdapp@redhat.com>
Updates: bz#1678570
(cherry picked from commit 64cc4458918e8c8bfdeb114da0a6501b2b98491a)
Diffstat (limited to 'xlators/cluster/dht/src/dht-common.c')
0 files changed, 0 insertions, 0 deletions