Commit 418ffb9
btrfs: free btrfs_path before copying inodes to userspace
btrfs_ioctl_logical_to_ino() frees the search path after the userspace
copy from the temp buffer @inodes. Which potentially can lead to a lock
splat.
Fix this by freeing the path before we copy @inodes to userspace.
CC: stable@vger.kernel.org # 4.19+
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>1 parent b740d80 commit 418ffb9
1 file changed
Lines changed: 7 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4282 | 4282 | | |
4283 | 4283 | | |
4284 | 4284 | | |
4285 | | - | |
4286 | | - | |
4287 | | - | |
4288 | | - | |
4289 | | - | |
4290 | | - | |
4291 | 4285 | | |
4292 | 4286 | | |
4293 | 4287 | | |
4294 | | - | |
4295 | | - | |
| 4288 | + | |
4296 | 4289 | | |
4297 | 4290 | | |
| 4291 | + | |
| 4292 | + | |
| 4293 | + | |
| 4294 | + | |
| 4295 | + | |
4298 | 4296 | | |
4299 | 4297 | | |
| 4298 | + | |
4300 | 4299 | | |
4301 | 4300 | | |
4302 | 4301 | | |
| |||
4308 | 4307 | | |
4309 | 4308 | | |
4310 | 4309 | | |
4311 | | - | |
4312 | 4310 | | |
4313 | 4311 | | |
4314 | 4312 | | |
| |||
0 commit comments