From: Helge Deller <deller@gmx.de>
To: Guangshuo Li <liguangshuo@mail.sdu.edu.cn>,
Jingoo Han <jingoohan1@gmail.com>
Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] fbdev: s3c-fb: Fix potential registration corruption on probe failure
Date: Tue, 24 Nov 2026 22:55:32 +0100 [thread overview]
Message-ID: <74bcbb9e-b7a9-474a-bf96-5e33507d226d@gmx.de> (raw)
In-Reply-To: <20261124135840.2276343-1-liguangshuo@mail.sdu.edu.cn>
On 11/24/26 14:58, Guangshuo Li wrote:
> s3c_fb_probe_win() publishes its window before registration succeeds.
> On failure, the caller unregisters that unregistered framebuffer, whose
> zero-initialized node can remove another framebuffer from registered_fb[0].
> Colour-map allocation failure is also ignored.
>
> Unwind failed windows inside s3c_fb_probe_win() and publish them only
> after successful registration. Stop the window before freeing its display
> memory if registration fails, and skip empty slots in the caller's cleanup.
>
> This issue was found by our static analysis tool under development.
>
> Fixes: ec549a0fdc32 ("fb: add s3c-fb driver for newer Samsung SoC framebuffer devices")
> Cc: stable@vger.kernel.org
> Signed-off-by: Guangshuo Li <liguangshuo@mail.sdu.edu.cn>
> ---
> Changes in v2:
> - Unwind failed windows in s3c_fb_probe_win() and publish the window
> only after registration succeeds, without a registration flag.
> - Stop on colour-map allocation failure and skip empty cleanup slots.
> - Blank the enabled window before freeing memory if registration fails.
>
> drivers/video/fbdev/s3c-fb.c | 27 +++++++++++++++++++--------
> 1 file changed, 19 insertions(+), 8 deletions(-)
Thanks for cleaning up in v2!
Patch is now applied to the fbdev git tree.
Thanks!
Helge
prev parent reply other threads:[~2026-11-24 21:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-24 13:58 [PATCH v2] fbdev: s3c-fb: Fix potential registration corruption on probe failure Guangshuo Li
2026-11-24 21:55 ` Helge Deller [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=74bcbb9e-b7a9-474a-bf96-5e33507d226d@gmx.de \
--to=deller@gmx.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=jingoohan1@gmail.com \
--cc=liguangshuo@mail.sdu.edu.cn \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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