From: kernel test robot <lkp@intel.com>
To: Jakub Kicinski <kuba@kernel.org>, davem@davemloft.net
Cc: kbuild-all@lists.01.org, netdev@vger.kernel.org,
jiri@resnulli.us, leon@kernel.org, mkubecek@suse.cz,
andrew@lunn.ch, f.fainelli@gmail.com,
Jakub Kicinski <kuba@kernel.org>
Subject: Re: [PATCH net-next 4/4] ethtool: don't drop the rtnl_lock half way thru the ioctl
Date: Sat, 30 Oct 2021 16:50:29 +0800 [thread overview]
Message-ID: <202110301653.Sl8SFaPC-lkp@intel.com> (raw)
In-Reply-To: <20211030040611.1751638-5-kuba@kernel.org>
[-- Attachment #1: Type: text/plain, Size: 4649 bytes --]
Hi Jakub,
I love your patch! Yet something to improve:
[auto build test ERROR on net-next/master]
url: https://github.com/0day-ci/linux/commits/Jakub-Kicinski/improve-ethtool-rtnl-vs-devlink-locking/20211030-120714
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 28131d896d6d316bc1f6f305d1a9ed6d96c3f2a1
config: ia64-defconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 11.2.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/1ff3b7575e0d00813e134dd4945e5ccab234f2aa
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Jakub-Kicinski/improve-ethtool-rtnl-vs-devlink-locking/20211030-120714
git checkout 1ff3b7575e0d00813e134dd4945e5ccab234f2aa
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=ia64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
net/ethtool/ioctl.c: In function 'dev_ethtool':
>> net/ethtool/ioctl.c:3049:63: error: passing argument 1 of 'devlink_compat_flash_update' from incompatible pointer type [-Werror=incompatible-pointer-types]
3049 | rc = devlink_compat_flash_update(state->devlink,
| ~~~~~^~~~~~~~~
| |
| struct devlink *
In file included from net/ethtool/ioctl.c:28:
include/net/devlink.h:1757:48: note: expected 'struct net_device *' but argument is of type 'struct devlink *'
1757 | devlink_compat_flash_update(struct net_device *dev, const char *file_name)
| ~~~~~~~~~~~~~~~~~~~^~~
>> net/ethtool/ioctl.c:3054:61: error: passing argument 1 of 'devlink_compat_running_version' from incompatible pointer type [-Werror=incompatible-pointer-types]
3054 | devlink_compat_running_version(state->devlink,
| ~~~~~^~~~~~~~~
| |
| struct devlink *
In file included from net/ethtool/ioctl.c:28:
include/net/devlink.h:1752:51: note: expected 'struct net_device *' but argument is of type 'struct devlink *'
1752 | devlink_compat_running_version(struct net_device *dev, char *buf, size_t len)
| ~~~~~~~~~~~~~~~~~~~^~~
cc1: some warnings being treated as errors
vim +/devlink_compat_flash_update +3049 net/ethtool/ioctl.c
3016
3017 int dev_ethtool(struct net *net, struct ifreq *ifr, void __user *useraddr)
3018 {
3019 struct ethtool_devlink_compat *state;
3020 u32 ethcmd;
3021 int rc;
3022
3023 if (copy_from_user(ðcmd, useraddr, sizeof(ethcmd)))
3024 return -EFAULT;
3025
3026 state = kzalloc(sizeof(*state), GFP_KERNEL);
3027 if (!state)
3028 return -ENOMEM;
3029
3030 switch (ethcmd) {
3031 case ETHTOOL_FLASHDEV:
3032 if (copy_from_user(&state->efl, useraddr, sizeof(state->efl))) {
3033 rc = -EFAULT;
3034 goto exit_free;
3035 }
3036 state->efl.data[ETHTOOL_FLASH_MAX_FILENAME - 1] = 0;
3037 break;
3038 }
3039
3040 rtnl_lock();
3041 rc = __dev_ethtool(net, ifr, useraddr, ethcmd, state);
3042 rtnl_unlock();
3043 if (rc)
3044 goto exit_free;
3045
3046 switch (ethcmd) {
3047 case ETHTOOL_FLASHDEV:
3048 if (state->devlink)
> 3049 rc = devlink_compat_flash_update(state->devlink,
3050 state->efl.data);
3051 break;
3052 case ETHTOOL_GDRVINFO:
3053 if (state->devlink)
> 3054 devlink_compat_running_version(state->devlink,
3055 state->info.fw_version,
3056 sizeof(state->info.fw_version));
3057 if (copy_to_user(useraddr, &state->info, sizeof(state->info))) {
3058 rc = -EFAULT;
3059 goto exit_free;
3060 }
3061 break;
3062 }
3063
3064 exit_free:
3065 if (state->devlink)
3066 devlink_put(state->devlink);
3067 kfree(state);
3068 return rc;
3069 }
3070
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 19961 bytes --]
prev parent reply other threads:[~2021-10-30 8:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-30 4:06 [PATCH net-next 0/4] improve ethtool/rtnl vs devlink locking Jakub Kicinski
2021-10-30 4:06 ` [PATCH net-next 1/4] ethtool: push the rtnl_lock into dev_ethtool() Jakub Kicinski
2021-10-30 4:06 ` [PATCH net-next 2/4] ethtool: handle info/flash data copying outside rtnl_lock Jakub Kicinski
2021-10-30 4:06 ` [PATCH net-next 3/4] devlink: expose get/put functions Jakub Kicinski
2021-10-30 4:06 ` [PATCH net-next 4/4] ethtool: don't drop the rtnl_lock half way thru the ioctl Jakub Kicinski
2021-10-30 8:50 ` 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=202110301653.Sl8SFaPC-lkp@intel.com \
--to=lkp@intel.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=jiri@resnulli.us \
--cc=kbuild-all@lists.01.org \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=mkubecek@suse.cz \
--cc=netdev@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).