Commit d296626
btrfs: fix use-after-free waiting for encoded read endios
Fix a use-after-free in the I/O completion path for encoded reads by
using a completion instead of a wait_queue for synchronizing the
destruction of 'struct btrfs_encoded_read_private'.
Fixes: 1881fba ("btrfs: add BTRFS_IOC_ENCODED_READ ioctl")
CC: stable@vger.kernel.org # 6.1+
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>1 parent f10bef7 commit d296626
1 file changed
Lines changed: 11 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9078 | 9078 | | |
9079 | 9079 | | |
9080 | 9080 | | |
9081 | | - | |
| 9081 | + | |
9082 | 9082 | | |
9083 | | - | |
| 9083 | + | |
9084 | 9084 | | |
9085 | 9085 | | |
9086 | 9086 | | |
| |||
9099 | 9099 | | |
9100 | 9100 | | |
9101 | 9101 | | |
9102 | | - | |
| 9102 | + | |
9103 | 9103 | | |
9104 | 9104 | | |
9105 | 9105 | | |
9106 | 9106 | | |
9107 | 9107 | | |
9108 | 9108 | | |
9109 | | - | |
| 9109 | + | |
9110 | 9110 | | |
9111 | 9111 | | |
9112 | 9112 | | |
| |||
9126 | 9126 | | |
9127 | 9127 | | |
9128 | 9128 | | |
9129 | | - | |
9130 | | - | |
| 9129 | + | |
| 9130 | + | |
9131 | 9131 | | |
9132 | 9132 | | |
9133 | 9133 | | |
| |||
9140 | 9140 | | |
9141 | 9141 | | |
9142 | 9142 | | |
9143 | | - | |
| 9143 | + | |
9144 | 9144 | | |
9145 | 9145 | | |
9146 | 9146 | | |
| |||
9155 | 9155 | | |
9156 | 9156 | | |
9157 | 9157 | | |
9158 | | - | |
| 9158 | + | |
9159 | 9159 | | |
9160 | 9160 | | |
9161 | 9161 | | |
9162 | | - | |
| 9162 | + | |
9163 | 9163 | | |
9164 | 9164 | | |
9165 | 9165 | | |
| |||
9168 | 9168 | | |
9169 | 9169 | | |
9170 | 9170 | | |
9171 | | - | |
9172 | | - | |
| 9171 | + | |
| 9172 | + | |
9173 | 9173 | | |
9174 | 9174 | | |
9175 | 9175 | | |
| |||
0 commit comments