From: sashiko-bot@kernel.org
To: "Ziheng Wei" <zihengw03@163.com>
Cc: linux-rdma@vger.kernel.org
Subject: Re: [PATCH] RDMA/usnic: drop redundant kobject_get() in usnic_ib_sysfs_register_usdev()
Date: Wed, 02 Dec 2026 11:07:31 +0000 [thread overview]
Message-ID: <sashiko-outbox-245566@kernel.org> (raw)
In-Reply-To: <20261202110328.1641413-1-zihengw03@163.com>
> usnic_ib_sysfs_register_usdev() takes an explicit reference on
> &us_ibdev->ib_dev.dev.kobj before calling kobject_create_and_add("qpn",
> &us_ibdev->ib_dev.dev.kobj). However, kobject_create_and_add() already
> takes a reference on the parent kobject (and releases it when qpn_kobj is
> cleaned up), while usnic_ib_sysfs_unregister_usdev() only calls
> kobject_put(us_ibdev->qpn_kobj). The extra reference on
> &us_ibdev->ib_dev.dev.kobj is therefore leaked on every successful
> registration, preventing ib_dev release on unregister.
>
> Remove the redundant kobject_get() and its error-path kobject_put().
>
> Found by LLM-assisted static analysis. Compile-tested on x86_64.
>
> Fixes: e3cf00d0a87f ("IB/usnic: Add Cisco VIC low-level hardware driver")
> Cc: stable@vger.kernel.org
> Signed-off-by: Ziheng Wei <zihengw03@163.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261202110328.1641413-1-zihengw03@163.com?part=1
prev parent reply other threads:[~2026-12-02 11:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-02 11:03 [PATCH] RDMA/usnic: drop redundant kobject_get() in usnic_ib_sysfs_register_usdev() Ziheng Wei
2026-12-02 11:07 ` sashiko-bot [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=sashiko-outbox-245566@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=zihengw03@163.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