From: Dan Carpenter <dan.carpenter@linaro.org>
To: oe-kbuild@lists.linux.dev, Daniel Wagner <dwagner@suse.de>,
linux-nvme@lists.infradead.org
Cc: lkp@intel.com, oe-kbuild-all@lists.linux.dev,
linux-kernel@vger.kernel.org, linux-block@vger.kernel.org,
Chaitanya Kulkarni <kch@nvidia.com>,
Shin'ichiro Kawasaki <shinichiro@fastmail.com>,
Sagi Grimberg <sagi@grimberg.me>, Hannes Reinecke <hare@suse.de>,
James Smart <jsmart2021@gmail.com>,
Daniel Wagner <dwagner@suse.de>
Subject: Re: [PATCH v2 4/5] nvme-fc: Make initial connect attempt synchronous
Date: Mon, 26 Jun 2023 13:59:58 +0300 [thread overview]
Message-ID: <7ba59f01-57fe-4ad2-917a-0a199528b1f6@kadam.mountain> (raw)
In-Reply-To: <20230620133711.22840-5-dwagner@suse.de>
Hi Daniel,
kernel test robot noticed the following build warnings:
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Daniel-Wagner/nvme-fc-Do-not-wait-in-vain-when-unloading-module/20230620-213849
base: linus/master
patch link: https://lore.kernel.org/r/20230620133711.22840-5-dwagner%40suse.de
patch subject: [PATCH v2 4/5] nvme-fc: Make initial connect attempt synchronous
config: openrisc-randconfig-m041-20230622 (https://download.01.org/0day-ci/archive/20230624/202306240125.U2jdrjAY-lkp@intel.com/config)
compiler: or1k-linux-gcc (GCC) 12.3.0
reproduce: (https://download.01.org/0day-ci/archive/20230624/202306240125.U2jdrjAY-lkp@intel.com/reproduce)
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 <dan.carpenter@linaro.org>
| Closes: https://lore.kernel.org/r/202306240125.U2jdrjAY-lkp@intel.com/
smatch warnings:
drivers/nvme/host/fc.c:3590 nvme_fc_init_ctrl() warn: passing zero to 'ERR_PTR'
vim +/ERR_PTR +3590 drivers/nvme/host/fc.c
61bff8ef008845 James Smart 2017-04-23 3533 ret = nvme_init_ctrl(&ctrl->ctrl, dev, &nvme_fc_ctrl_ops, 0);
61bff8ef008845 James Smart 2017-04-23 3534 if (ret)
98e3528012cd57 Ross Lagerwall 2023-01-20 3535 goto out_free_queues;
e399441de9115c James Smart 2016-12-02 3536
61bff8ef008845 James Smart 2017-04-23 3537 /* at this point, teardown path changes to ref counting on nvme ctrl */
e399441de9115c James Smart 2016-12-02 3538
98e3528012cd57 Ross Lagerwall 2023-01-20 3539 ret = nvme_alloc_admin_tag_set(&ctrl->ctrl, &ctrl->admin_tag_set,
98e3528012cd57 Ross Lagerwall 2023-01-20 3540 &nvme_fc_admin_mq_ops,
98e3528012cd57 Ross Lagerwall 2023-01-20 3541 struct_size((struct nvme_fcp_op_w_sgl *)NULL, priv,
98e3528012cd57 Ross Lagerwall 2023-01-20 3542 ctrl->lport->ops->fcprqst_priv_sz));
98e3528012cd57 Ross Lagerwall 2023-01-20 3543 if (ret)
98e3528012cd57 Ross Lagerwall 2023-01-20 3544 goto fail_ctrl;
98e3528012cd57 Ross Lagerwall 2023-01-20 3545
e399441de9115c James Smart 2016-12-02 3546 spin_lock_irqsave(&rport->lock, flags);
e399441de9115c James Smart 2016-12-02 3547 list_add_tail(&ctrl->ctrl_list, &rport->ctrl_list);
e399441de9115c James Smart 2016-12-02 3548 spin_unlock_irqrestore(&rport->lock, flags);
e399441de9115c James Smart 2016-12-02 3549
ac881fd1288ca6 Daniel Wagner 2023-06-20 3550 if (!nvme_change_ctrl_state(&ctrl->ctrl, NVME_CTRL_CONNECTING)) {
4c984154efa131 James Smart 2018-06-13 3551 dev_err(ctrl->ctrl.device,
4c984154efa131 James Smart 2018-06-13 3552 "NVME-FC{%d}: failed to init ctrl state\n", ctrl->cnum);
4c984154efa131 James Smart 2018-06-13 3553 goto fail_ctrl;
No error code on this path. Originally it didn't matter because it was
hardcoded to return ERR_PTR(-EIO);
17c4dc6eb7e1b2 James Smart 2017-10-09 3554 }
17c4dc6eb7e1b2 James Smart 2017-10-09 3555
ac881fd1288ca6 Daniel Wagner 2023-06-20 3556 ret = nvme_fc_create_association(ctrl);
ac881fd1288ca6 Daniel Wagner 2023-06-20 3557 if (ret)
4c984154efa131 James Smart 2018-06-13 3558 goto fail_ctrl;
4c984154efa131 James Smart 2018-06-13 3559
4c984154efa131 James Smart 2018-06-13 3560 dev_info(ctrl->ctrl.device,
4c984154efa131 James Smart 2018-06-13 3561 "NVME-FC{%d}: new ctrl: NQN \"%s\"\n",
e5ea42faa773c6 Hannes Reinecke 2021-09-22 3562 ctrl->cnum, nvmf_ctrl_subsysnqn(&ctrl->ctrl));
4c984154efa131 James Smart 2018-06-13 3563
4c984154efa131 James Smart 2018-06-13 3564 return &ctrl->ctrl;
4c984154efa131 James Smart 2018-06-13 3565
4c984154efa131 James Smart 2018-06-13 3566 fail_ctrl:
19fce0470f0503 James Smart 2020-12-01 3567 cancel_work_sync(&ctrl->ioerr_work);
cf25809bec2c7d James Smart 2018-03-13 3568 cancel_work_sync(&ctrl->ctrl.reset_work);
cf25809bec2c7d James Smart 2018-03-13 3569 cancel_delayed_work_sync(&ctrl->connect_work);
cf25809bec2c7d James Smart 2018-03-13 3570
de41447aac034c Ewan D. Milne 2017-04-24 3571 ctrl->ctrl.opts = NULL;
17c4dc6eb7e1b2 James Smart 2017-10-09 3572
61bff8ef008845 James Smart 2017-04-23 3573 /* initiate nvme ctrl ref counting teardown */
e399441de9115c James Smart 2016-12-02 3574 nvme_uninit_ctrl(&ctrl->ctrl);
61bff8ef008845 James Smart 2017-04-23 3575
0b5a7669a457dd James Smart 2017-06-15 3576 /* Remove core ctrl ref. */
0b5a7669a457dd James Smart 2017-06-15 3577 nvme_put_ctrl(&ctrl->ctrl);
0b5a7669a457dd James Smart 2017-06-15 3578
61bff8ef008845 James Smart 2017-04-23 3579 /* as we're past the point where we transition to the ref
61bff8ef008845 James Smart 2017-04-23 3580 * counting teardown path, if we return a bad pointer here,
61bff8ef008845 James Smart 2017-04-23 3581 * the calling routine, thinking it's prior to the
61bff8ef008845 James Smart 2017-04-23 3582 * transition, will do an rport put. Since the teardown
61bff8ef008845 James Smart 2017-04-23 3583 * path also does a rport put, we do an extra get here to
61bff8ef008845 James Smart 2017-04-23 3584 * so proper order/teardown happens.
61bff8ef008845 James Smart 2017-04-23 3585 */
61bff8ef008845 James Smart 2017-04-23 3586 nvme_fc_rport_get(rport);
61bff8ef008845 James Smart 2017-04-23 3587
ac881fd1288ca6 Daniel Wagner 2023-06-20 3588 if (ret > 0)
ac881fd1288ca6 Daniel Wagner 2023-06-20 3589 ret = -EIO;
ac881fd1288ca6 Daniel Wagner 2023-06-20 @3590 return ERR_PTR(ret);
e399441de9115c James Smart 2016-12-02 3591
61bff8ef008845 James Smart 2017-04-23 3592 out_free_queues:
61bff8ef008845 James Smart 2017-04-23 3593 kfree(ctrl->queues);
e399441de9115c James Smart 2016-12-02 3594 out_free_ida:
61bff8ef008845 James Smart 2017-04-23 3595 put_device(ctrl->dev);
3dd83f4013f0e8 Sagi Grimberg 2022-02-14 3596 ida_free(&nvme_fc_ctrl_cnt, ctrl->cnum);
e399441de9115c James Smart 2016-12-02 3597 out_free_ctrl:
e399441de9115c James Smart 2016-12-02 3598 kfree(ctrl);
e399441de9115c James Smart 2016-12-02 3599 out_fail:
e399441de9115c James Smart 2016-12-02 3600 /* exit via here doesn't follow ctlr ref points */
e399441de9115c James Smart 2016-12-02 3601 return ERR_PTR(ret);
e399441de9115c James Smart 2016-12-02 3602 }
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2023-06-26 11:00 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-20 13:37 [PATCH v2 0/5] nvme-fc: Fix blktests hangers Daniel Wagner
2023-06-20 13:37 ` [PATCH v2 1/5] nvme-fc: Do not wait in vain when unloading module Daniel Wagner
2023-06-20 13:37 ` [PATCH v2 2/5] nvme-fcloop: queue work items correctly Daniel Wagner
2023-06-20 13:37 ` [PATCH v2 3/5] nvmet-fcloop: Remove remote port from list when unlinking Daniel Wagner
2023-06-20 13:37 ` [PATCH v2 4/5] nvme-fc: Make initial connect attempt synchronous Daniel Wagner
2023-06-26 10:59 ` Dan Carpenter [this message]
2023-06-26 11:33 ` Dan Carpenter
2023-06-27 6:18 ` Daniel Wagner
2023-06-27 6:39 ` Hannes Reinecke
2023-06-27 6:51 ` Hannes Reinecke
2023-07-01 12:11 ` James Smart
2023-07-06 12:07 ` Daniel Wagner
2023-07-11 22:47 ` James Smart
2023-07-12 6:50 ` Hannes Reinecke
2023-07-13 20:35 ` Ewan Milne
2023-06-20 13:37 ` [PATCH v2 5/5] nvme-fc: do no free ctrl opts Daniel Wagner
2023-06-30 13:33 ` [PATCH v2 0/5] nvme-fc: Fix blktests hangers Ewan Milne
2023-06-23 17:14 [PATCH v2 4/5] nvme-fc: Make initial connect attempt synchronous kernel test robot
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=7ba59f01-57fe-4ad2-917a-0a199528b1f6@kadam.mountain \
--to=dan.carpenter@linaro.org \
--cc=dwagner@suse.de \
--cc=hare@suse.de \
--cc=jsmart2021@gmail.com \
--cc=kch@nvidia.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=lkp@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=oe-kbuild@lists.linux.dev \
--cc=sagi@grimberg.me \
--cc=shinichiro@fastmail.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 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.