btrfs: drop path before copying to userspace
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest4 patches 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | btrfs: drop path before copying inodes to userspacefs/ | +7 | 0 replies | |
| 2/4 | btrfs: drop path before copying fspath to userspacefs/ | +2 | 0 replies | |
| 3/4 | btrfs: drop path before copying rootrefs to userspacefs/ | +1 | 0 replies | |
| 4/4 | btrfs: drop path before copying subvol info to userspacefs/ | +2 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/4] btrfs: drop path before copying to userspace
In the ioctl functions below, we are holing ref to the path when copying the temp buffer to the userland. Which can lead to a similar lock splat warning as in the commit
[PATCH] btrfs: drop path before copying root refs to userspace
btrfs_ioctl_logical_to_ino
btrfs_ioctl_ino_to_path
btrfs_ioctl_get_subvol_rootref
btrfs_ioctl_get_subvol_info
Fix this by freeing the path before we copy it to userspace.
Individual patch 4/4 is also in the ML and is different from here: Check the value of ret to copy got dropped to keep it closer to the original logic. However, its version is unchanged to match the rest of the patch version.
Anand Jain (4):
btrfs: drop path before copying inodes to userspace
btrfs: drop path before copying fspath to userspace
btrfs: drop path before copying rootrefs to userspace
btrfs: drop path before copying subvol info to userspace
fs/btrfs/ioctl.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-)
Signature · 1 line
2.31.1