Linux Framebuffer Layer development
 help / color / mirror / Atom feed
From: Helge Deller <deller@gmx.de>
To: "Jiri Kosina" <jikos@kernel.org>,
	"Benjamin Tissoires" <bentiss@kernel.org>,
	"Aveline Noir" <jm5905938@gmail.com>,
	"Bruno Prémont" <bonbons@linux-vserver.org>
Cc: linux-input@vger.kernel.org, linux-fbdev@vger.kernel.org
Subject: Re: [PATCH v2 2/2] HID: picolcd: Avoid framebuffer last-close deadlock
Date: Sun, 25 Oct 2026 09:20:36 +0100	[thread overview]
Message-ID: <76cddcc5-2cf8-40da-9139-e78353975e41@gmx.de> (raw)
In-Reply-To: <CANOyQmHF-gjvnLqTGEVBcU6+AWj5ha+7tJhE2E_Cv9aj-gRXdA@mail.gmail.com>

On 9/28/26 18:17, Aveline Noir wrote:
> Closing the last framebuffer descriptor can deadlock against PicoLCD's
> deferred update worker. fb_release() holds info->lock while waiting for
> deferred work, and picolcd_fb_update() takes the same lock. Lockdep
> reports the cycle through deferred-work completion and fbdefio_state->lock.
> Repeated framebuffer open/write/close with concurrent device destruction
> reproduces the hang in a PREEMPT_RT QEMU guest.
> 
> Use a private update mutex in the deferred worker instead of info->lock.
> Take it in picolcd_set_par() as well to preserve serialization of pixel
> format conversion and framebuffer updates. Initialize it before exposing
> the framebuffer.
> 
> The test with the preceding output-request fix hung in the first round
> and reported a circular locking dependency. With this change, all five
> rounds completed, including 29 successful framebuffer write cycles and
> concurrent LCD, backlight, two LED and UHID destroy operations, without
> BUG/WARNING. The original syzkaller reproducer and persistent-open
> framebuffer tests also passed again. These are bounded virtual-device
> tests; physical hardware and suspend/resume remain untested.
> 
> Fixes: 3efc61d95259 ("fbdev: Fix invalid page access after closing
> deferred I/O devices")
> Signed-off-by: Aveline Noir <jm5905938@gmail.com>

For this patch:
Acked-by: Helge Deller <deller@gmx.de> # fbdev

I'm not sure about how to handle this patch series at all.
There is still a review missing for patch #1.
Shall I take this patch (#2 of 2) via fbdev git tree?

Helge

  reply	other threads:[~2026-10-25  8:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-28 16:15 [PATCH v2 0/2] HID: picolcd: Fix output-request and framebuffer locking Aveline Noir
2026-09-28 16:17 ` [PATCH v2 2/2] HID: picolcd: Avoid framebuffer last-close deadlock Aveline Noir
2026-10-25  8:20   ` Helge Deller [this message]
2026-10-27  8:22     ` Aveline Noir
2026-10-14 11:06 ` [PATCH v2 0/2] HID: picolcd: Fix output-request and framebuffer locking Aveline Noir

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=76cddcc5-2cf8-40da-9139-e78353975e41@gmx.de \
    --to=deller@gmx.de \
    --cc=bentiss@kernel.org \
    --cc=bonbons@linux-vserver.org \
    --cc=jikos@kernel.org \
    --cc=jm5905938@gmail.com \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-input@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