CC: [email protected] TO: Jason Gunthorpe <[email protected]> CC: Leon Romanovsky <[email protected]>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/leon/linux-rdma.git rdma-next head: ebf91e681f9ddd176c30210aa0a6140e6dbf14f1 commit: ebf91e681f9ddd176c30210aa0a6140e6dbf14f1 [94/94] RDMA: Allow ib_client's to fail when add() is called :::::: branch date: 34 hours ago :::::: commit date: 34 hours ago If you fix the issue, kindly add following tag as appropriate Reported-by: kbuild test robot <[email protected]> Reported-by: Dan Carpenter <[email protected]> New smatch warnings: drivers/infiniband/ulp/srp/ib_srp.c:4202 srp_add_one() error: dereferencing freed memory 'srp_dev' net/rds/ib.c:194 rds_ib_add_one() warn: passing zero to 'PTR_ERR' Old smatch warnings: drivers/infiniband/ulp/srp/ib_srp.c:2585 srp_cm_rep_handler() error: we previously assumed 'ch->rx_ring' could be null (see line 2578) net/rds/ib.c:210 rds_ib_add_one() warn: passing zero to 'PTR_ERR' net/rds/ib.c:218 rds_ib_add_one() warn: passing zero to 'PTR_ERR' net/rds/ib.c:334 rds_ib_conn_info_visitor() error: we previously assumed 'ic' could be null (see line 324) net/rds/ib.c:372 rds6_ib_conn_info_visitor() error: we previously assumed 'ic' could be null (see line 361) # https://git.kernel.org/pub/scm/linux/kernel/git/leon/linux-rdma.git/commit/?id=ebf91e681f9ddd176c30210aa0a6140e6dbf14f1 git remote add leon-rdma https://git.kernel.org/pub/scm/linux/kernel/git/leon/linux-rdma.git git remote update leon-rdma git checkout ebf91e681f9ddd176c30210aa0a6140e6dbf14f1 vim +/srp_dev +4202 drivers/infiniband/ulp/srp/ib_srp.c f071777f9cbd7 Christoph Hellwig 2016-09-05 4180 if (never_register || !register_always || 5f071777f9cbd7 Christoph Hellwig 2016-09-05 4181 (!srp_dev->has_fmr && !srp_dev->has_fr)) 5f071777f9cbd7 Christoph Hellwig 2016-09-05 4182 flags |= IB_PD_UNSAFE_GLOBAL_RKEY; 5f071777f9cbd7 Christoph Hellwig 2016-09-05 4183 5cfb17828d877a Bart Van Assche 2014-05-20 4184 if (srp_dev->use_fast_reg) { 5cfb17828d877a Bart Van Assche 2014-05-20 4185 srp_dev->max_pages_per_mr = 5cfb17828d877a Bart Van Assche 2014-05-20 4186 min_t(u32, srp_dev->max_pages_per_mr, 042dd765bdf401 Bart Van Assche 2016-11-21 4187 attr->max_fast_reg_page_list_len); 5cfb17828d877a Bart Van Assche 2014-05-20 4188 } 52ede08f00ebfc Bart Van Assche 2014-05-20 4189 srp_dev->mr_max_size = srp_dev->mr_page_size * 52ede08f00ebfc Bart Van Assche 2014-05-20 4190 srp_dev->max_pages_per_mr; 4a061b287b1eb5 Or Gerlitz 2015-12-18 4191 pr_debug("%s: mr_page_shift = %d, device->max_mr_size = %#llx, device->max_fast_reg_page_list_len = %u, max_pages_per_mr = %d, mr_max_size = %#x\n", 6c8541118bd53b Jason Gunthorpe 2018-09-20 4192 dev_name(&device->dev), mr_page_shift, attr->max_mr_size, 042dd765bdf401 Bart Van Assche 2016-11-21 4193 attr->max_fast_reg_page_list_len, 52ede08f00ebfc Bart Van Assche 2014-05-20 4194 srp_dev->max_pages_per_mr, srp_dev->mr_max_size); f5358a172f79e3 Roland Dreier 2006-06-17 4195 f5358a172f79e3 Roland Dreier 2006-06-17 4196 INIT_LIST_HEAD(&srp_dev->dev_list); f5358a172f79e3 Roland Dreier 2006-06-17 4197 f5358a172f79e3 Roland Dreier 2006-06-17 4198 srp_dev->dev = device; 5f071777f9cbd7 Christoph Hellwig 2016-09-05 4199 srp_dev->pd = ib_alloc_pd(device, flags); ebf91e681f9ddd Jason Gunthorpe 2020-03-03 4200 if (IS_ERR(srp_dev->pd)) { ebf91e681f9ddd Jason Gunthorpe 2020-03-03 4201 kfree(srp_dev); ^^^^^^^ Free ebf91e681f9ddd Jason Gunthorpe 2020-03-03 @4202 return PTR_ERR(srp_dev->pd); ^^^^^^^^^^^ Dereference ebf91e681f9ddd Jason Gunthorpe 2020-03-03 4203 } f5358a172f79e3 Roland Dreier 2006-06-17 4204 cee687b68dbc71 Bart Van Assche 2017-10-11 4205 if (flags & IB_PD_UNSAFE_GLOBAL_RKEY) { --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/[email protected] _______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
