Re: [PATCH v3 1/6] soc/tegra: Add devm_tegra_core_dev_init_opp_table()
by kernel test robot
Hi Dmitry,
I love your patch! Perhaps something to improve:
[auto build test WARNING on tegra/for-next]
[also build test WARNING on v5.12-rc2 next-20210311]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Dmitry-Osipenko/soc-tegra-Add-de...
base: https://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux.git for-next
config: arm-defconfig (attached as .config)
compiler: arm-linux-gnueabi-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/8d5ea5b946a1399d7490fa992733a737c...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Dmitry-Osipenko/soc-tegra-Add-devm_tegra_core_dev_init_opp_table/20210312-081244
git checkout 8d5ea5b946a1399d7490fa992733a737c4bbd594
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/soc/tegra/common.c: In function 'devm_tegra_core_dev_init_opp_table':
drivers/soc/tegra/common.c:123:14: error: implicit declaration of function 'devm_pm_opp_set_clkname'; did you mean 'dev_pm_opp_set_clkname'? [-Werror=implicit-function-declaration]
123 | opp_table = devm_pm_opp_set_clkname(dev, NULL);
| ^~~~~~~~~~~~~~~~~~~~~~~
| dev_pm_opp_set_clkname
>> drivers/soc/tegra/common.c:123:12: warning: assignment to 'struct opp_table *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
123 | opp_table = devm_pm_opp_set_clkname(dev, NULL);
| ^
drivers/soc/tegra/common.c:139:14: error: implicit declaration of function 'devm_pm_opp_set_supported_hw'; did you mean 'dev_pm_opp_set_supported_hw'? [-Werror=implicit-function-declaration]
139 | opp_table = devm_pm_opp_set_supported_hw(dev, &hw_version, 1);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
| dev_pm_opp_set_supported_hw
drivers/soc/tegra/common.c:139:12: warning: assignment to 'struct opp_table *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
139 | opp_table = devm_pm_opp_set_supported_hw(dev, &hw_version, 1);
| ^
drivers/soc/tegra/common.c:153:8: error: implicit declaration of function 'devm_pm_opp_of_add_table'; did you mean 'dev_pm_opp_of_add_table'? [-Werror=implicit-function-declaration]
153 | err = devm_pm_opp_of_add_table(dev);
| ^~~~~~~~~~~~~~~~~~~~~~~~
| dev_pm_opp_of_add_table
cc1: some warnings being treated as errors
vim +123 drivers/soc/tegra/common.c
105
106 /**
107 * devm_tegra_core_dev_init_opp_table() - initialize OPP table
108 * @dev: device for which OPP table is initialized
109 * @params: pointer to the OPP table configuration
110 *
111 * This function will initialize OPP table and sync OPP state of a Tegra SoC
112 * core device.
113 *
114 * Return: 0 on success or errorno.
115 */
116 int devm_tegra_core_dev_init_opp_table(struct device *dev,
117 struct tegra_core_opp_params *params)
118 {
119 struct opp_table *opp_table;
120 u32 hw_version;
121 int err;
122
> 123 opp_table = devm_pm_opp_set_clkname(dev, NULL);
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[RFC PATCH] icmp: icmp_identify_arrival_interface() can be static
by kernel test robot
Reported-by: kernel test robot <lkp(a)intel.com>
Signed-off-by: kernel test robot <lkp(a)intel.com>
---
icmp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c
index 8b63f2853e7b9..8cd003f5c8f59 100644
--- a/net/ipv4/icmp.c
+++ b/net/ipv4/icmp.c
@@ -586,8 +586,8 @@ static struct rtable *icmp_route_lookup(struct net *net,
* - ICMPv4 Parameter Problem
*/
-void icmp_identify_arrival_interface(struct sk_buff *skb, struct net *net, int room,
- struct icmphdr *icmph)
+static void icmp_identify_arrival_interface(struct sk_buff *skb, struct net *net, int room,
+ struct icmphdr *icmph)
{
unsigned int ext_len, if_index, orig_len, offset, extra_space_needed,
word_aligned_orig_len, mtu, name_len, name_subobj_len;
1 year, 6 months
Re: [PATCH] icmp: support rfc 5837
by kernel test robot
Hi ishaangandhi,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on net-next/master]
[also build test WARNING on net/master linus/master v5.12-rc2 next-20210311]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/ishaangandhi/icmp-support-rfc-58...
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 1520929e26d54bc3c9e024ee91eee5a19c56b95b
config: i386-randconfig-s002-20210311 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-262-g5e674421-dirty
# https://github.com/0day-ci/linux/commit/42e5e7501eafeda575f91db23d34172d7...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review ishaangandhi/icmp-support-rfc-5837/20210312-084955
git checkout 42e5e7501eafeda575f91db23d34172d720316ab
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
"sparse warnings: (new ones prefixed by >>)"
>> net/ipv4/icmp.c:589:6: sparse: sparse: symbol 'icmp_identify_arrival_interface' was not declared. Should it be static?
net/ipv4/icmp.c: note: in included file (through include/linux/spinlock.h, include/linux/mmzone.h, include/linux/gfp.h, ...):
include/linux/bottom_half.h:32:30: sparse: sparse: context imbalance in 'icmp_reply' - different lock contexts for basic block
include/linux/bottom_half.h:32:30: sparse: sparse: context imbalance in '__icmp_send' - different lock contexts for basic block
Please review and possibly fold the followup patch.
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
Re: [PATCH v17 1/3] i2c: core: support bus regulator controlling in adapter
by kernel test robot
Hi Hsin-Yi,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on wsa/i2c/for-next]
[also build test ERROR on v5.12-rc2 next-20210311]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Hsin-Yi-Wang/add-power-control-i...
base: https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/for-next
config: x86_64-randconfig-a014-20210311 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 574a9dabc63ba1e7a04c08d4bde2eacd61b44ce1)
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
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://github.com/0day-ci/linux/commit/876baed92f6916892b15bb879707eb439...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Hsin-Yi-Wang/add-power-control-in-i2c/20210309-213400
git checkout 876baed92f6916892b15bb879707eb43911626c9
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from drivers/gpu/drm/i915/i915_gem.c:1227:
>> drivers/gpu/drm/i915/selftests/i915_gem.c:97:13: error: conflicting types for 'pm_suspend'
static void pm_suspend(struct drm_i915_private *i915)
^
include/linux/suspend.h:345:19: note: previous definition is here
static inline int pm_suspend(suspend_state_t state) { return -ENOSYS; }
^
In file included from drivers/gpu/drm/i915/i915_gem.c:1227:
>> drivers/gpu/drm/i915/selftests/i915_gem.c:155:13: error: incompatible pointer to integer conversion passing 'struct drm_i915_private *' to parameter of type 'suspend_state_t' (aka 'int') [-Werror,-Wint-conversion]
pm_suspend(i915);
^~~~
include/linux/suspend.h:345:46: note: passing argument to parameter 'state' here
static inline int pm_suspend(suspend_state_t state) { return -ENOSYS; }
^
2 errors generated.
vim +/pm_suspend +97 drivers/gpu/drm/i915/selftests/i915_gem.c
3f51b7e1f36a37 Chris Wilson 2018-08-30 96
3f51b7e1f36a37 Chris Wilson 2018-08-30 @97 static void pm_suspend(struct drm_i915_private *i915)
3f51b7e1f36a37 Chris Wilson 2018-08-30 98 {
c9d08cc3e3393e Chris Wilson 2019-01-14 99 intel_wakeref_t wakeref;
c9d08cc3e3393e Chris Wilson 2019-01-14 100
c447ff7db34807 Daniele Ceraolo Spurio 2019-06-13 101 with_intel_runtime_pm(&i915->runtime_pm, wakeref) {
e986209c67024c Chris Wilson 2020-01-30 102 i915_ggtt_suspend(&i915->ggtt);
3f51b7e1f36a37 Chris Wilson 2018-08-30 103 i915_gem_suspend_late(i915);
d4225a535b3b08 Chris Wilson 2019-01-14 104 }
3f51b7e1f36a37 Chris Wilson 2018-08-30 105 }
3f51b7e1f36a37 Chris Wilson 2018-08-30 106
3f51b7e1f36a37 Chris Wilson 2018-08-30 107 static void pm_hibernate(struct drm_i915_private *i915)
3f51b7e1f36a37 Chris Wilson 2018-08-30 108 {
c9d08cc3e3393e Chris Wilson 2019-01-14 109 intel_wakeref_t wakeref;
c9d08cc3e3393e Chris Wilson 2019-01-14 110
c447ff7db34807 Daniele Ceraolo Spurio 2019-06-13 111 with_intel_runtime_pm(&i915->runtime_pm, wakeref) {
e986209c67024c Chris Wilson 2020-01-30 112 i915_ggtt_suspend(&i915->ggtt);
3f51b7e1f36a37 Chris Wilson 2018-08-30 113
3f51b7e1f36a37 Chris Wilson 2018-08-30 114 i915_gem_freeze(i915);
3f51b7e1f36a37 Chris Wilson 2018-08-30 115 i915_gem_freeze_late(i915);
d4225a535b3b08 Chris Wilson 2019-01-14 116 }
3f51b7e1f36a37 Chris Wilson 2018-08-30 117 }
3f51b7e1f36a37 Chris Wilson 2018-08-30 118
3f51b7e1f36a37 Chris Wilson 2018-08-30 119 static void pm_resume(struct drm_i915_private *i915)
3f51b7e1f36a37 Chris Wilson 2018-08-30 120 {
c9d08cc3e3393e Chris Wilson 2019-01-14 121 intel_wakeref_t wakeref;
c9d08cc3e3393e Chris Wilson 2019-01-14 122
3f51b7e1f36a37 Chris Wilson 2018-08-30 123 /*
3f51b7e1f36a37 Chris Wilson 2018-08-30 124 * Both suspend and hibernate follow the same wakeup path and assume
3f51b7e1f36a37 Chris Wilson 2018-08-30 125 * that runtime-pm just works.
3f51b7e1f36a37 Chris Wilson 2018-08-30 126 */
c447ff7db34807 Daniele Ceraolo Spurio 2019-06-13 127 with_intel_runtime_pm(&i915->runtime_pm, wakeref) {
e986209c67024c Chris Wilson 2020-01-30 128 i915_ggtt_resume(&i915->ggtt);
3f51b7e1f36a37 Chris Wilson 2018-08-30 129 i915_gem_resume(i915);
d4225a535b3b08 Chris Wilson 2019-01-14 130 }
3f51b7e1f36a37 Chris Wilson 2018-08-30 131 }
3f51b7e1f36a37 Chris Wilson 2018-08-30 132
3f51b7e1f36a37 Chris Wilson 2018-08-30 133 static int igt_gem_suspend(void *arg)
3f51b7e1f36a37 Chris Wilson 2018-08-30 134 {
3f51b7e1f36a37 Chris Wilson 2018-08-30 135 struct drm_i915_private *i915 = arg;
3f51b7e1f36a37 Chris Wilson 2018-08-30 136 struct i915_gem_context *ctx;
a8c9a7f52ec5a4 Chris Wilson 2019-11-07 137 struct file *file;
3f51b7e1f36a37 Chris Wilson 2018-08-30 138 int err;
3f51b7e1f36a37 Chris Wilson 2018-08-30 139
3f51b7e1f36a37 Chris Wilson 2018-08-30 140 file = mock_file(i915);
3f51b7e1f36a37 Chris Wilson 2018-08-30 141 if (IS_ERR(file))
3f51b7e1f36a37 Chris Wilson 2018-08-30 142 return PTR_ERR(file);
3f51b7e1f36a37 Chris Wilson 2018-08-30 143
3f51b7e1f36a37 Chris Wilson 2018-08-30 144 err = -ENOMEM;
3f51b7e1f36a37 Chris Wilson 2018-08-30 145 ctx = live_context(i915, file);
3f51b7e1f36a37 Chris Wilson 2018-08-30 146 if (!IS_ERR(ctx))
c31c9e82ee8ae0 Chris Wilson 2019-10-22 147 err = switch_to_context(ctx);
3f51b7e1f36a37 Chris Wilson 2018-08-30 148 if (err)
3f51b7e1f36a37 Chris Wilson 2018-08-30 149 goto out;
3f51b7e1f36a37 Chris Wilson 2018-08-30 150
3f51b7e1f36a37 Chris Wilson 2018-08-30 151 err = pm_prepare(i915);
3f51b7e1f36a37 Chris Wilson 2018-08-30 152 if (err)
3f51b7e1f36a37 Chris Wilson 2018-08-30 153 goto out;
3f51b7e1f36a37 Chris Wilson 2018-08-30 154
3f51b7e1f36a37 Chris Wilson 2018-08-30 @155 pm_suspend(i915);
3f51b7e1f36a37 Chris Wilson 2018-08-30 156
3f51b7e1f36a37 Chris Wilson 2018-08-30 157 /* Here be dragons! Note that with S3RST any S3 may become S4! */
3f51b7e1f36a37 Chris Wilson 2018-08-30 158 simulate_hibernate(i915);
3f51b7e1f36a37 Chris Wilson 2018-08-30 159
3f51b7e1f36a37 Chris Wilson 2018-08-30 160 pm_resume(i915);
3f51b7e1f36a37 Chris Wilson 2018-08-30 161
c31c9e82ee8ae0 Chris Wilson 2019-10-22 162 err = switch_to_context(ctx);
3f51b7e1f36a37 Chris Wilson 2018-08-30 163 out:
a8c9a7f52ec5a4 Chris Wilson 2019-11-07 164 fput(file);
3f51b7e1f36a37 Chris Wilson 2018-08-30 165 return err;
3f51b7e1f36a37 Chris Wilson 2018-08-30 166 }
3f51b7e1f36a37 Chris Wilson 2018-08-30 167
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
Re: [PATCH] icmp: support rfc 5837
by kernel test robot
Hi ishaangandhi,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on net-next/master]
[also build test WARNING on net/master linus/master sparc-next/master v5.12-rc2 next-20210311]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/ishaangandhi/icmp-support-rfc-58...
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 1520929e26d54bc3c9e024ee91eee5a19c56b95b
config: i386-randconfig-m021-20210311 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
smatch warnings:
net/ipv4/icmp.c:692 icmp_identify_arrival_interface() error: uninitialized symbol 'name'.
net/ipv4/icmp.c:693 icmp_identify_arrival_interface() error: uninitialized symbol 'name_subobj_len'.
net/ipv4/icmp.c:695 icmp_identify_arrival_interface() error: uninitialized symbol 'name_len'.
net/ipv4/icmp.c:704 icmp_identify_arrival_interface() error: uninitialized symbol 'mtu'.
vim +/name +692 net/ipv4/icmp.c
579
580 /* Appends interface identification object to ICMP packet to identify
581 * the interface on which the original datagram arrived, per RFC 5837.
582 *
583 * Should only be called on the following messages
584 * - ICMPv4 Time Exceeded
585 * - ICMPv4 Destination Unreachable
586 * - ICMPv4 Parameter Problem
587 */
588
589 void icmp_identify_arrival_interface(struct sk_buff *skb, struct net *net, int room,
590 struct icmphdr *icmph)
591 {
592 unsigned int ext_len, if_index, orig_len, offset, extra_space_needed,
593 word_aligned_orig_len, mtu, name_len, name_subobj_len;
594 struct interface_ipv4_addr_sub_obj ip_addr;
595 struct icmp_extobj_hdr *iio_hdr;
596 struct icmp_ext_hdr *ext_hdr;
597 struct net_device *dev;
598 void *subobj_offset;
599 char *name, ctype;
600
601 skb_linearize(skb);
602 if_index = inet_iif(skb);
603 orig_len = skb->len - skb_network_offset(skb);
604 word_aligned_orig_len = (orig_len + 3) & ~0x03;
605
606 // Original datagram length is measured in 32-bit words
607 icmph->un.reserved[1] = word_aligned_orig_len / 4;
608 ctype = ICMP_5837_ARRIVAL_ROLE_CTYPE;
609
610 ext_len = sizeof(struct icmp_ext_hdr) + sizeof(struct icmp_extobj_hdr);
611
612 // Always add if_index to the IIO
613 ext_len += 4;
614 ctype |= ICMP_5837_IF_INDEX_CTYPE;
615
616 dev = dev_get_by_index(net, if_index);
617 // Try to append IP address, name, and MTU
618 if (dev) {
619 ip_addr.addr = inet_select_addr(dev, 0, RT_SCOPE_UNIVERSE);
620 if (ip_addr.addr) {
621 ip_addr.afi = htons(1);
622 ip_addr.reserved = 0;
623 ctype |= ICMP_5837_IP_ADDR_CTYPE;
624 ext_len += 8;
625 }
626
627 name = dev->name;
628 if (name) {
629 name_len = strlen(name);
630 name_subobj_len = min_t(unsigned int, name_len, ICMP_5837_MAX_NAME_LEN) + 1;
631 name_subobj_len = (name_subobj_len + 3) & ~0x03;
632 ctype |= ICMP_5837_NAME_CTYPE;
633 ext_len += name_subobj_len;
634 }
635
636 mtu = dev->mtu;
637 if (mtu) {
638 ctype |= ICMP_5837_MTU_CTYPE;
639 ext_len += 4;
640 }
641 }
642
643 if (word_aligned_orig_len + ext_len > room) {
644 offset = room - ext_len;
645 extra_space_needed = room - orig_len;
646 } else if (orig_len < ICMP_5837_MIN_ORIG_LEN) {
647 // Original packet must be zero padded to 128 bytes
648 offset = ICMP_5837_MIN_ORIG_LEN;
649 extra_space_needed = offset + ext_len - orig_len;
650 } else {
651 // There is enough room to just add to the end of the packet
652 offset = word_aligned_orig_len;
653 extra_space_needed = ext_len;
654 }
655
656 if (skb_tailroom(skb) < extra_space_needed) {
657 if (pskb_expand_head(skb, 0, extra_space_needed - skb_tailroom(skb), GFP_ATOMIC))
658 return;
659 }
660
661 // Zero-pad from the end of the original message to the beginning of the header
662 if (orig_len < ICMP_5837_MIN_ORIG_LEN) {
663 // Original packet must be zero padded to 128 bytes
664 memset(skb_network_header(skb) + orig_len, 0, ICMP_5837_MIN_ORIG_LEN - orig_len);
665 } else {
666 // Just zero-pad so the original packet is aligned on a 4 byte boundary
667 memset(skb_network_header(skb) + orig_len, 0, word_aligned_orig_len - orig_len);
668 }
669
670 skb_put(skb, extra_space_needed);
671 ext_hdr = (struct icmp_ext_hdr *)(skb_network_header(skb) + offset);
672 iio_hdr = (struct icmp_extobj_hdr *)(ext_hdr + 1);
673 subobj_offset = (void *)(iio_hdr + 1);
674
675 ext_hdr->reserved1 = 0;
676 ext_hdr->reserved2 = 0;
677 ext_hdr->version = 2;
678 ext_hdr->checksum = 0;
679
680 iio_hdr->length = htons(ext_len - 4);
681 iio_hdr->class_num = 2;
682 iio_hdr->class_type = ctype;
683
684 *(__be32 *)subobj_offset = htonl(if_index);
685 subobj_offset += sizeof(__be32);
686
687 if (ip_addr.addr) {
688 *(struct interface_ipv4_addr_sub_obj *)subobj_offset = ip_addr;
689 subobj_offset += sizeof(ip_addr);
690 }
691
> 692 if (name) {
> 693 *(__u8 *)subobj_offset = name_subobj_len;
694 subobj_offset += sizeof(__u8);
> 695 if (name_len >= ICMP_5837_MAX_NAME_LEN) {
696 memcpy(subobj_offset, name, ICMP_5837_MAX_NAME_LEN);
697 } else {
698 memcpy(subobj_offset, name, name_len);
699 memset(subobj_offset + name_len, 0, name_subobj_len - name_len - 1);
700 }
701 subobj_offset += name_subobj_len - sizeof(__u8);
702 }
703
> 704 if (mtu) {
705 *(__be32 *)subobj_offset = htonl(mtu);
706 subobj_offset += sizeof(__be32);
707 }
708
709 ext_hdr->checksum =
710 csum_fold(skb_checksum(skb, skb_network_offset(skb) + offset, ext_len, 0));
711 }
712
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
Re: [PATCH] icmp: support rfc 5837
by kernel test robot
Hi ishaangandhi,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on net-next/master]
[also build test WARNING on net/master linus/master v5.12-rc2 next-20210311]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/ishaangandhi/icmp-support-rfc-58...
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 1520929e26d54bc3c9e024ee91eee5a19c56b95b
config: arc-randconfig-p002-20210312 (attached as .config)
compiler: arc-elf-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/42e5e7501eafeda575f91db23d34172d7...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review ishaangandhi/icmp-support-rfc-5837/20210312-084955
git checkout 42e5e7501eafeda575f91db23d34172d720316ab
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> net/ipv4/icmp.c:589:6: warning: no previous prototype for 'icmp_identify_arrival_interface' [-Wmissing-prototypes]
589 | void icmp_identify_arrival_interface(struct sk_buff *skb, struct net *net, int room,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"cppcheck warnings: (new ones prefixed by >>)"
>> net/ipv4/icmp.c:704:6: warning: Uninitialized variable: mtu [uninitvar]
if (mtu) {
^
>> net/ipv4/icmp.c:692:6: warning: Uninitialized variable: name [uninitvar]
if (name) {
^
vim +/icmp_identify_arrival_interface +589 net/ipv4/icmp.c
579
580 /* Appends interface identification object to ICMP packet to identify
581 * the interface on which the original datagram arrived, per RFC 5837.
582 *
583 * Should only be called on the following messages
584 * - ICMPv4 Time Exceeded
585 * - ICMPv4 Destination Unreachable
586 * - ICMPv4 Parameter Problem
587 */
588
> 589 void icmp_identify_arrival_interface(struct sk_buff *skb, struct net *net, int room,
590 struct icmphdr *icmph)
591 {
592 unsigned int ext_len, if_index, orig_len, offset, extra_space_needed,
593 word_aligned_orig_len, mtu, name_len, name_subobj_len;
594 struct interface_ipv4_addr_sub_obj ip_addr;
595 struct icmp_extobj_hdr *iio_hdr;
596 struct icmp_ext_hdr *ext_hdr;
597 struct net_device *dev;
598 void *subobj_offset;
599 char *name, ctype;
600
601 skb_linearize(skb);
602 if_index = inet_iif(skb);
603 orig_len = skb->len - skb_network_offset(skb);
604 word_aligned_orig_len = (orig_len + 3) & ~0x03;
605
606 // Original datagram length is measured in 32-bit words
607 icmph->un.reserved[1] = word_aligned_orig_len / 4;
608 ctype = ICMP_5837_ARRIVAL_ROLE_CTYPE;
609
610 ext_len = sizeof(struct icmp_ext_hdr) + sizeof(struct icmp_extobj_hdr);
611
612 // Always add if_index to the IIO
613 ext_len += 4;
614 ctype |= ICMP_5837_IF_INDEX_CTYPE;
615
616 dev = dev_get_by_index(net, if_index);
617 // Try to append IP address, name, and MTU
618 if (dev) {
619 ip_addr.addr = inet_select_addr(dev, 0, RT_SCOPE_UNIVERSE);
620 if (ip_addr.addr) {
621 ip_addr.afi = htons(1);
622 ip_addr.reserved = 0;
623 ctype |= ICMP_5837_IP_ADDR_CTYPE;
624 ext_len += 8;
625 }
626
627 name = dev->name;
628 if (name) {
629 name_len = strlen(name);
630 name_subobj_len = min_t(unsigned int, name_len, ICMP_5837_MAX_NAME_LEN) + 1;
631 name_subobj_len = (name_subobj_len + 3) & ~0x03;
632 ctype |= ICMP_5837_NAME_CTYPE;
633 ext_len += name_subobj_len;
634 }
635
636 mtu = dev->mtu;
637 if (mtu) {
638 ctype |= ICMP_5837_MTU_CTYPE;
639 ext_len += 4;
640 }
641 }
642
643 if (word_aligned_orig_len + ext_len > room) {
644 offset = room - ext_len;
645 extra_space_needed = room - orig_len;
646 } else if (orig_len < ICMP_5837_MIN_ORIG_LEN) {
647 // Original packet must be zero padded to 128 bytes
648 offset = ICMP_5837_MIN_ORIG_LEN;
649 extra_space_needed = offset + ext_len - orig_len;
650 } else {
651 // There is enough room to just add to the end of the packet
652 offset = word_aligned_orig_len;
653 extra_space_needed = ext_len;
654 }
655
656 if (skb_tailroom(skb) < extra_space_needed) {
657 if (pskb_expand_head(skb, 0, extra_space_needed - skb_tailroom(skb), GFP_ATOMIC))
658 return;
659 }
660
661 // Zero-pad from the end of the original message to the beginning of the header
662 if (orig_len < ICMP_5837_MIN_ORIG_LEN) {
663 // Original packet must be zero padded to 128 bytes
664 memset(skb_network_header(skb) + orig_len, 0, ICMP_5837_MIN_ORIG_LEN - orig_len);
665 } else {
666 // Just zero-pad so the original packet is aligned on a 4 byte boundary
667 memset(skb_network_header(skb) + orig_len, 0, word_aligned_orig_len - orig_len);
668 }
669
670 skb_put(skb, extra_space_needed);
671 ext_hdr = (struct icmp_ext_hdr *)(skb_network_header(skb) + offset);
672 iio_hdr = (struct icmp_extobj_hdr *)(ext_hdr + 1);
673 subobj_offset = (void *)(iio_hdr + 1);
674
675 ext_hdr->reserved1 = 0;
676 ext_hdr->reserved2 = 0;
677 ext_hdr->version = 2;
678 ext_hdr->checksum = 0;
679
680 iio_hdr->length = htons(ext_len - 4);
681 iio_hdr->class_num = 2;
682 iio_hdr->class_type = ctype;
683
684 *(__be32 *)subobj_offset = htonl(if_index);
685 subobj_offset += sizeof(__be32);
686
687 if (ip_addr.addr) {
688 *(struct interface_ipv4_addr_sub_obj *)subobj_offset = ip_addr;
689 subobj_offset += sizeof(ip_addr);
690 }
691
> 692 if (name) {
693 *(__u8 *)subobj_offset = name_subobj_len;
694 subobj_offset += sizeof(__u8);
695 if (name_len >= ICMP_5837_MAX_NAME_LEN) {
696 memcpy(subobj_offset, name, ICMP_5837_MAX_NAME_LEN);
697 } else {
698 memcpy(subobj_offset, name, name_len);
699 memset(subobj_offset + name_len, 0, name_subobj_len - name_len - 1);
700 }
701 subobj_offset += name_subobj_len - sizeof(__u8);
702 }
703
> 704 if (mtu) {
705 *(__be32 *)subobj_offset = htonl(mtu);
706 subobj_offset += sizeof(__be32);
707 }
708
709 ext_hdr->checksum =
710 csum_fold(skb_checksum(skb, skb_network_offset(skb) + offset, ext_len, 0));
711 }
712
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[leon-rdma:rdma-next 10/42] drivers/infiniband/hw/mlx5/mr.c:1950 mlx5_ib_dereg_mr() error: uninitialized symbol 'rc'.
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/leon/linux-rdma.git rdma-next
head: 05f9b877d9328976740745c6f5451a83685920d6
commit: 715d68e63629aeb000669233275289f98f1e3cc6 [10/42] RDMA/mlx5: Consolidate MR destruction to mlx5_ib_dereg_mr()
config: arc-randconfig-m031-20210311 (attached as .config)
compiler: arceb-elf-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
New smatch warnings:
drivers/infiniband/hw/mlx5/mr.c:1950 mlx5_ib_dereg_mr() error: uninitialized symbol 'rc'.
Old smatch warnings:
arch/arc/include/asm/thread_info.h:65 current_thread_info() error: uninitialized symbol 'sp'.
vim +/rc +1950 drivers/infiniband/hw/mlx5/mr.c
1921
1922 int mlx5_ib_dereg_mr(struct ib_mr *ibmr, struct ib_udata *udata)
1923 {
1924 struct mlx5_ib_mr *mr = to_mmr(ibmr);
1925 struct mlx5_ib_dev *dev = to_mdev(ibmr->device);
1926 int rc;
1927
1928 /*
1929 * Any async use of the mr must hold the refcount, once the refcount
1930 * goes to zero no other thread, such as ODP page faults, prefetch, any
1931 * UMR activity, etc can touch the mkey. Thus it is safe to destroy it.
1932 */
1933 if (IS_ENABLED(CONFIG_INFINIBAND_ON_DEMAND_PAGING) &&
1934 refcount_read(&mr->mmkey.usecount) != 0 &&
1935 xa_erase(&mr_to_mdev(mr)->odp_mkeys, mlx5_base_mkey(mr->mmkey.key)))
1936 mlx5r_deref_wait_odp_mkey(&mr->mmkey);
1937
1938 if (ibmr->type == IB_MR_TYPE_INTEGRITY) {
1939 xa_cmpxchg(&dev->sig_mrs, mlx5_base_mkey(mr->mmkey.key), ibmr,
1940 NULL, GFP_KERNEL);
1941
1942 if (mr->mtt_mr) {
1943 rc = mlx5_ib_dereg_mr(&mr->mtt_mr->ibmr, NULL);
1944 if (rc)
1945 return rc;
1946 mr->mtt_mr = NULL;
1947 }
1948 if (mr->klm_mr) {
1949 mlx5_ib_dereg_mr(&mr->klm_mr->ibmr, NULL);
> 1950 if (rc)
1951 return rc;
1952 mr->klm_mr = NULL;
1953 }
1954
1955 if (mlx5_core_destroy_psv(dev->mdev,
1956 mr->sig->psv_memory.psv_idx))
1957 mlx5_ib_warn(dev, "failed to destroy mem psv %d\n",
1958 mr->sig->psv_memory.psv_idx);
1959 if (mlx5_core_destroy_psv(dev->mdev, mr->sig->psv_wire.psv_idx))
1960 mlx5_ib_warn(dev, "failed to destroy wire psv %d\n",
1961 mr->sig->psv_wire.psv_idx);
1962 kfree(mr->sig);
1963 mr->sig = NULL;
1964 }
1965
1966 /* Stop DMA */
1967 if (mr->cache_ent) {
1968 if (mlx5_mr_cache_invalidate(mr)) {
1969 spin_lock_irq(&mr->cache_ent->lock);
1970 mr->cache_ent->total_mrs--;
1971 spin_unlock_irq(&mr->cache_ent->lock);
1972 mr->cache_ent = NULL;
1973 }
1974 }
1975 if (!mr->cache_ent) {
1976 rc = destroy_mkey(to_mdev(mr->ibmr.device), mr);
1977 if (rc)
1978 return rc;
1979 }
1980
1981 if (mr->umem) {
1982 bool is_odp = is_odp_mr(mr);
1983
1984 if (!is_odp)
1985 atomic_sub(ib_umem_num_pages(mr->umem),
1986 &dev->mdev->priv.reg_pages);
1987 ib_umem_release(mr->umem);
1988 if (is_odp)
1989 mlx5_ib_free_odp_mr(mr);
1990 }
1991
1992 if (mr->cache_ent) {
1993 mlx5_mr_cache_free(dev, mr);
1994 } else {
1995 mlx5_free_priv_descs(mr);
1996 kfree(mr);
1997 }
1998 return 0;
1999 }
2000
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months