From: Borislav Petkov <bp@alien8.de>
To: WenTao Liang <vulab@iscas.ac.cn>
Cc: tony.luck@intel.com, linux-edac@vger.kernel.org,
linux-kernel@vger.kernel.org,
Greg KH <gregkh@linuxfoundation.org>,
stable@vger.kernel.org
Subject: Re: [PATCH v2] edac: fix kobject refcount leak in edac_device_create_instance
Date: Wed, 22 Jul 2026 12:11:52 -0700 [thread overview]
Message-ID: <20260722191152.GDamEV-OR36VVL2TH0@fat_crate.local> (raw)
In-Reply-To: <20260628132155.45969-1-vulab@iscas.ac.cn>
On Sun, Jun 28, 2026 at 09:21:55PM +0800, WenTao Liang wrote:
> kobject_get(&edac_dev->kobj) acquires a reference on main_kobj, but it is
> only released when kobject_init_and_add fails. The success path and the
> block-creation error path both return without calling
> kobject_put(main_kobj), leaking the edac_dev kobject reference. The
> main_kobj pointer is local and lost after function return.
>
> Suggested-by: Greg KH <gregkh@linuxfoundation.org>
> Fixes: bee33f22d7c3 ("clocksource/drivers/nxp-pit: Add NXP Automotive s32g2 / s32g3 support")
An EDAC patch fixes this?!?!
> Cc: stable@vger.kernel.org
> Signed-off-by: WenTao Liang <vulab@iscas.ac.cn>
> ---
> Changes in v2:
> - Fix patch format based on reviewer feedback
> ---
> drivers/edac/edac_device_sysfs.c | 1 +
> 1 file changed, 1 insertion(+)
Also:
https://sashiko.dev/#/patchset/20260628132155.45969-1-vulab%40iscas.ac.cn
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
prev parent reply other threads:[~2026-07-22 19:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-28 13:21 WenTao Liang
2026-07-22 19:11 ` Borislav Petkov [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=20260722191152.GDamEV-OR36VVL2TH0@fat_crate.local \
--to=bp@alien8.de \
--cc=gregkh@linuxfoundation.org \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=tony.luck@intel.com \
--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
all inboxes | Powered by JetHome®