From: kernel test robot <lkp@intel.com>
To: Wentao Liang <vulab@iscas.ac.cn>,
"Martin K . Petersen" <martin.petersen@oracle.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
Kees Cook <kees@kernel.org>, Wentao Liang <vulab@iscas.ac.cn>,
linux-scsi@vger.kernel.org, target-devel@vger.kernel.org,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] target: iscsi: cxgbit: fix cnp kref leak in __cxgbit_free_cdev_np()
Date: Thu, 28 May 2026 06:39:18 +0200 [thread overview]
Message-ID: <202605280601.qcftuh6t-lkp@intel.com> (raw)
In-Reply-To: <20260527103823.869792-1-vulab@iscas.ac.cn>
Hi Wentao,
kernel test robot noticed the following build warnings:
[auto build test WARNING on mkp-scsi/for-next]
[also build test WARNING on kees/for-next/pstore kees/for-next/kspp linus/master v7.1-rc5 next-20260527]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Wentao-Liang/target-iscsi-cxgbit-fix-cnp-kref-leak-in-__cxgbit_free_cdev_np/20260527-184050
base: https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
patch link: https://lore.kernel.org/r/20260527103823.869792-1-vulab%40iscas.ac.cn
patch subject: [PATCH] target: iscsi: cxgbit: fix cnp kref leak in __cxgbit_free_cdev_np()
config: x86_64-rhel-9.4-rust (https://download.01.org/0day-ci/archive/20260528/202605280601.qcftuh6t-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
rustc: rustc 1.88.0 (6b00bc388 2025-06-23)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260528/202605280601.qcftuh6t-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>
| Closes: https://lore.kernel.org/oe-kbuild-all/202605280601.qcftuh6t-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/target/iscsi/cxgbit/cxgbit_cm.c:549:3: warning: misleading indentation; statement is not part of the previous 'if' [-Wmisleading-indentation]
549 | return ret;
| ^
drivers/target/iscsi/cxgbit/cxgbit_cm.c:547:2: note: previous statement is here
547 | if (ret == -ETIMEDOUT)
| ^
1 warning generated.
vim +/if +549 drivers/target/iscsi/cxgbit/cxgbit_cm.c
9730ffcb8957e1c Varun Prakash 2016-04-20 516
9730ffcb8957e1c Varun Prakash 2016-04-20 517 static int
9730ffcb8957e1c Varun Prakash 2016-04-20 518 __cxgbit_free_cdev_np(struct cxgbit_device *cdev, struct cxgbit_np *cnp)
9730ffcb8957e1c Varun Prakash 2016-04-20 519 {
9730ffcb8957e1c Varun Prakash 2016-04-20 520 int stid, ret;
9730ffcb8957e1c Varun Prakash 2016-04-20 521 bool ipv6 = false;
9730ffcb8957e1c Varun Prakash 2016-04-20 522
9730ffcb8957e1c Varun Prakash 2016-04-20 523 stid = cxgbit_np_hash_del(cdev, cnp);
9730ffcb8957e1c Varun Prakash 2016-04-20 524 if (stid < 0)
9730ffcb8957e1c Varun Prakash 2016-04-20 525 return -EINVAL;
9730ffcb8957e1c Varun Prakash 2016-04-20 526 if (!test_bit(CDEV_STATE_UP, &cdev->flags))
9730ffcb8957e1c Varun Prakash 2016-04-20 527 return -EINVAL;
9730ffcb8957e1c Varun Prakash 2016-04-20 528
9730ffcb8957e1c Varun Prakash 2016-04-20 529 if (cnp->np->np_sockaddr.ss_family == AF_INET6)
9730ffcb8957e1c Varun Prakash 2016-04-20 530 ipv6 = true;
9730ffcb8957e1c Varun Prakash 2016-04-20 531
9730ffcb8957e1c Varun Prakash 2016-04-20 532 cxgbit_get_cnp(cnp);
9730ffcb8957e1c Varun Prakash 2016-04-20 533 cxgbit_init_wr_wait(&cnp->com.wr_wait);
9730ffcb8957e1c Varun Prakash 2016-04-20 534 ret = cxgb4_remove_server(cdev->lldi.ports[0], stid,
9730ffcb8957e1c Varun Prakash 2016-04-20 535 cdev->lldi.rxq_ids[0], ipv6);
9730ffcb8957e1c Varun Prakash 2016-04-20 536
9730ffcb8957e1c Varun Prakash 2016-04-20 537 if (ret > 0)
9730ffcb8957e1c Varun Prakash 2016-04-20 538 ret = net_xmit_errno(ret);
9730ffcb8957e1c Varun Prakash 2016-04-20 539
9730ffcb8957e1c Varun Prakash 2016-04-20 540 if (ret) {
9730ffcb8957e1c Varun Prakash 2016-04-20 541 cxgbit_put_cnp(cnp);
9730ffcb8957e1c Varun Prakash 2016-04-20 542 return ret;
9730ffcb8957e1c Varun Prakash 2016-04-20 543 }
9730ffcb8957e1c Varun Prakash 2016-04-20 544
9730ffcb8957e1c Varun Prakash 2016-04-20 545 ret = cxgbit_wait_for_reply(cdev, &cnp->com.wr_wait,
9730ffcb8957e1c Varun Prakash 2016-04-20 546 0, 10, __func__);
9730ffcb8957e1c Varun Prakash 2016-04-20 547 if (ret == -ETIMEDOUT)
956027c993d5b20 Wentao Liang 2026-05-27 548 cxgbit_put_cnp(cnp);
9730ffcb8957e1c Varun Prakash 2016-04-20 @549 return ret;
9730ffcb8957e1c Varun Prakash 2016-04-20 550
9730ffcb8957e1c Varun Prakash 2016-04-20 551 if (ipv6 && cnp->com.cdev) {
9730ffcb8957e1c Varun Prakash 2016-04-20 552 struct sockaddr_in6 *sin6;
9730ffcb8957e1c Varun Prakash 2016-04-20 553
9730ffcb8957e1c Varun Prakash 2016-04-20 554 sin6 = (struct sockaddr_in6 *)&cnp->com.local_addr;
9730ffcb8957e1c Varun Prakash 2016-04-20 555 cxgb4_clip_release(cdev->lldi.ports[0],
9730ffcb8957e1c Varun Prakash 2016-04-20 556 (const u32 *)&sin6->sin6_addr.s6_addr,
9730ffcb8957e1c Varun Prakash 2016-04-20 557 1);
9730ffcb8957e1c Varun Prakash 2016-04-20 558 }
9730ffcb8957e1c Varun Prakash 2016-04-20 559
9730ffcb8957e1c Varun Prakash 2016-04-20 560 cxgb4_free_stid(cdev->lldi.tids, stid,
9730ffcb8957e1c Varun Prakash 2016-04-20 561 cnp->com.local_addr.ss_family);
956027c993d5b20 Wentao Liang 2026-05-27 562 cxgbit_put_cnp(cnp);
9730ffcb8957e1c Varun Prakash 2016-04-20 563 return 0;
9730ffcb8957e1c Varun Prakash 2016-04-20 564 }
9730ffcb8957e1c Varun Prakash 2016-04-20 565
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
prev parent reply other threads:[~2026-05-28 4:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-27 10:38 [PATCH] target: iscsi: cxgbit: fix cnp kref leak in __cxgbit_free_cdev_np() Wentao Liang
2026-05-28 2:05 ` kernel test robot
2026-05-28 4:39 ` kernel test robot [this message]
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=202605280601.qcftuh6t-lkp@intel.com \
--to=lkp@intel.com \
--cc=kees@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=martin.petersen@oracle.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=stable@vger.kernel.org \
--cc=target-devel@vger.kernel.org \
--cc=vulab@iscas.ac.cn \
/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