From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: [leon-rdma:fix-dmac-race-v1 11/40] drivers/infiniband/sw/rxe/rxe_verbs.c:1101 rxe_create_cq() warn: missing unwind goto?
Date: Sat, 11 Apr 2026 06:50:11 +0800 [thread overview]
Message-ID: <202604110604.YjAe2le6-lkp@intel.com> (raw)
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: Leon Romanovsky <leonro@nvidia.com>
CC: Zhu Yanjun <yanjun.zhu@linux.dev>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/leon/linux-rdma.git fix-dmac-race-v1
head: a0d830a00d5a5eee34794e6387a8938b81350e4a
commit: b8934c5c3f83ab3cf1b6a84d801cd0381aa28130 [11/40] RDMA: Properly propagate the number of CQEs as unsigned int
:::::: branch date: 5 days ago
:::::: commit date: 11 days ago
config: x86_64-randconfig-161-20260411 (https://download.01.org/0day-ci/archive/20260411/202604110604.YjAe2le6-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
smatch: v0.5.0-9004-gb810ac53
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/202604110604.YjAe2le6-lkp@intel.com/
smatch warnings:
drivers/infiniband/sw/rxe/rxe_verbs.c:1101 rxe_create_cq() warn: missing unwind goto?
drivers/infiniband/sw/rxe/rxe_verbs.c:1146 rxe_resize_cq() warn: missing unwind goto?
vim +1101 drivers/infiniband/sw/rxe/rxe_verbs.c
8700e3e7c4857d Moni Shoua 2016-06-16 1073
5bf944f24129cb Bob Pearson 2023-03-03 1074 /* cq */
e39afe3d6dbd90 Leon Romanovsky 2019-05-28 1075 static int rxe_create_cq(struct ib_cq *ibcq, const struct ib_cq_init_attr *attr,
dd6d7f8574d7f8 Akiva Goldberger 2024-06-27 1076 struct uverbs_attr_bundle *attrs)
8700e3e7c4857d Moni Shoua 2016-06-16 1077 {
dd6d7f8574d7f8 Akiva Goldberger 2024-06-27 1078 struct ib_udata *udata = &attrs->driver_udata;
e39afe3d6dbd90 Leon Romanovsky 2019-05-28 1079 struct ib_device *dev = ibcq->device;
8700e3e7c4857d Moni Shoua 2016-06-16 1080 struct rxe_dev *rxe = to_rdev(dev);
e39afe3d6dbd90 Leon Romanovsky 2019-05-28 1081 struct rxe_cq *cq = to_rcq(ibcq);
0c43ab371bcb07 Jason Gunthorpe 2018-03-13 1082 struct rxe_create_cq_resp __user *uresp = NULL;
5bf944f24129cb Bob Pearson 2023-03-03 1083 int err, cleanup_err;
0c43ab371bcb07 Jason Gunthorpe 2018-03-13 1084
0c43ab371bcb07 Jason Gunthorpe 2018-03-13 1085 if (udata) {
5bf944f24129cb Bob Pearson 2023-03-03 1086 if (udata->outlen < sizeof(*uresp)) {
5bf944f24129cb Bob Pearson 2023-03-03 1087 err = -EINVAL;
6482718086bf69 Li Zhijian 2024-01-09 1088 rxe_dbg_dev(rxe, "malformed udata, err = %d\n", err);
5bf944f24129cb Bob Pearson 2023-03-03 1089 goto err_out;
5bf944f24129cb Bob Pearson 2023-03-03 1090 }
0c43ab371bcb07 Jason Gunthorpe 2018-03-13 1091 uresp = udata->outbuf;
0c43ab371bcb07 Jason Gunthorpe 2018-03-13 1092 }
8700e3e7c4857d Moni Shoua 2016-06-16 1093
5bf944f24129cb Bob Pearson 2023-03-03 1094 if (attr->flags) {
5bf944f24129cb Bob Pearson 2023-03-03 1095 err = -EOPNOTSUPP;
6482718086bf69 Li Zhijian 2024-01-09 1096 rxe_dbg_dev(rxe, "bad attr->flags, err = %d\n", err);
5bf944f24129cb Bob Pearson 2023-03-03 1097 goto err_out;
5bf944f24129cb Bob Pearson 2023-03-03 1098 }
8700e3e7c4857d Moni Shoua 2016-06-16 1099
b8934c5c3f83ab Leon Romanovsky 2026-03-19 1100 if (attr->cqe > rxe->attr.max_cqe)
b8934c5c3f83ab Leon Romanovsky 2026-03-19 @1101 return -EINVAL;
5bf944f24129cb Bob Pearson 2023-03-03 1102
5bf944f24129cb Bob Pearson 2023-03-03 1103 err = rxe_add_to_pool(&rxe->cq_pool, cq);
5bf944f24129cb Bob Pearson 2023-03-03 1104 if (err) {
6482718086bf69 Li Zhijian 2024-01-09 1105 rxe_dbg_dev(rxe, "unable to create cq, err = %d\n", err);
5bf944f24129cb Bob Pearson 2023-03-03 1106 goto err_out;
5bf944f24129cb Bob Pearson 2023-03-03 1107 }
8700e3e7c4857d Moni Shoua 2016-06-16 1108
ff23dfa134576e Shamir Rabinovitch 2019-03-31 1109 err = rxe_cq_from_init(rxe, cq, attr->cqe, attr->comp_vector, udata,
ff23dfa134576e Shamir Rabinovitch 2019-03-31 1110 uresp);
5bf944f24129cb Bob Pearson 2023-03-03 1111 if (err) {
6482718086bf69 Li Zhijian 2024-01-09 1112 rxe_dbg_cq(cq, "create cq failed, err = %d\n", err);
5bf944f24129cb Bob Pearson 2023-03-03 1113 goto err_cleanup;
8700e3e7c4857d Moni Shoua 2016-06-16 1114 }
8700e3e7c4857d Moni Shoua 2016-06-16 1115
43d781b9fa562f Leon Romanovsky 2020-09-07 1116 return 0;
5bf944f24129cb Bob Pearson 2023-03-03 1117
5bf944f24129cb Bob Pearson 2023-03-03 1118 err_cleanup:
5bf944f24129cb Bob Pearson 2023-03-03 1119 cleanup_err = rxe_cleanup(cq);
5bf944f24129cb Bob Pearson 2023-03-03 1120 if (cleanup_err)
6482718086bf69 Li Zhijian 2024-01-09 1121 rxe_err_cq(cq, "cleanup failed, err = %d\n", cleanup_err);
5bf944f24129cb Bob Pearson 2023-03-03 1122 err_out:
6482718086bf69 Li Zhijian 2024-01-09 1123 rxe_err_dev(rxe, "returned err = %d\n", err);
5bf944f24129cb Bob Pearson 2023-03-03 1124 return err;
8700e3e7c4857d Moni Shoua 2016-06-16 1125 }
8700e3e7c4857d Moni Shoua 2016-06-16 1126
b8934c5c3f83ab Leon Romanovsky 2026-03-19 1127 static int rxe_resize_cq(struct ib_cq *ibcq, unsigned int cqe,
b8934c5c3f83ab Leon Romanovsky 2026-03-19 1128 struct ib_udata *udata)
8700e3e7c4857d Moni Shoua 2016-06-16 1129 {
8700e3e7c4857d Moni Shoua 2016-06-16 1130 struct rxe_cq *cq = to_rcq(ibcq);
8700e3e7c4857d Moni Shoua 2016-06-16 1131 struct rxe_dev *rxe = to_rdev(ibcq->device);
0c43ab371bcb07 Jason Gunthorpe 2018-03-13 1132 struct rxe_resize_cq_resp __user *uresp = NULL;
5bf944f24129cb Bob Pearson 2023-03-03 1133 int err;
0c43ab371bcb07 Jason Gunthorpe 2018-03-13 1134
0c43ab371bcb07 Jason Gunthorpe 2018-03-13 1135 if (udata) {
5bf944f24129cb Bob Pearson 2023-03-03 1136 if (udata->outlen < sizeof(*uresp)) {
5bf944f24129cb Bob Pearson 2023-03-03 1137 err = -EINVAL;
6482718086bf69 Li Zhijian 2024-01-09 1138 rxe_dbg_cq(cq, "malformed udata\n");
5bf944f24129cb Bob Pearson 2023-03-03 1139 goto err_out;
5bf944f24129cb Bob Pearson 2023-03-03 1140 }
0c43ab371bcb07 Jason Gunthorpe 2018-03-13 1141 uresp = udata->outbuf;
0c43ab371bcb07 Jason Gunthorpe 2018-03-13 1142 }
8700e3e7c4857d Moni Shoua 2016-06-16 1143
b8934c5c3f83ab Leon Romanovsky 2026-03-19 1144 if (cqe > rxe->attr.max_cqe ||
b8934c5c3f83ab Leon Romanovsky 2026-03-19 1145 cqe < queue_count(cq->queue, QUEUE_TYPE_TO_CLIENT))
b8934c5c3f83ab Leon Romanovsky 2026-03-19 @1146 return -EINVAL;
5bf944f24129cb Bob Pearson 2023-03-03 1147
5bf944f24129cb Bob Pearson 2023-03-03 1148 err = rxe_cq_resize_queue(cq, cqe, uresp, udata);
5bf944f24129cb Bob Pearson 2023-03-03 1149 if (err) {
6482718086bf69 Li Zhijian 2024-01-09 1150 rxe_dbg_cq(cq, "resize cq failed, err = %d\n", err);
5bf944f24129cb Bob Pearson 2023-03-03 1151 goto err_out;
5bf944f24129cb Bob Pearson 2023-03-03 1152 }
5bf944f24129cb Bob Pearson 2023-03-03 1153
5bf944f24129cb Bob Pearson 2023-03-03 1154 return 0;
692373d186205d Yunsheng Lin 2022-10-28 1155
5bf944f24129cb Bob Pearson 2023-03-03 1156 err_out:
6482718086bf69 Li Zhijian 2024-01-09 1157 rxe_err_cq(cq, "returned err = %d\n", err);
5bf944f24129cb Bob Pearson 2023-03-03 1158 return err;
8700e3e7c4857d Moni Shoua 2016-06-16 1159 }
8700e3e7c4857d Moni Shoua 2016-06-16 1160
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2026-04-10 22:50 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=202604110604.YjAe2le6-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