From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: Re: [RFC net-next] openvswitch: Introduce per-cpu upcall dispatch
Date: Sat, 01 May 2021 03:29:50 +0800 [thread overview]
Message-ID: <202105010345.uQHQSKqP-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 3054 bytes --]
CC: kbuild-all(a)lists.01.org
In-Reply-To: <20210430153325.28322-1-mark.d.gray@redhat.com>
References: <20210430153325.28322-1-mark.d.gray@redhat.com>
TO: Mark Gray <mark.d.gray@redhat.com>
Hi Mark,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on net-next/master]
url: https://github.com/0day-ci/linux/commits/Mark-Gray/openvswitch-Introduce-per-cpu-upcall-dispatch/20210430-233534
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 4a52dd8fefb45626dace70a63c0738dbd83b7edb
:::::: branch date: 4 hours ago
:::::: commit date: 4 hours ago
config: i386-randconfig-m021-20210430 (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@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
net/openvswitch/datapath.c:1612 ovs_dp_set_upcall_portids() warn: variable dereferenced before check 'dp' (see line 1608)
net/openvswitch/datapath.c:1613 ovs_dp_set_upcall_portids() warn: possible memory leak of 'dp_portids'
vim +/dp +1612 net/openvswitch/datapath.c
95a7233c452a58 Paul Blakey 2019-09-04 1599
96349cd061e4c2 Mark Gray 2021-04-30 1600 static int ovs_dp_set_upcall_portids(struct datapath *dp,
96349cd061e4c2 Mark Gray 2021-04-30 1601 const struct nlattr *ids)
96349cd061e4c2 Mark Gray 2021-04-30 1602 {
96349cd061e4c2 Mark Gray 2021-04-30 1603 struct dp_portids *old, *dp_portids;
96349cd061e4c2 Mark Gray 2021-04-30 1604
96349cd061e4c2 Mark Gray 2021-04-30 1605 if (!nla_len(ids) || nla_len(ids) % sizeof(u32))
96349cd061e4c2 Mark Gray 2021-04-30 1606 return -EINVAL;
96349cd061e4c2 Mark Gray 2021-04-30 1607
96349cd061e4c2 Mark Gray 2021-04-30 @1608 old = ovsl_dereference(dp->upcall_portids);
96349cd061e4c2 Mark Gray 2021-04-30 1609
96349cd061e4c2 Mark Gray 2021-04-30 1610 dp_portids = kmalloc(sizeof(*dp_portids) + nla_len(ids),
96349cd061e4c2 Mark Gray 2021-04-30 1611 GFP_KERNEL);
96349cd061e4c2 Mark Gray 2021-04-30 @1612 if (!dp)
96349cd061e4c2 Mark Gray 2021-04-30 @1613 return -ENOMEM;
96349cd061e4c2 Mark Gray 2021-04-30 1614
96349cd061e4c2 Mark Gray 2021-04-30 1615 dp_portids->n_ids = nla_len(ids) / sizeof(u32);
96349cd061e4c2 Mark Gray 2021-04-30 1616 nla_memcpy(dp_portids->ids, ids, nla_len(ids));
96349cd061e4c2 Mark Gray 2021-04-30 1617
96349cd061e4c2 Mark Gray 2021-04-30 1618 rcu_assign_pointer(dp->upcall_portids, dp_portids);
96349cd061e4c2 Mark Gray 2021-04-30 1619
96349cd061e4c2 Mark Gray 2021-04-30 1620 if (old)
96349cd061e4c2 Mark Gray 2021-04-30 1621 kfree_rcu(old, rcu);
96349cd061e4c2 Mark Gray 2021-04-30 1622 return 0;
96349cd061e4c2 Mark Gray 2021-04-30 1623 }
96349cd061e4c2 Mark Gray 2021-04-30 1624
---
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: 30829 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild-all@lists.01.org
Subject: Re: [RFC net-next] openvswitch: Introduce per-cpu upcall dispatch
Date: Mon, 03 May 2021 12:19:01 +0300 [thread overview]
Message-ID: <202105010345.uQHQSKqP-lkp@intel.com> (raw)
In-Reply-To: <20210430153325.28322-1-mark.d.gray@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 2696 bytes --]
Hi Mark,
url: https://github.com/0day-ci/linux/commits/Mark-Gray/openvswitch-Introduce-per-cpu-upcall-dispatch/20210430-233534
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 4a52dd8fefb45626dace70a63c0738dbd83b7edb
config: i386-randconfig-m021-20210430 (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@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
net/openvswitch/datapath.c:1612 ovs_dp_set_upcall_portids() warn: variable dereferenced before check 'dp' (see line 1608)
net/openvswitch/datapath.c:1613 ovs_dp_set_upcall_portids() warn: possible memory leak of 'dp_portids'
vim +/dp +1612 net/openvswitch/datapath.c
96349cd061e4c2 Mark Gray 2021-04-30 1600 static int ovs_dp_set_upcall_portids(struct datapath *dp,
96349cd061e4c2 Mark Gray 2021-04-30 1601 const struct nlattr *ids)
96349cd061e4c2 Mark Gray 2021-04-30 1602 {
96349cd061e4c2 Mark Gray 2021-04-30 1603 struct dp_portids *old, *dp_portids;
96349cd061e4c2 Mark Gray 2021-04-30 1604
96349cd061e4c2 Mark Gray 2021-04-30 1605 if (!nla_len(ids) || nla_len(ids) % sizeof(u32))
96349cd061e4c2 Mark Gray 2021-04-30 1606 return -EINVAL;
96349cd061e4c2 Mark Gray 2021-04-30 1607
96349cd061e4c2 Mark Gray 2021-04-30 @1608 old = ovsl_dereference(dp->upcall_portids);
96349cd061e4c2 Mark Gray 2021-04-30 1609
96349cd061e4c2 Mark Gray 2021-04-30 1610 dp_portids = kmalloc(sizeof(*dp_portids) + nla_len(ids),
96349cd061e4c2 Mark Gray 2021-04-30 1611 GFP_KERNEL);
96349cd061e4c2 Mark Gray 2021-04-30 @1612 if (!dp)
^^
This should have been "if (!dp_portids)"
96349cd061e4c2 Mark Gray 2021-04-30 @1613 return -ENOMEM;
96349cd061e4c2 Mark Gray 2021-04-30 1614
96349cd061e4c2 Mark Gray 2021-04-30 1615 dp_portids->n_ids = nla_len(ids) / sizeof(u32);
96349cd061e4c2 Mark Gray 2021-04-30 1616 nla_memcpy(dp_portids->ids, ids, nla_len(ids));
96349cd061e4c2 Mark Gray 2021-04-30 1617
96349cd061e4c2 Mark Gray 2021-04-30 1618 rcu_assign_pointer(dp->upcall_portids, dp_portids);
96349cd061e4c2 Mark Gray 2021-04-30 1619
96349cd061e4c2 Mark Gray 2021-04-30 1620 if (old)
96349cd061e4c2 Mark Gray 2021-04-30 1621 kfree_rcu(old, rcu);
96349cd061e4c2 Mark Gray 2021-04-30 1622 return 0;
96349cd061e4c2 Mark Gray 2021-04-30 1623 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
next reply other threads:[~2021-04-30 19:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-30 19:29 kernel test robot [this message]
2021-05-03 9:19 ` [RFC net-next] openvswitch: Introduce per-cpu upcall dispatch Dan Carpenter
2021-06-30 9:43 ` Mark Gray
-- strict thread matches above, loose matches on Subject: below --
2021-04-30 15:33 Mark Gray
2021-05-19 21:47 ` Pravin Shelar
2021-06-30 9:44 ` Mark Gray
2021-05-28 19:49 ` [ovs-dev] " Flavio Leitner
2021-06-30 9:44 ` Mark Gray
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=202105010345.uQHQSKqP-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild@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.