From: sashiko-bot@kernel.org
To: "Wentao Liang" <vulab@iscas.ac.cn>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v2] firmware/sysfb: Fix device reference count leak in sysfb_disable()
Date: Sat, 07 Nov 2026 18:47:16 +0000 [thread overview]
Message-ID: <sashiko-outbox-203186@kernel.org> (raw)
In-Reply-To: <1794071765.2669957.4378216502938475@iscas.ac.cn>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] firmware/sysfb: conversational reply and mbox headers in commit
message
--
commit 138aa0cb748b38d7396e354631327333b8c26fd3
Author: Wentao Liang <vulab@iscas.ac.cn>
> firmware/sysfb: Fix device reference count leak in sysfb_disable()
>
> Hi Thomas, Alex,
>
> Sorry for the very late reply, and thanks for the review.
>
> Alex, you asked whether sysfb_unregister() would still need to be called
> when the parent device lookup returns an error. It does: without a known
> parent we cannot tell whether the system framebuffer belongs to the
> calling device, and leaving it registered could make sysfb interfere with
> the native driver. Thomas, that is the defensive behaviour you suggested,
> so v2 unregisters unconditionally when sysfb_parent_dev() fails and only
> drops the reference on the non-error path.
>
> The reference leak fix itself is unchanged.
>
> From 8c5f084941a3b6aca5d3ae8cff0c3bd1d4ae1e6f Mon Sep 17 00:00:00 2001
> From: Wentao Liang <vulab@iscas.ac.cn>
> Date: Sat, 7 Nov 2026 17:02:27 +0000
> Subject: [PATCH v2] firmware/sysfb: Fix device reference count leak in
> sysfb_disable()
>
> sysfb_parent_dev() returns a pointer to &pdev->dev with an acquired
> reference when it finds the PCI device that contains the system
> framebuffer. sysfb_disable() never drops that reference, so a reference
> to the PCI device is leaked on every call that resolves a parent.
>
> Release the reference with put_device() before leaving the critical
> section.
>
> If the parent device cannot be determined, unregister the system
> framebuffer unconditionally, as it might still belong to the calling
> device. Leaving sysfb registered in that case can make it interfere
> with the native driver.
>
> Fixes: b49420d6a1ae ("video/aperture: optionally match the device in sysfb_disable()")
> Cc: stable@vger.kernel.org
> Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
[Severity: Low]
The commit message includes a conversational reply and a duplicate
git-format-patch header block above the "---" tear line without a
scissors line ("-- >8 --"), so git am records them in the commit log.
The reply notes belong below "---" (or above a scissors line), and the
extra mbox headers should be removed from the changelog body.
--
Sashiko AI review · https://sashiko.dev/#/patchset/1794071765.2669957.4378216502938475@iscas.ac.cn?part=1
prev parent reply other threads:[~2026-11-07 18:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-16 7:38 [PATCH] firmware/sysfb: Fix device reference count leak in sysfb_disable() Wentao Liang
2026-09-16 7:48 ` sashiko-bot
2026-09-16 21:06 ` Deucher, Alexander
2026-09-17 6:50 ` Thomas Zimmermann
2026-11-07 17:05 ` [PATCH v2] " Wentao Liang
2026-11-07 18:47 ` 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-203186@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=sashiko-reviews@lists.linux.dev \
--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 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.