From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@lists.01.org, Bob Pearson <rpearsonhpe@gmail.com>,
jgg@nvidia.com, zyjzyj2000@gmail.com, linux-rdma@vger.kernel.org
Cc: lkp@intel.com, kbuild-all@lists.01.org, Bob Pearson <rpearson@hpe.com>
Subject: [kbuild] Re: [PATCH for-next v4 10/10] RDMA/rxe: Disallow MR dereg and invalidate when bound
Date: Thu, 22 Apr 2021 13:42:03 +0300 [thread overview]
Message-ID: <20210422104203.GN1959@kadam> (raw)
In-Reply-To: <20210422052822.36527-11-rpearson@hpe.com>
[-- Attachment #1: Type: text/plain, Size: 3212 bytes --]
Hi Bob,
url: https://github.com/0day-ci/linux/commits/Bob-Pearson/RDMA-rxe-Implement-memory-windows/20210422-132958
base: https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git for-next
config: x86_64-randconfig-m001-20210421 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.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>
smatch warnings:
drivers/infiniband/sw/rxe/rxe_mr.c:553 rxe_invalidate_mr() warn: ignoring unreachable code.
vim +553 drivers/infiniband/sw/rxe/rxe_mr.c
5f1e7f44d3a9cdb Bob Pearson 2021-04-22 529 int rxe_invalidate_mr(struct rxe_qp *qp, u32 rkey)
5f1e7f44d3a9cdb Bob Pearson 2021-04-22 530 {
5f1e7f44d3a9cdb Bob Pearson 2021-04-22 531 struct rxe_dev *rxe = to_rdev(qp->ibqp.device);
5f1e7f44d3a9cdb Bob Pearson 2021-04-22 532 struct rxe_mr *mr;
5f1e7f44d3a9cdb Bob Pearson 2021-04-22 533 int ret;
5f1e7f44d3a9cdb Bob Pearson 2021-04-22 534
5f1e7f44d3a9cdb Bob Pearson 2021-04-22 535 mr = rxe_pool_get_index(&rxe->mr_pool, rkey >> 8);
5f1e7f44d3a9cdb Bob Pearson 2021-04-22 536 if (!mr) {
5f1e7f44d3a9cdb Bob Pearson 2021-04-22 537 pr_err("%s: No MR for rkey %#x\n", __func__, rkey);
5f1e7f44d3a9cdb Bob Pearson 2021-04-22 538 ret = -EINVAL;
5f1e7f44d3a9cdb Bob Pearson 2021-04-22 539 goto err;
5f1e7f44d3a9cdb Bob Pearson 2021-04-22 540 }
5f1e7f44d3a9cdb Bob Pearson 2021-04-22 541
5f1e7f44d3a9cdb Bob Pearson 2021-04-22 542 if (rkey != mr->ibmr.rkey) {
5f1e7f44d3a9cdb Bob Pearson 2021-04-22 543 pr_err("%s: rkey (%#x) doesn't match mr->ibmr.rkey (%#x)\n",
5f1e7f44d3a9cdb Bob Pearson 2021-04-22 544 __func__, rkey, mr->ibmr.rkey);
5f1e7f44d3a9cdb Bob Pearson 2021-04-22 545 ret = -EINVAL;
5f1e7f44d3a9cdb Bob Pearson 2021-04-22 546 goto err_drop_ref;
5f1e7f44d3a9cdb Bob Pearson 2021-04-22 547 }
5f1e7f44d3a9cdb Bob Pearson 2021-04-22 548
740526f943e87ee Bob Pearson 2021-04-22 549 if (atomic_read(&mr->num_mw) > 0) {
740526f943e87ee Bob Pearson 2021-04-22 550 pr_warn("%s: Attempt to invalidate an MR while bound to MWs\n",
740526f943e87ee Bob Pearson 2021-04-22 551 __func__);
740526f943e87ee Bob Pearson 2021-04-22 552 return -EINVAL;
740526f943e87ee Bob Pearson 2021-04-22 @553 goto err_drop_ref;
Either the goto or the return should be deleted. I would have expected
that it would be the return to be deleted, otherwise it needs a big
comment why we're holding on to the reference.
740526f943e87ee Bob Pearson 2021-04-22 554 }
740526f943e87ee Bob Pearson 2021-04-22 555
5f1e7f44d3a9cdb Bob Pearson 2021-04-22 556 mr->state = RXE_MR_STATE_FREE;
5f1e7f44d3a9cdb Bob Pearson 2021-04-22 557 ret = 0;
5f1e7f44d3a9cdb Bob Pearson 2021-04-22 558
5f1e7f44d3a9cdb Bob Pearson 2021-04-22 559 err_drop_ref:
5f1e7f44d3a9cdb Bob Pearson 2021-04-22 560 rxe_drop_ref(mr);
5f1e7f44d3a9cdb Bob Pearson 2021-04-22 561 err:
5f1e7f44d3a9cdb Bob Pearson 2021-04-22 562 return ret;
5f1e7f44d3a9cdb Bob Pearson 2021-04-22 563 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 33116 bytes --]
[-- Attachment #3: Type: text/plain, Size: 149 bytes --]
_______________________________________________
kbuild mailing list -- kbuild@lists.01.org
To unsubscribe send an email to kbuild-leave@lists.01.org
next prev parent reply other threads:[~2021-04-22 10:42 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-22 5:28 [PATCH for-next v4 00/10] RDMA/rxe: Implement memory windows Bob Pearson
2021-04-22 5:28 ` [PATCH for-next v4 01/10] RDMA/rxe: Add bind MW fields to rxe_send_wr Bob Pearson
2021-04-22 5:28 ` [PATCH for-next v4 02/10] RDMA/rxe: Return errors for add index and key Bob Pearson
2021-04-22 5:28 ` [PATCH for-next v4 03/10] RDMA/rxe: Enable MW object pool Bob Pearson
2021-04-22 5:28 ` [PATCH for-next v4 04/10] RDMA/rxe: Add ib_alloc_mw and ib_dealloc_mw verbs Bob Pearson
2021-04-22 5:28 ` [PATCH for-next v4 05/10] RDMA/rxe: Replace WR_REG_MASK by WR_LOCAL_OP_MASK Bob Pearson
2021-04-22 5:28 ` [PATCH for-next v4 06/10] RDMA/rxe: Move local ops to subroutine Bob Pearson
2021-04-22 5:28 ` [PATCH for-next v4 07/10] RDMA/rxe: Add support for bind MW work requests Bob Pearson
2021-04-22 5:28 ` [PATCH for-next v4 08/10] RDMA/rxe: Implement invalidate MW operations Bob Pearson
2021-04-22 5:28 ` [PATCH for-next v4 09/10] RDMA/rxe: Implement memory access through MWs Bob Pearson
2021-04-22 5:28 ` [PATCH for-next v4 10/10] RDMA/rxe: Disallow MR dereg and invalidate when bound Bob Pearson
2021-04-22 10:42 ` Dan Carpenter [this message]
2021-04-22 15:19 ` [kbuild] " Pearson, Robert B
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=20210422104203.GN1959@kadam \
--to=dan.carpenter@oracle.com \
--cc=jgg@nvidia.com \
--cc=kbuild-all@lists.01.org \
--cc=kbuild@lists.01.org \
--cc=linux-rdma@vger.kernel.org \
--cc=lkp@intel.com \
--cc=rpearson@hpe.com \
--cc=rpearsonhpe@gmail.com \
--cc=zyjzyj2000@gmail.com \
/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