From: kernel test robot <lkp@intel.com>
To: B K Karthik <bkkarthik@pesu.pes.edu>,
Jon Maloy <jmaloy@redhat.com>, Ying Xue <ying.xue@windriver.com>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
tipc-discussion@lists.sourceforge.net,
linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org,
skhan@linuxfoundation.org,
linux-kernel-mentees@lists.linuxfoundation.org
Cc: netdev@vger.kernel.org, kbuild-all@lists.01.org
Subject: Re: [Linux-kernel-mentees] [PATCH] net: tipc: fix general protection fault in tipc_conn_delete_sub
Date: Mon, 27 Jul 2020 23:52:50 +0800 [thread overview]
Message-ID: <202007272337.Rd2io2fw%lkp@intel.com> (raw)
In-Reply-To: <20200727131057.7a3of3hhsld4ng5t@pesu.pes.edu>
[-- Attachment #1: Type: text/plain, Size: 3273 bytes --]
Hi K,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v5.8-rc7 next-20200724]
[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/B-K-Karthik/net-tipc-fix-general-protection-fault-in-tipc_conn_delete_sub/20200727-211330
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 92ed301919932f777713b9172e525674157e983d
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-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
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.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 warnings (new ones prefixed by >>):
net/tipc/topsrv.c: In function 'tipc_conn_send_to_sock':
>> net/tipc/topsrv.c:259:10: warning: 'return' with a value, in function returning void [-Wreturn-type]
259 | return -EINVAL;
| ^
net/tipc/topsrv.c:247:13: note: declared here
247 | static void tipc_conn_send_to_sock(struct tipc_conn *con)
| ^~~~~~~~~~~~~~~~~~~~~~
vim +/return +259 net/tipc/topsrv.c
246
247 static void tipc_conn_send_to_sock(struct tipc_conn *con)
248 {
249 struct list_head *queue = &con->outqueue;
250 struct tipc_topsrv *srv = con->server;
251 struct outqueue_entry *e;
252 struct tipc_event *evt;
253 struct msghdr msg;
254 struct kvec iov;
255 int count = 0;
256 int ret;
257
258 if (!con->server)
> 259 return -EINVAL;
260
261 spin_lock_bh(&con->outqueue_lock);
262
263 while (!list_empty(queue)) {
264 e = list_first_entry(queue, struct outqueue_entry, list);
265 evt = &e->evt;
266 spin_unlock_bh(&con->outqueue_lock);
267
268 if (e->inactive)
269 tipc_conn_delete_sub(con, &evt->s);
270
271 memset(&msg, 0, sizeof(msg));
272 msg.msg_flags = MSG_DONTWAIT;
273 iov.iov_base = evt;
274 iov.iov_len = sizeof(*evt);
275 msg.msg_name = NULL;
276
277 if (con->sock) {
278 ret = kernel_sendmsg(con->sock, &msg, &iov,
279 1, sizeof(*evt));
280 if (ret == -EWOULDBLOCK || ret == 0) {
281 cond_resched();
282 return;
283 } else if (ret < 0) {
284 return tipc_conn_close(con);
285 }
286 } else {
287 tipc_topsrv_kern_evt(srv->net, evt);
288 }
289
290 /* Don't starve users filling buffers */
291 if (++count >= MAX_SEND_MSG_COUNT) {
292 cond_resched();
293 count = 0;
294 }
295 spin_lock_bh(&con->outqueue_lock);
296 list_del(&e->list);
297 kfree(e);
298 }
299 spin_unlock_bh(&con->outqueue_lock);
300 }
301
---
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: 61092 bytes --]
[-- Attachment #3: Type: text/plain, Size: 201 bytes --]
_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
next prev parent reply other threads:[~2020-07-27 15:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-27 13:10 [Linux-kernel-mentees] [PATCH] net: tipc: fix general protection fault in tipc_conn_delete_sub B K Karthik
2020-07-27 13:22 ` Greg KH
2020-07-27 14:16 ` B K Karthik
2020-07-27 14:24 ` Greg KH
2020-07-28 16:15 ` Ying Xue
2020-07-27 15:52 ` kernel test robot [this message]
2020-07-27 19:38 ` David Miller
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=202007272337.Rd2io2fw%lkp@intel.com \
--to=lkp@intel.com \
--cc=bkkarthik@pesu.pes.edu \
--cc=davem@davemloft.net \
--cc=gregkh@linuxfoundation.org \
--cc=jmaloy@redhat.com \
--cc=kbuild-all@lists.01.org \
--cc=kuba@kernel.org \
--cc=linux-kernel-mentees@lists.linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=skhan@linuxfoundation.org \
--cc=tipc-discussion@lists.sourceforge.net \
--cc=ying.xue@windriver.com \
/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).