* [leon-rdma:testing/rdma-rc 1/3] drivers/infiniband/core/cma.c:4434 rdma_accept() error: we previously assumed 'conn_param' could be null (see line 4426)
@ 2022-05-01 4:29 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-05-01 4:29 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 6506 bytes --]
CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: linux-kernel(a)vger.kernel.org
TO: Mark Zhang <markzhang@nvidia.com>
CC: Leon Romanovsky <leon@kernel.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/leon/linux-rdma.git testing/rdma-rc
head: 9d9a7437011f4bc4678581562ed9941f702277fe
commit: 98466723510491a832171031f591c77e5691979a [1/3] RDMA/cma: Limit join multicast to UD QP type only
:::::: branch date: 12 days ago
:::::: commit date: 12 days ago
config: nios2-randconfig-m031-20220428 (https://download.01.org/0day-ci/archive/20220501/202205011249.duCEt6Ob-lkp(a)intel.com/config)
compiler: nios2-linux-gcc (GCC) 11.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>
New smatch warnings:
drivers/infiniband/core/cma.c:4434 rdma_accept() error: we previously assumed 'conn_param' could be null (see line 4426)
Old smatch warnings:
arch/nios2/include/asm/thread_info.h:62 current_thread_info() error: uninitialized symbol 'sp'.
vim +/conn_param +4434 drivers/infiniband/core/cma.c
628e5f6d39d5a6 Sean Hefty 2006-11-30 4396
b09c4d70122091 Leon Romanovsky 2020-09-22 4397 /**
b09c4d70122091 Leon Romanovsky 2020-09-22 4398 * rdma_accept - Called to accept a connection request or response.
b09c4d70122091 Leon Romanovsky 2020-09-22 4399 * @id: Connection identifier associated with the request.
b09c4d70122091 Leon Romanovsky 2020-09-22 4400 * @conn_param: Information needed to establish the connection. This must be
b09c4d70122091 Leon Romanovsky 2020-09-22 4401 * provided if accepting a connection request. If accepting a connection
b09c4d70122091 Leon Romanovsky 2020-09-22 4402 * response, this parameter must be NULL.
b09c4d70122091 Leon Romanovsky 2020-09-22 4403 *
b09c4d70122091 Leon Romanovsky 2020-09-22 4404 * Typically, this routine is only called by the listener to accept a connection
b09c4d70122091 Leon Romanovsky 2020-09-22 4405 * request. It must also be called on the active side of a connection if the
b09c4d70122091 Leon Romanovsky 2020-09-22 4406 * user is performing their own QP transitions.
b09c4d70122091 Leon Romanovsky 2020-09-22 4407 *
b09c4d70122091 Leon Romanovsky 2020-09-22 4408 * In the case of error, a reject message is sent to the remote side and the
b09c4d70122091 Leon Romanovsky 2020-09-22 4409 * state of the qp associated with the id is modified to error, such that any
b09c4d70122091 Leon Romanovsky 2020-09-22 4410 * previously posted receive buffers would be flushed.
b09c4d70122091 Leon Romanovsky 2020-09-22 4411 *
b09c4d70122091 Leon Romanovsky 2020-09-22 4412 * This function is for use by kernel ULPs and must be called from under the
b09c4d70122091 Leon Romanovsky 2020-09-22 4413 * handler callback.
b09c4d70122091 Leon Romanovsky 2020-09-22 4414 */
b09c4d70122091 Leon Romanovsky 2020-09-22 4415 int rdma_accept(struct rdma_cm_id *id, struct rdma_conn_param *conn_param)
e51060f08a6196 Sean Hefty 2006-06-17 4416 {
d114c6feedfe06 Jason Gunthorpe 2020-08-18 4417 struct rdma_id_private *id_priv =
d114c6feedfe06 Jason Gunthorpe 2020-08-18 4418 container_of(id, struct rdma_id_private, id);
e51060f08a6196 Sean Hefty 2006-06-17 4419 int ret;
e51060f08a6196 Sean Hefty 2006-06-17 4420
d114c6feedfe06 Jason Gunthorpe 2020-08-18 4421 lockdep_assert_held(&id_priv->handler_mutex);
83e9502d8db142 Nir Muchtar 2011-01-13 4422
d114c6feedfe06 Jason Gunthorpe 2020-08-18 4423 if (READ_ONCE(id_priv->state) != RDMA_CM_CONNECT)
e51060f08a6196 Sean Hefty 2006-06-17 4424 return -EINVAL;
e51060f08a6196 Sean Hefty 2006-06-17 4425
e51060f08a6196 Sean Hefty 2006-06-17 @4426 if (!id->qp && conn_param) {
e51060f08a6196 Sean Hefty 2006-06-17 4427 id_priv->qp_num = conn_param->qp_num;
e51060f08a6196 Sean Hefty 2006-06-17 4428 id_priv->srq = conn_param->srq;
e51060f08a6196 Sean Hefty 2006-06-17 4429 }
e51060f08a6196 Sean Hefty 2006-06-17 4430
72219cea8e246a Michael Wang 2015-05-05 4431 if (rdma_cap_ib_cm(id->device, id->port_num)) {
f45ee80eb0dda1 Hefty, Sean 2011-10-06 4432 if (id->qp_type == IB_QPT_UD) {
628e5f6d39d5a6 Sean Hefty 2006-11-30 4433 ret = cma_send_sidr_rep(id_priv, IB_SIDR_SUCCESS,
5c438135adf90b Sean Hefty 2013-05-29 @4434 conn_param->qkey,
628e5f6d39d5a6 Sean Hefty 2006-11-30 4435 conn_param->private_data,
628e5f6d39d5a6 Sean Hefty 2006-11-30 4436 conn_param->private_data_len);
f45ee80eb0dda1 Hefty, Sean 2011-10-06 4437 } else {
f45ee80eb0dda1 Hefty, Sean 2011-10-06 4438 if (conn_param)
e51060f08a6196 Sean Hefty 2006-06-17 4439 ret = cma_accept_ib(id_priv, conn_param);
e51060f08a6196 Sean Hefty 2006-06-17 4440 else
e51060f08a6196 Sean Hefty 2006-06-17 4441 ret = cma_rep_recv(id_priv);
f45ee80eb0dda1 Hefty, Sean 2011-10-06 4442 }
b6eb7011f561a2 Wenpeng Liang 2021-04-07 4443 } else if (rdma_cap_iw_cm(id->device, id->port_num)) {
07ebafbaaa72aa Tom Tucker 2006-08-03 4444 ret = cma_accept_iw(id_priv, conn_param);
b6eb7011f561a2 Wenpeng Liang 2021-04-07 4445 } else {
e51060f08a6196 Sean Hefty 2006-06-17 4446 ret = -ENOSYS;
b6eb7011f561a2 Wenpeng Liang 2021-04-07 4447 }
e51060f08a6196 Sean Hefty 2006-06-17 4448 if (ret)
e51060f08a6196 Sean Hefty 2006-06-17 4449 goto reject;
e51060f08a6196 Sean Hefty 2006-06-17 4450
e51060f08a6196 Sean Hefty 2006-06-17 4451 return 0;
e51060f08a6196 Sean Hefty 2006-06-17 4452 reject:
c5483388bb4d77 Sean Hefty 2007-09-24 4453 cma_modify_qp_err(id_priv);
8094ba0ace7f6c Leon Romanovsky 2020-05-26 4454 rdma_reject(id, NULL, 0, IB_CM_REJ_CONSUMER_DEFINED);
e51060f08a6196 Sean Hefty 2006-06-17 4455 return ret;
e51060f08a6196 Sean Hefty 2006-06-17 4456 }
b09c4d70122091 Leon Romanovsky 2020-09-22 4457 EXPORT_SYMBOL(rdma_accept);
e51060f08a6196 Sean Hefty 2006-06-17 4458
:::::: The code at line 4434 was first introduced by commit
:::::: 5c438135adf90b33cb00e5351becf1e557bbdd9d RDMA/cma: Set qkey for AF_IB
:::::: TO: Sean Hefty <sean.hefty@intel.com>
:::::: CC: Roland Dreier <roland@purestorage.com>
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-05-01 4:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-01 4:29 [leon-rdma:testing/rdma-rc 1/3] drivers/infiniband/core/cma.c:4434 rdma_accept() error: we previously assumed 'conn_param' could be null (see line 4426) 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.