All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-next:master 2783/4370] drivers/infiniband/ulp/iser/iser_initiator.c:614 iser_check_remote_inv() warn: missing unwind goto?
@ 2026-09-05  8:35 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-09-05  8:35 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp, Dan Carpenter

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: Yehyeong Lee <yhlee@isslab.korea.ac.kr>
CC: Leon Romanovsky <leon@kernel.org>
CC: Max Gurtovoy <mgurtovoy@nvidia.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   af5f12805e5cefa4fe68d6127c7e1fb78cd5535c
commit: d85f0f0a7c85756fc992c70d869706f19dac9259 [2783/4370] IB/iser: reject a remote invalidation of an unregistered direction
:::::: branch date: 13 hours ago
:::::: commit date: 3 days ago
config: x86_64-randconfig-161-20260904 (https://download.01.org/0day-ci/archive/20260905/202609051647.SMk0YLBD-lkp@intel.com/config)
compiler: gcc-13 (Debian 13.3.0-16) 13.3.0
smatch: v0.5.0-9187-g5189e3fb

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202609051647.SMk0YLBD-lkp@intel.com/

smatch warnings:
drivers/infiniband/ulp/iser/iser_initiator.c:614 iser_check_remote_inv() warn: missing unwind goto?

vim +614 drivers/infiniband/ulp/iser/iser_initiator.c

59caaed7a72a0e3 Jenny Derzhavetz 2015-12-24  590  
ca2770c65b56374 Max Gurtovoy     2021-12-15  591  static int iser_check_remote_inv(struct iser_conn *iser_conn, struct ib_wc *wc,
59caaed7a72a0e3 Jenny Derzhavetz 2015-12-24  592  				 struct iscsi_hdr *hdr)
59caaed7a72a0e3 Jenny Derzhavetz 2015-12-24  593  {
59caaed7a72a0e3 Jenny Derzhavetz 2015-12-24  594  	if (wc->wc_flags & IB_WC_WITH_INVALIDATE) {
59caaed7a72a0e3 Jenny Derzhavetz 2015-12-24  595  		struct iscsi_task *task;
59caaed7a72a0e3 Jenny Derzhavetz 2015-12-24  596  		u32 rkey = wc->ex.invalidate_rkey;
59caaed7a72a0e3 Jenny Derzhavetz 2015-12-24  597  
59caaed7a72a0e3 Jenny Derzhavetz 2015-12-24  598  		iser_dbg("conn %p: remote invalidation for rkey %#x\n",
59caaed7a72a0e3 Jenny Derzhavetz 2015-12-24  599  			 iser_conn, rkey);
59caaed7a72a0e3 Jenny Derzhavetz 2015-12-24  600  
d85f0f0a7c85756 Yehyeong Lee     2026-08-19  601  		if (unlikely(!iser_conn->snd_w_inv))
d85f0f0a7c85756 Yehyeong Lee     2026-08-19  602  			goto bad_inv;
59caaed7a72a0e3 Jenny Derzhavetz 2015-12-24  603  
59caaed7a72a0e3 Jenny Derzhavetz 2015-12-24  604  		task = iscsi_itt_to_ctask(iser_conn->iscsi_conn, hdr->itt);
59caaed7a72a0e3 Jenny Derzhavetz 2015-12-24  605  		if (likely(task)) {
59caaed7a72a0e3 Jenny Derzhavetz 2015-12-24  606  			struct iscsi_iser_task *iser_task = task->dd_data;
59caaed7a72a0e3 Jenny Derzhavetz 2015-12-24  607  			struct iser_fr_desc *desc;
59caaed7a72a0e3 Jenny Derzhavetz 2015-12-24  608  
59caaed7a72a0e3 Jenny Derzhavetz 2015-12-24  609  			if (iser_task->dir[ISER_DIR_IN]) {
ee4efeaea8837bb Max Gurtovoy     2022-03-08  610  				desc = iser_task->rdma_reg[ISER_DIR_IN].desc;
d85f0f0a7c85756 Yehyeong Lee     2026-08-19  611  				if (unlikely(!desc))
d85f0f0a7c85756 Yehyeong Lee     2026-08-19  612  					goto bad_inv;
65f07f5a09dacf3 Israel Rukshin   2018-09-26  613  				if (unlikely(iser_inv_desc(desc, rkey)))
65f07f5a09dacf3 Israel Rukshin   2018-09-26 @614  					return -EINVAL;
59caaed7a72a0e3 Jenny Derzhavetz 2015-12-24  615  			}
59caaed7a72a0e3 Jenny Derzhavetz 2015-12-24  616  
59caaed7a72a0e3 Jenny Derzhavetz 2015-12-24  617  			if (iser_task->dir[ISER_DIR_OUT]) {
ee4efeaea8837bb Max Gurtovoy     2022-03-08  618  				desc = iser_task->rdma_reg[ISER_DIR_OUT].desc;
d85f0f0a7c85756 Yehyeong Lee     2026-08-19  619  				if (unlikely(!desc))
d85f0f0a7c85756 Yehyeong Lee     2026-08-19  620  					goto bad_inv;
65f07f5a09dacf3 Israel Rukshin   2018-09-26  621  				if (unlikely(iser_inv_desc(desc, rkey)))
65f07f5a09dacf3 Israel Rukshin   2018-09-26  622  					return -EINVAL;
59caaed7a72a0e3 Jenny Derzhavetz 2015-12-24  623  			}
59caaed7a72a0e3 Jenny Derzhavetz 2015-12-24  624  		} else {
59caaed7a72a0e3 Jenny Derzhavetz 2015-12-24  625  			iser_err("failed to get task for itt=%d\n", hdr->itt);
59caaed7a72a0e3 Jenny Derzhavetz 2015-12-24  626  			return -EINVAL;
59caaed7a72a0e3 Jenny Derzhavetz 2015-12-24  627  		}
59caaed7a72a0e3 Jenny Derzhavetz 2015-12-24  628  	}
59caaed7a72a0e3 Jenny Derzhavetz 2015-12-24  629  
59caaed7a72a0e3 Jenny Derzhavetz 2015-12-24  630  	return 0;
d85f0f0a7c85756 Yehyeong Lee     2026-08-19  631  
d85f0f0a7c85756 Yehyeong Lee     2026-08-19  632  bad_inv:
d85f0f0a7c85756 Yehyeong Lee     2026-08-19  633  	iser_err("conn %p: unexpected remote invalidation, terminating connection\n",
d85f0f0a7c85756 Yehyeong Lee     2026-08-19  634  		 iser_conn);
d85f0f0a7c85756 Yehyeong Lee     2026-08-19  635  	return -EPROTO;
59caaed7a72a0e3 Jenny Derzhavetz 2015-12-24  636  }
59caaed7a72a0e3 Jenny Derzhavetz 2015-12-24  637  

:::::: The code at line 614 was first introduced by commit
:::::: 65f07f5a09dacf3b60619f196f096ea3671a5eda IB/iser: Fix possible NULL deref at iser_inv_desc()

:::::: TO: Israel Rukshin <israelr@mellanox.com>
:::::: CC: Jason Gunthorpe <jgg@mellanox.com>

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-09-05  8:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-05  8:35 [linux-next:master 2783/4370] drivers/infiniband/ulp/iser/iser_initiator.c:614 iser_check_remote_inv() warn: missing unwind goto? 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.