Re: bpf: inode_storage lookup element unexpected behaviour‏‏

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

 





On 3/4/21 7:11 AM, Tal Lossos wrote:
Hi,
For some reason I've noticed that the current inode_storage's
lookup_elem func returns NULL for a bad fd, which causes ENOENT in
bpf_map_copy_value.
This behaviour is different from the other inode_storage's functions
like update_elem which returns EBADF for a bad fd.

We've checked in the other local storage maps (tasks and sock) and
they return EBADF for a bad fd in their lookup_elem func.
Should inode_storage's lookup_elem func be changed for this same behaviour?
I could submit a patch which changes that behaviour.

Yes, -EBADF is better than -ENOENT. Please go ahead to submit a patch.
Thanks!


Thanks.




[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