From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@lists.01.org,
Matt Bennett <matt.bennett@alliedtelesis.co.nz>,
netdev@vger.kernel.org
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>,
kbuild-all@lists.01.org, zbr@ioremap.net, ebiederm@xmission.com,
linux-kernel@vger.kernel.org,
Matt Bennett <matt.bennett@alliedtelesis.co.nz>
Subject: [kbuild] Re: [PATCH 5/5] connector: Create connector per namespace
Date: Thu, 2 Jul 2020 17:32:42 +0300 [thread overview]
Message-ID: <20200702143242.GS2571@kadam> (raw)
In-Reply-To: <20200702002635.8169-6-matt.bennett@alliedtelesis.co.nz>
[-- Attachment #1: Type: text/plain, Size: 5919 bytes --]
Hi Matt,
url: https://github.com/0day-ci/linux/commits/Matt-Bennett/RFC-connector-Add-network-namespace-awareness/20200702-083030
base: https://git.kernel.org/pub/scm/linux/kernel/git/horms/ipvs.git master
config: arm-randconfig-m031-20200701 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 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:
drivers/connector/connector.c:71 cn_netlink_send_mult() warn: impossible condition '(len < 0) => (0-u16max < 0)'
# https://github.com/0day-ci/linux/commit/32f49fbf9dcfe5c3bc100728f5b8b5f9c95757cb
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout 32f49fbf9dcfe5c3bc100728f5b8b5f9c95757cb
vim +71 drivers/connector/connector.c
e921441014422d Matt Bennett 2020-07-02 59 int cn_netlink_send_mult(struct net *net, struct cn_msg *msg, u16 len,
^^^^^^^
e921441014422d Matt Bennett 2020-07-02 60 u32 portid, u32 __group, gfp_t gfp_mask)
7672d0b5441137 Evgeniy Polyakov 2005-09-11 61 {
7672d0b5441137 Evgeniy Polyakov 2005-09-11 62 struct cn_callback_entry *__cbq;
7672d0b5441137 Evgeniy Polyakov 2005-09-11 63 unsigned int size;
7672d0b5441137 Evgeniy Polyakov 2005-09-11 64 struct sk_buff *skb;
7672d0b5441137 Evgeniy Polyakov 2005-09-11 65 struct nlmsghdr *nlh;
7672d0b5441137 Evgeniy Polyakov 2005-09-11 66 struct cn_msg *data;
32f49fbf9dcfe5 Matt Bennett 2020-07-02 67 struct cn_dev *dev = &(net->cdev);
7672d0b5441137 Evgeniy Polyakov 2005-09-11 68 u32 group = 0;
7672d0b5441137 Evgeniy Polyakov 2005-09-11 69 int found = 0;
7672d0b5441137 Evgeniy Polyakov 2005-09-11 70
32f49fbf9dcfe5 Matt Bennett 2020-07-02 @71 if (!msg || len < 0)
^^^^^^^
Unsigned can't be less than zero.
32f49fbf9dcfe5 Matt Bennett 2020-07-02 72 return -EINVAL;
32f49fbf9dcfe5 Matt Bennett 2020-07-02 73
ac8f73305eea8a David Fries 2014-01-15 74 if (portid || __group) {
ac8f73305eea8a David Fries 2014-01-15 75 group = __group;
ac8f73305eea8a David Fries 2014-01-15 76 } else {
7672d0b5441137 Evgeniy Polyakov 2005-09-11 77 spin_lock_bh(&dev->cbdev->queue_lock);
7672d0b5441137 Evgeniy Polyakov 2005-09-11 78 list_for_each_entry(__cbq, &dev->cbdev->queue_list,
7672d0b5441137 Evgeniy Polyakov 2005-09-11 79 callback_entry) {
acd042bb2de50d Evgeniy Polyakov 2005-09-26 80 if (cn_cb_equal(&__cbq->id.id, &msg->id)) {
7672d0b5441137 Evgeniy Polyakov 2005-09-11 81 found = 1;
7672d0b5441137 Evgeniy Polyakov 2005-09-11 82 group = __cbq->group;
fd00eeccd92b7b Li Zefan 2008-01-04 83 break;
7672d0b5441137 Evgeniy Polyakov 2005-09-11 84 }
7672d0b5441137 Evgeniy Polyakov 2005-09-11 85 }
7672d0b5441137 Evgeniy Polyakov 2005-09-11 86 spin_unlock_bh(&dev->cbdev->queue_lock);
7672d0b5441137 Evgeniy Polyakov 2005-09-11 87
7672d0b5441137 Evgeniy Polyakov 2005-09-11 88 if (!found)
7672d0b5441137 Evgeniy Polyakov 2005-09-11 89 return -ENODEV;
7672d0b5441137 Evgeniy Polyakov 2005-09-11 90 }
7672d0b5441137 Evgeniy Polyakov 2005-09-11 91
ac8f73305eea8a David Fries 2014-01-15 92 if (!portid && !netlink_has_listeners(dev->nls, group))
b191ba0d599928 Evgeniy Polyakov 2006-03-20 93 return -ESRCH;
b191ba0d599928 Evgeniy Polyakov 2006-03-20 94
34470e0bfae223 David Fries 2014-04-08 95 size = sizeof(*msg) + len;
7672d0b5441137 Evgeniy Polyakov 2005-09-11 96
9631d79e815197 Hong zhi guo 2013-03-27 97 skb = nlmsg_new(size, gfp_mask);
7672d0b5441137 Evgeniy Polyakov 2005-09-11 98 if (!skb)
7672d0b5441137 Evgeniy Polyakov 2005-09-11 99 return -ENOMEM;
7672d0b5441137 Evgeniy Polyakov 2005-09-11 100
9631d79e815197 Hong zhi guo 2013-03-27 101 nlh = nlmsg_put(skb, 0, msg->seq, NLMSG_DONE, size, 0);
85c931665d822f Javier Martinez Canillas 2012-06-26 102 if (!nlh) {
85c931665d822f Javier Martinez Canillas 2012-06-26 103 kfree_skb(skb);
85c931665d822f Javier Martinez Canillas 2012-06-26 104 return -EMSGSIZE;
85c931665d822f Javier Martinez Canillas 2012-06-26 105 }
7672d0b5441137 Evgeniy Polyakov 2005-09-11 106
85c931665d822f Javier Martinez Canillas 2012-06-26 107 data = nlmsg_data(nlh);
7672d0b5441137 Evgeniy Polyakov 2005-09-11 108
ac73bf50b709de Mathias Krause 2013-09-30 109 memcpy(data, msg, size);
7672d0b5441137 Evgeniy Polyakov 2005-09-11 110
7672d0b5441137 Evgeniy Polyakov 2005-09-11 111 NETLINK_CB(skb).dst_group = group;
7672d0b5441137 Evgeniy Polyakov 2005-09-11 112
ac8f73305eea8a David Fries 2014-01-15 113 if (group)
ac8f73305eea8a David Fries 2014-01-15 114 return netlink_broadcast(dev->nls, skb, portid, group,
ac8f73305eea8a David Fries 2014-01-15 115 gfp_mask);
d0164adc89f6bb Mel Gorman 2015-11-06 116 return netlink_unicast(dev->nls, skb, portid,
d0164adc89f6bb Mel Gorman 2015-11-06 117 !gfpflags_allow_blocking(gfp_mask));
7672d0b5441137 Evgeniy Polyakov 2005-09-11 118 }
---
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: 27431 bytes --]
[-- Attachment #3: Type: text/plain, Size: 149 bytes --]
_______________________________________________
kbuild mailing list -- kbuild@lists.01.org
To unsubscribe send an email to kbuild-leave@lists.01.org
next prev parent reply other threads:[~2020-07-02 14:35 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-02 0:26 [PATCH 0/5] RFC: connector: Add network namespace awareness Matt Bennett
2020-07-02 0:26 ` [PATCH 1/5] connector: Use task pid helpers Matt Bennett
2020-07-02 0:26 ` [PATCH 2/5] connector: Use 'current_user_ns' function Matt Bennett
2020-07-02 0:26 ` [PATCH 3/5] connector: Ensure callback entry is released Matt Bennett
2020-07-02 0:26 ` [PATCH 4/5] connector: Prepare for supporting multiple namespaces Matt Bennett
2020-07-02 0:26 ` [PATCH 5/5] connector: Create connector per namespace Matt Bennett
2020-07-02 5:52 ` kernel test robot
2020-07-02 6:40 ` kernel test robot
2020-07-02 14:32 ` Dan Carpenter [this message]
2020-07-02 13:17 ` [PATCH 0/5] RFC: connector: Add network namespace awareness Eric W. Biederman
2020-07-02 19:10 ` Christian Brauner
2020-07-02 22:44 ` Aleksa Sarai
2020-07-05 22:32 ` Matt Bennett
2020-07-13 18:34 ` Eric W. Biederman
2020-07-14 5:03 ` Aleksa Sarai
2020-07-14 5:19 ` Matt Bennett
2020-07-02 18:59 ` Eric W. Biederman
2020-07-05 22:31 ` Matt Bennett
2020-07-13 18:39 ` Eric W. Biederman
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=20200702143242.GS2571@kadam \
--to=dan.carpenter@oracle.com \
--cc=ebiederm@xmission.com \
--cc=error27@gmail.com \
--cc=kbuild-all@lists.01.org \
--cc=kbuild@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=matt.bennett@alliedtelesis.co.nz \
--cc=netdev@vger.kernel.org \
--cc=zbr@ioremap.net \
/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).