From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH bpf-next] bpf: Change inode_storage's lookup_elem return value from NULL to -EBADF.
Date: Sun, 07 Mar 2021 19:53:44 +0800 [thread overview]
Message-ID: <202103071956.WNvOU0T8-lkp@intel.com> (raw)
In-Reply-To: <20210307103224.60366-1-tallossos@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2208 bytes --]
Hi Tal,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on bpf-next/master]
url: https://github.com/0day-ci/linux/commits/Tal-Lossos/bpf-Change-inode_storage-s-lookup_elem-return-value-from-NULL-to-EBADF/20210307-183448
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: powerpc-allyesconfig (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/62784457408977140aecb9d1cadbb13e281e7932
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Tal-Lossos/bpf-Change-inode_storage-s-lookup_elem-return-value-from-NULL-to-EBADF/20210307-183448
git checkout 62784457408977140aecb9d1cadbb13e281e7932
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
kernel/bpf/bpf_inode_storage.c: In function 'bpf_fd_inode_storage_lookup_elem':
>> kernel/bpf/bpf_inode_storage.c:112:10: warning: returning 'int' from a function with return type 'void *' makes pointer from integer without a cast [-Wint-conversion]
112 | return -EBADF;
| ^
vim +112 kernel/bpf/bpf_inode_storage.c
102
103 static void *bpf_fd_inode_storage_lookup_elem(struct bpf_map *map, void *key)
104 {
105 struct bpf_local_storage_data *sdata;
106 struct file *f;
107 int fd;
108
109 fd = *(int *)key;
110 f = fget_raw(fd);
111 if (!f)
> 112 return -EBADF;
113
114 sdata = inode_storage_lookup(f->f_inode, map, true);
115 fput(f);
116 return sdata ? sdata->data : NULL;
117 }
118
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 72572 bytes --]
prev parent reply other threads:[~2021-03-07 11:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-07 10:32 [PATCH bpf-next] bpf: Change inode_storage's lookup_elem return value from NULL to -EBADF Tal Lossos
2021-03-07 11:53 ` kernel test robot [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202103071956.WNvOU0T8-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.