Thanks for the reporting.
I will update the patch.
Regards,
Tomohiro Misono
On 2018/05/30 19:19, Dan Carpenter wrote:
> Hello Tomohiro Misono,
>
> The patch 56bfce6502b7: "btrfs: Add unprivileged version of
> ino_lookup ioctl" from May 16, 2018, leads to the following static
> checker warning:
>
> fs/btrfs/ioctl.c:2478 btrfs_search_path_in_tree_user()
> error: 'temp_inode' dereferencing possible ERR_PTR()
>
> fs/btrfs/ioctl.c
> 2469 l = path->nodes[0];
> 2470 slot = path->slots[0];
> 2471 btrfs_item_key_to_cpu(l, &key2, slot);
> 2472 if (key2.objectid != dirid) {
> 2473 ret = -ENOENT;
> 2474 goto out;
> 2475 }
> 2476
> 2477 temp_inode = btrfs_iget(sb, &key2, root, NULL);
> ^^^^^^^^^^^^^^^^^^^^^^^
> 2478 ret = inode_permission(temp_inode, MAY_READ | MAY_EXEC);
> ^^^^^^^^^^
> 2479 iput(temp_inode);
> 2480 if (ret) {
> 2481 ret = -EACCES;
> 2482 goto out;
> 2483 }
> 2484
>
>
> regards,
> dan carpenter
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html