0 day kernel build service
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: [linux-next:master 2783/4370] drivers/infiniband/ulp/iser/iser_initiator.c:614 iser_check_remote_inv() warn: missing unwind goto?
Date: Sat, 05 Sep 2026 16:35:13 +0800	[thread overview]
Message-ID: <202609051647.SMk0YLBD-lkp@intel.com> (raw)

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

                 reply	other threads:[~2026-09-05  8:35 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202609051647.SMk0YLBD-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=error27@gmail.com \
    --cc=oe-kbuild@lists.linux.dev \
    /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