Re: [PATCH bpf-next v2] bpf: Change inode_storage's lookup_elem return value from NULL to -EBADF.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Mar 7, 2021 at 7:18 PM Yonghong Song <yhs@xxxxxx> wrote:
>
>
>
> On 3/7/21 4:09 AM, Tal Lossos wrote:
> > bpf_fd_inode_storage_lookup_elem returned NULL when getting a bad FD,
> > which caused -ENOENT in bpf_map_copy_value.
> > EBADF is better than ENOENT for a bad FD behaviour.
> >
> > The patch was partially contributed by CyberArk Software, Inc.
> >
> > Signed-off-by: Tal Lossos <tallossos@xxxxxxxxx>
>
> Acked-by: Yonghong Song <yhs@xxxxxx>

Thanks this makes sense and is consistent with sk_storage (which
uses sockfd_lookup) and task_storage (which uses pidfd_get_pid)
which return an -EBADF as well.

Acked-by: KP Singh <kpsingh@xxxxxxxxxx>



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux