* [linux-next:master 1658/2290] net/core/gro.c:400:2: warning: Null pointer passed as 2nd argument to memory copy function [clang-analyzer-unix.cstring.NullArg]
@ 2021-11-21 9:29 kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-11-21 9:29 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 14073 bytes --]
CC: llvm(a)lists.linux.dev
CC: kbuild-all(a)lists.01.org
CC: Linux Memory Management List <linux-mm@kvack.org>
TO: Eric Dumazet <edumazet@google.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 5191249f880367a4cd675825cd721a8d78f26a45
commit: 587652bbdd06ab38a4c1b85e40f933d2cf4a1147 [1658/2290] net: gro: populate net/core/gro.c
:::::: branch date: 3 days ago
:::::: commit date: 5 days ago
config: i386-randconfig-c001-20211118 (attached as .config)
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://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=587652bbdd06ab38a4c1b85e40f933d2cf4a1147
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout 587652bbdd06ab38a4c1b85e40f933d2cf4a1147
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=i386 clang-analyzer
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
clang-analyzer warnings: (new ones prefixed by >>)
include/linux/string.h:237:2: note: Null pointer passed as 1st argument to memory set function
memset(s, 0, count);
^
arch/x86/include/asm/string_32.h:228:29: note: expanded from macro 'memset'
#define memset(s, c, count) __builtin_memset(s, c, count)
^ ~
Suppressed 5 warnings (5 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
4 warnings generated.
Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
8 warnings generated.
Suppressed 8 warnings (8 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
8 warnings generated.
Suppressed 8 warnings (8 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
10 warnings generated.
include/net/dst_metadata.h:74:18: warning: Access to field 'type' results in a dereference of a null pointer (loaded from variable 'a') [clang-analyzer-core.NullDereference]
if (!a != !b || a->type != b->type)
^
net/core/gro.c:735:37: note: Calling 'dev_gro_receive'
ret = napi_frags_finish(napi, skb, dev_gro_receive(napi, skb));
^~~~~~~~~~~~~~~~~~~~~~~~~~
net/core/gro.c:446:2: note: Taking false branch
if (netif_elide_gro(skb->dev))
^
net/core/gro.c:449:2: note: Calling 'gro_list_prepare'
gro_list_prepare(&gro_list->list, skb);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
net/core/gro.c:323:2: note: Loop condition is true. Entering loop body
list_for_each_entry(p, head, list) {
^
include/linux/list.h:630:2: note: expanded from macro 'list_for_each_entry'
for (pos = list_first_entry(head, typeof(*pos), member); \
^
net/core/gro.c:328:7: note: Assuming the condition is false
if (hash != skb_get_hash_raw(p)) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~
net/core/gro.c:328:3: note: Taking false branch
if (hash != skb_get_hash_raw(p)) {
^
net/core/gro.c:335:7: note: Assuming field 'vlan_present' is 0
if (skb_vlan_tag_present(p))
^
include/linux/if_vlan.h:77:37: note: expanded from macro 'skb_vlan_tag_present'
#define skb_vlan_tag_present(__skb) ((__skb)->vlan_present)
^~~~~~~~~~~~~~~~~~~~~~~
net/core/gro.c:335:3: note: Taking false branch
if (skb_vlan_tag_present(p))
^
net/core/gro.c:338:7: note: Assuming 'maclen' is equal to ETH_HLEN
if (maclen == ETH_HLEN)
^~~~~~~~~~~~~~~~~~
net/core/gro.c:338:3: note: Taking true branch
if (maclen == ETH_HLEN)
^
net/core/gro.c:351:7: note: Assuming 'diffs' is 0
if (!diffs && unlikely(skb->slow_gro | p->slow_gro)) {
^~~~~~
net/core/gro.c:351:7: note: Left side of '&&' is true
net/core/gro.c:351:17: note: Assuming the condition is false
if (!diffs && unlikely(skb->slow_gro | p->slow_gro)) {
^
include/linux/compiler.h:78:40: note: expanded from macro 'unlikely'
# define unlikely(x) __builtin_expect(!!(x), 0)
^~~~
net/core/gro.c:351:3: note: Taking true branch
if (!diffs && unlikely(skb->slow_gro | p->slow_gro)) {
^
net/core/gro.c:357:13: note: Assuming 'p->sk' is not equal to 'skb->sk'
diffs |= p->sk != skb->sk;
^~~~~~~~~~~~~~~~
net/core/gro.c:358:13: note: Calling 'skb_metadata_dst_cmp'
diffs |= skb_metadata_dst_cmp(p, skb);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/net/dst_metadata.h:68:6: note: Assuming the condition is false
if (!(skb_a->_skb_refdst | skb_b->_skb_refdst))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/net/dst_metadata.h:68:2: note: Taking false branch
if (!(skb_a->_skb_refdst | skb_b->_skb_refdst))
^
include/net/dst_metadata.h:71:2: note: Value assigned to 'a'
a = (const struct metadata_dst *) skb_dst(skb_a);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/net/dst_metadata.h:74:6: note: Assuming 'a' is null
if (!a != !b || a->type != b->type)
^~
include/net/dst_metadata.h:74:6: note: Assuming pointer value is null
if (!a != !b || a->type != b->type)
^~
include/net/dst_metadata.h:74:12: note: Assuming 'b' is null
if (!a != !b || a->type != b->type)
^~
include/net/dst_metadata.h:74:6: note: Left side of '||' is false
if (!a != !b || a->type != b->type)
^
include/net/dst_metadata.h:74:18: note: Access to field 'type' results in a dereference of a null pointer (loaded from variable 'a')
if (!a != !b || a->type != b->type)
^
>> net/core/gro.c:400:2: warning: Null pointer passed as 2nd argument to memory copy function [clang-analyzer-unix.cstring.NullArg]
memcpy(skb_tail_pointer(skb), NAPI_GRO_CB(skb)->frag0, grow);
^
arch/x86/include/asm/string_32.h:182:25: note: expanded from macro 'memcpy'
#define memcpy(t, f, n) __builtin_memcpy(t, f, n)
^
net/core/gro.c:731:24: note: Calling 'napi_frags_skb'
struct sk_buff *skb = napi_frags_skb(napi);
^~~~~~~~~~~~~~~~~~~~
net/core/gro.c:702:15: note: Calling 'skb_gro_header_hard'
if (unlikely(skb_gro_header_hard(skb, hlen))) {
^
include/linux/compiler.h:78:42: note: expanded from macro 'unlikely'
# define unlikely(x) __builtin_expect(!!(x), 0)
^
net/core/gro.c:702:15: note: Returning from 'skb_gro_header_hard'
if (unlikely(skb_gro_header_hard(skb, hlen))) {
^
include/linux/compiler.h:78:42: note: expanded from macro 'unlikely'
# define unlikely(x) __builtin_expect(!!(x), 0)
^
net/core/gro.c:702:2: note: Taking true branch
if (unlikely(skb_gro_header_hard(skb, hlen))) {
^
net/core/gro.c:703:9: note: Calling 'skb_gro_header_slow'
eth = skb_gro_header_slow(skb, hlen, 0);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/net/gro.h:150:7: note: Calling 'pskb_may_pull'
if (!pskb_may_pull(skb, hlen))
^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/skbuff.h:2395:13: note: Assuming the condition is true
if (likely(len <= skb_headlen(skb)))
^
include/linux/compiler.h:77:40: note: expanded from macro 'likely'
# define likely(x) __builtin_expect(!!(x), 1)
^
include/linux/skbuff.h:2395:2: note: Taking true branch
if (likely(len <= skb_headlen(skb)))
^
include/net/gro.h:150:7: note: Returning from 'pskb_may_pull'
if (!pskb_may_pull(skb, hlen))
^~~~~~~~~~~~~~~~~~~~~~~~
include/net/gro.h:150:2: note: Taking false branch
if (!pskb_may_pull(skb, hlen))
^
include/net/gro.h:153:2: note: Calling 'skb_gro_frag0_invalidate'
skb_gro_frag0_invalidate(skb);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/net/gro.h:143:2: note: Null pointer value stored to field 'frag0'
NAPI_GRO_CB(skb)->frag0 = NULL;
^
include/net/gro.h:79:26: note: expanded from macro 'NAPI_GRO_CB'
#define NAPI_GRO_CB(skb) ((struct napi_gro_cb *)(skb)->cb)
^
include/net/gro.h:153:2: note: Returning from 'skb_gro_frag0_invalidate'
skb_gro_frag0_invalidate(skb);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
net/core/gro.c:703:9: note: Returning from 'skb_gro_header_slow'
eth = skb_gro_header_slow(skb, hlen, 0);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
net/core/gro.c:704:16: note: Assuming 'eth' is non-null
if (unlikely(!eth)) {
^
include/linux/compiler.h:78:42: note: expanded from macro 'unlikely'
# define unlikely(x) __builtin_expect(!!(x), 0)
^
net/core/gro.c:704:3: note: Taking false branch
if (unlikely(!eth)) {
^
net/core/gro.c:716:2: note: Calling '__skb_pull'
__skb_pull(skb, hlen);
^~~~~~~~~~~~~~~~~~~~~
include/linux/skbuff.h:2368:9: note: Assuming field 'len' is >= field 'data_len'
BUG_ON(skb->len < skb->data_len);
^
include/asm-generic/bug.h:65:45: note: expanded from macro 'BUG_ON'
#define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
^~~~~~~~~
include/linux/compiler.h:78:42: note: expanded from macro 'unlikely'
# define unlikely(x) __builtin_expect(!!(x), 0)
^
include/linux/skbuff.h:2368:2: note: Taking false branch
BUG_ON(skb->len < skb->data_len);
^
include/asm-generic/bug.h:65:32: note: expanded from macro 'BUG_ON'
#define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
^
include/linux/skbuff.h:2368:2: note: Loop condition is false. Exiting loop
BUG_ON(skb->len < skb->data_len);
^
include/asm-generic/bug.h:65:27: note: expanded from macro 'BUG_ON'
#define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
^
net/core/gro.c:716:2: note: Returning from '__skb_pull'
__skb_pull(skb, hlen);
^~~~~~~~~~~~~~~~~~~~~
net/core/gro.c:731:24: note: Returning from 'napi_frags_skb'
struct sk_buff *skb = napi_frags_skb(napi);
^~~~~~~~~~~~~~~~~~~~
net/core/gro.c:735:37: note: Calling 'dev_gro_receive'
ret = napi_frags_finish(napi, skb, dev_gro_receive(napi, skb));
vim +400 net/core/gro.c
587652bbdd06ab Eric Dumazet 2021-11-15 393
587652bbdd06ab Eric Dumazet 2021-11-15 394 static void gro_pull_from_frag0(struct sk_buff *skb, int grow)
587652bbdd06ab Eric Dumazet 2021-11-15 395 {
587652bbdd06ab Eric Dumazet 2021-11-15 396 struct skb_shared_info *pinfo = skb_shinfo(skb);
587652bbdd06ab Eric Dumazet 2021-11-15 397
587652bbdd06ab Eric Dumazet 2021-11-15 398 BUG_ON(skb->end - skb->tail < grow);
587652bbdd06ab Eric Dumazet 2021-11-15 399
587652bbdd06ab Eric Dumazet 2021-11-15 @400 memcpy(skb_tail_pointer(skb), NAPI_GRO_CB(skb)->frag0, grow);
587652bbdd06ab Eric Dumazet 2021-11-15 401
587652bbdd06ab Eric Dumazet 2021-11-15 402 skb->data_len -= grow;
587652bbdd06ab Eric Dumazet 2021-11-15 403 skb->tail += grow;
587652bbdd06ab Eric Dumazet 2021-11-15 404
587652bbdd06ab Eric Dumazet 2021-11-15 405 skb_frag_off_add(&pinfo->frags[0], grow);
587652bbdd06ab Eric Dumazet 2021-11-15 406 skb_frag_size_sub(&pinfo->frags[0], grow);
587652bbdd06ab Eric Dumazet 2021-11-15 407
587652bbdd06ab Eric Dumazet 2021-11-15 408 if (unlikely(!skb_frag_size(&pinfo->frags[0]))) {
587652bbdd06ab Eric Dumazet 2021-11-15 409 skb_frag_unref(skb, 0);
587652bbdd06ab Eric Dumazet 2021-11-15 410 memmove(pinfo->frags, pinfo->frags + 1,
587652bbdd06ab Eric Dumazet 2021-11-15 411 --pinfo->nr_frags * sizeof(pinfo->frags[0]));
587652bbdd06ab Eric Dumazet 2021-11-15 412 }
587652bbdd06ab Eric Dumazet 2021-11-15 413 }
587652bbdd06ab Eric Dumazet 2021-11-15 414
---
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: 31994 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* [linux-next:master 1658/2290] net/core/gro.c:400:2: warning: Null pointer passed as 2nd argument to memory copy function [clang-analyzer-unix.cstring.NullArg]
@ 2021-11-20 9:56 kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-11-20 9:56 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 14162 bytes --]
CC: llvm(a)lists.linux.dev
CC: kbuild-all(a)lists.01.org
CC: Linux Memory Management List <linux-mm@kvack.org>
TO: Eric Dumazet <edumazet@google.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 5191249f880367a4cd675825cd721a8d78f26a45
commit: 587652bbdd06ab38a4c1b85e40f933d2cf4a1147 [1658/2290] net: gro: populate net/core/gro.c
:::::: branch date: 2 days ago
:::::: commit date: 4 days ago
config: i386-randconfig-c001-20211118 (attached as .config)
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://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=587652bbdd06ab38a4c1b85e40f933d2cf4a1147
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout 587652bbdd06ab38a4c1b85e40f933d2cf4a1147
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=i386 clang-analyzer
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
clang-analyzer warnings: (new ones prefixed by >>)
Suppressed 8 warnings (8 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
8 warnings generated.
Suppressed 8 warnings (8 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
8 warnings generated.
Suppressed 8 warnings (8 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
8 warnings generated.
Suppressed 8 warnings (8 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
8 warnings generated.
Suppressed 8 warnings (8 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
8 warnings generated.
Suppressed 8 warnings (8 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
10 warnings generated.
include/net/dst_metadata.h:74:18: warning: Access to field 'type' results in a dereference of a null pointer (loaded from variable 'a') [clang-analyzer-core.NullDereference]
if (!a != !b || a->type != b->type)
^
net/core/gro.c:735:37: note: Calling 'dev_gro_receive'
ret = napi_frags_finish(napi, skb, dev_gro_receive(napi, skb));
^~~~~~~~~~~~~~~~~~~~~~~~~~
net/core/gro.c:446:2: note: Taking false branch
if (netif_elide_gro(skb->dev))
^
net/core/gro.c:449:2: note: Calling 'gro_list_prepare'
gro_list_prepare(&gro_list->list, skb);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
net/core/gro.c:323:2: note: Loop condition is true. Entering loop body
list_for_each_entry(p, head, list) {
^
include/linux/list.h:630:2: note: expanded from macro 'list_for_each_entry'
for (pos = list_first_entry(head, typeof(*pos), member); \
^
net/core/gro.c:328:7: note: Assuming the condition is false
if (hash != skb_get_hash_raw(p)) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~
net/core/gro.c:328:3: note: Taking false branch
if (hash != skb_get_hash_raw(p)) {
^
net/core/gro.c:335:7: note: Assuming field 'vlan_present' is 0
if (skb_vlan_tag_present(p))
^
include/linux/if_vlan.h:77:37: note: expanded from macro 'skb_vlan_tag_present'
#define skb_vlan_tag_present(__skb) ((__skb)->vlan_present)
^~~~~~~~~~~~~~~~~~~~~~~
net/core/gro.c:335:3: note: Taking false branch
if (skb_vlan_tag_present(p))
^
net/core/gro.c:338:7: note: Assuming 'maclen' is equal to ETH_HLEN
if (maclen == ETH_HLEN)
^~~~~~~~~~~~~~~~~~
net/core/gro.c:338:3: note: Taking true branch
if (maclen == ETH_HLEN)
^
net/core/gro.c:351:7: note: Assuming 'diffs' is 0
if (!diffs && unlikely(skb->slow_gro | p->slow_gro)) {
^~~~~~
net/core/gro.c:351:7: note: Left side of '&&' is true
net/core/gro.c:351:17: note: Assuming the condition is false
if (!diffs && unlikely(skb->slow_gro | p->slow_gro)) {
^
include/linux/compiler.h:78:40: note: expanded from macro 'unlikely'
# define unlikely(x) __builtin_expect(!!(x), 0)
^~~~
net/core/gro.c:351:3: note: Taking true branch
if (!diffs && unlikely(skb->slow_gro | p->slow_gro)) {
^
net/core/gro.c:357:13: note: Assuming 'p->sk' is not equal to 'skb->sk'
diffs |= p->sk != skb->sk;
^~~~~~~~~~~~~~~~
net/core/gro.c:358:13: note: Calling 'skb_metadata_dst_cmp'
diffs |= skb_metadata_dst_cmp(p, skb);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/net/dst_metadata.h:68:6: note: Assuming the condition is false
if (!(skb_a->_skb_refdst | skb_b->_skb_refdst))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/net/dst_metadata.h:68:2: note: Taking false branch
if (!(skb_a->_skb_refdst | skb_b->_skb_refdst))
^
include/net/dst_metadata.h:71:2: note: Value assigned to 'a'
a = (const struct metadata_dst *) skb_dst(skb_a);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/net/dst_metadata.h:74:6: note: Assuming 'a' is null
if (!a != !b || a->type != b->type)
^~
include/net/dst_metadata.h:74:6: note: Assuming pointer value is null
if (!a != !b || a->type != b->type)
^~
include/net/dst_metadata.h:74:12: note: Assuming 'b' is null
if (!a != !b || a->type != b->type)
^~
include/net/dst_metadata.h:74:6: note: Left side of '||' is false
if (!a != !b || a->type != b->type)
^
include/net/dst_metadata.h:74:18: note: Access to field 'type' results in a dereference of a null pointer (loaded from variable 'a')
if (!a != !b || a->type != b->type)
^
>> net/core/gro.c:400:2: warning: Null pointer passed as 2nd argument to memory copy function [clang-analyzer-unix.cstring.NullArg]
memcpy(skb_tail_pointer(skb), NAPI_GRO_CB(skb)->frag0, grow);
^
arch/x86/include/asm/string_32.h:182:25: note: expanded from macro 'memcpy'
#define memcpy(t, f, n) __builtin_memcpy(t, f, n)
^
net/core/gro.c:731:24: note: Calling 'napi_frags_skb'
struct sk_buff *skb = napi_frags_skb(napi);
^~~~~~~~~~~~~~~~~~~~
net/core/gro.c:702:15: note: Calling 'skb_gro_header_hard'
if (unlikely(skb_gro_header_hard(skb, hlen))) {
^
include/linux/compiler.h:78:42: note: expanded from macro 'unlikely'
# define unlikely(x) __builtin_expect(!!(x), 0)
^
net/core/gro.c:702:15: note: Returning from 'skb_gro_header_hard'
if (unlikely(skb_gro_header_hard(skb, hlen))) {
^
include/linux/compiler.h:78:42: note: expanded from macro 'unlikely'
# define unlikely(x) __builtin_expect(!!(x), 0)
^
net/core/gro.c:702:2: note: Taking true branch
if (unlikely(skb_gro_header_hard(skb, hlen))) {
^
net/core/gro.c:703:9: note: Calling 'skb_gro_header_slow'
eth = skb_gro_header_slow(skb, hlen, 0);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/net/gro.h:150:7: note: Calling 'pskb_may_pull'
if (!pskb_may_pull(skb, hlen))
^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/skbuff.h:2395:13: note: Assuming the condition is true
if (likely(len <= skb_headlen(skb)))
^
include/linux/compiler.h:77:40: note: expanded from macro 'likely'
# define likely(x) __builtin_expect(!!(x), 1)
^
include/linux/skbuff.h:2395:2: note: Taking true branch
if (likely(len <= skb_headlen(skb)))
^
include/net/gro.h:150:7: note: Returning from 'pskb_may_pull'
if (!pskb_may_pull(skb, hlen))
^~~~~~~~~~~~~~~~~~~~~~~~
include/net/gro.h:150:2: note: Taking false branch
if (!pskb_may_pull(skb, hlen))
^
include/net/gro.h:153:2: note: Calling 'skb_gro_frag0_invalidate'
skb_gro_frag0_invalidate(skb);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/net/gro.h:143:2: note: Null pointer value stored to field 'frag0'
NAPI_GRO_CB(skb)->frag0 = NULL;
^
include/net/gro.h:79:26: note: expanded from macro 'NAPI_GRO_CB'
#define NAPI_GRO_CB(skb) ((struct napi_gro_cb *)(skb)->cb)
^
include/net/gro.h:153:2: note: Returning from 'skb_gro_frag0_invalidate'
skb_gro_frag0_invalidate(skb);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
net/core/gro.c:703:9: note: Returning from 'skb_gro_header_slow'
eth = skb_gro_header_slow(skb, hlen, 0);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
net/core/gro.c:704:16: note: Assuming 'eth' is non-null
if (unlikely(!eth)) {
^
include/linux/compiler.h:78:42: note: expanded from macro 'unlikely'
# define unlikely(x) __builtin_expect(!!(x), 0)
^
net/core/gro.c:704:3: note: Taking false branch
if (unlikely(!eth)) {
^
net/core/gro.c:716:2: note: Calling '__skb_pull'
__skb_pull(skb, hlen);
^~~~~~~~~~~~~~~~~~~~~
include/linux/skbuff.h:2368:9: note: Assuming field 'len' is >= field 'data_len'
BUG_ON(skb->len < skb->data_len);
^
include/asm-generic/bug.h:65:45: note: expanded from macro 'BUG_ON'
#define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
^~~~~~~~~
include/linux/compiler.h:78:42: note: expanded from macro 'unlikely'
# define unlikely(x) __builtin_expect(!!(x), 0)
^
include/linux/skbuff.h:2368:2: note: Taking false branch
BUG_ON(skb->len < skb->data_len);
^
include/asm-generic/bug.h:65:32: note: expanded from macro 'BUG_ON'
#define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
^
include/linux/skbuff.h:2368:2: note: Loop condition is false. Exiting loop
BUG_ON(skb->len < skb->data_len);
^
include/asm-generic/bug.h:65:27: note: expanded from macro 'BUG_ON'
#define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
^
net/core/gro.c:716:2: note: Returning from '__skb_pull'
__skb_pull(skb, hlen);
^~~~~~~~~~~~~~~~~~~~~
net/core/gro.c:731:24: note: Returning from 'napi_frags_skb'
struct sk_buff *skb = napi_frags_skb(napi);
^~~~~~~~~~~~~~~~~~~~
net/core/gro.c:735:37: note: Calling 'dev_gro_receive'
ret = napi_frags_finish(napi, skb, dev_gro_receive(napi, skb));
vim +400 net/core/gro.c
587652bbdd06ab Eric Dumazet 2021-11-15 393
587652bbdd06ab Eric Dumazet 2021-11-15 394 static void gro_pull_from_frag0(struct sk_buff *skb, int grow)
587652bbdd06ab Eric Dumazet 2021-11-15 395 {
587652bbdd06ab Eric Dumazet 2021-11-15 396 struct skb_shared_info *pinfo = skb_shinfo(skb);
587652bbdd06ab Eric Dumazet 2021-11-15 397
587652bbdd06ab Eric Dumazet 2021-11-15 398 BUG_ON(skb->end - skb->tail < grow);
587652bbdd06ab Eric Dumazet 2021-11-15 399
587652bbdd06ab Eric Dumazet 2021-11-15 @400 memcpy(skb_tail_pointer(skb), NAPI_GRO_CB(skb)->frag0, grow);
587652bbdd06ab Eric Dumazet 2021-11-15 401
587652bbdd06ab Eric Dumazet 2021-11-15 402 skb->data_len -= grow;
587652bbdd06ab Eric Dumazet 2021-11-15 403 skb->tail += grow;
587652bbdd06ab Eric Dumazet 2021-11-15 404
587652bbdd06ab Eric Dumazet 2021-11-15 405 skb_frag_off_add(&pinfo->frags[0], grow);
587652bbdd06ab Eric Dumazet 2021-11-15 406 skb_frag_size_sub(&pinfo->frags[0], grow);
587652bbdd06ab Eric Dumazet 2021-11-15 407
587652bbdd06ab Eric Dumazet 2021-11-15 408 if (unlikely(!skb_frag_size(&pinfo->frags[0]))) {
587652bbdd06ab Eric Dumazet 2021-11-15 409 skb_frag_unref(skb, 0);
587652bbdd06ab Eric Dumazet 2021-11-15 410 memmove(pinfo->frags, pinfo->frags + 1,
587652bbdd06ab Eric Dumazet 2021-11-15 411 --pinfo->nr_frags * sizeof(pinfo->frags[0]));
587652bbdd06ab Eric Dumazet 2021-11-15 412 }
587652bbdd06ab Eric Dumazet 2021-11-15 413 }
587652bbdd06ab Eric Dumazet 2021-11-15 414
---
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: 31993 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-11-21 9:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-21 9:29 [linux-next:master 1658/2290] net/core/gro.c:400:2: warning: Null pointer passed as 2nd argument to memory copy function [clang-analyzer-unix.cstring.NullArg] kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2021-11-20 9:56 kernel test robot
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.