Re: [PATCH v2] fbdev: Fix invalid page access after closing deferred I/O devices

2023-02-10 Thread Thomas Zimmermann
Added to drm-misc-fixes. Am 29.01.23 um 09:28 schrieb Takashi Iwai: When a fbdev with deferred I/O is once opened and closed, the dirty pages still remain queued in the pageref list, and eventually later those may be processed in the delayed work. This may lead to a corruption of pages,

Re: [PATCH v2] fbdev: Fix invalid page access after closing deferred I/O devices

2023-02-10 Thread Thomas Zimmermann
Am 29.01.23 um 09:28 schrieb Takashi Iwai: When a fbdev with deferred I/O is once opened and closed, the dirty pages still remain queued in the pageref list, and eventually later those may be processed in the delayed work. This may lead to a corruption of pages, hitting an Oops. This patch

Re: [PATCH v2] fbdev: Fix invalid page access after closing deferred I/O devices

2023-02-08 Thread Thomas Zimmermann
Hi, this bug could be a symptom of the problem reported at [1]. Best regards Thomas [1] https://lore.kernel.org/dri-devel/CAM0jSHOcvZoyv-y6bnvFaUybRQsDx_mfOydL1uaNM4T4PgcA=a...@mail.gmail.com/T/#mfbef4df9b49fc5fda9bcfa26db5ca13cdaef6d7e Am 29.01.23 um 09:28 schrieb Takashi Iwai: When a

Re: [PATCH v2] fbdev: Fix invalid page access after closing deferred I/O devices

2023-01-30 Thread Takashi Iwai
On Mon, 30 Jan 2023 09:52:43 +0100, Takashi Iwai wrote: > > > There's a call to cancel_delayed_work_sync() in the new helper > > fb_deferred_io_release(). Is this the right function? Maybe > > flush_delayed_work() is a better choice. > > I thought of that, but took a shorter path. > OK, let's

Re: [PATCH v2] fbdev: Fix invalid page access after closing deferred I/O devices

2023-01-30 Thread Takashi Iwai
On Mon, 30 Jan 2023 10:28:16 +0100, Thomas Zimmermann wrote: > > Hi > > Am 30.01.23 um 09:52 schrieb Takashi Iwai: > > On Mon, 30 Jan 2023 09:28:36 +0100, > > Thomas Zimmermann wrote: > >> > >> Hi > >> > >> Am 29.01.23 um 09:28 schrieb Takashi Iwai: > >>> When a fbdev with deferred I/O is once

Re: [PATCH v2] fbdev: Fix invalid page access after closing deferred I/O devices

2023-01-30 Thread Thomas Zimmermann
Hi Am 30.01.23 um 09:52 schrieb Takashi Iwai: On Mon, 30 Jan 2023 09:28:36 +0100, Thomas Zimmermann wrote: Hi Am 29.01.23 um 09:28 schrieb Takashi Iwai: When a fbdev with deferred I/O is once opened and closed, the dirty pages still remain queued in the pageref list, and eventually later

Re: [PATCH v2] fbdev: Fix invalid page access after closing deferred I/O devices

2023-01-30 Thread Takashi Iwai
On Mon, 30 Jan 2023 09:28:36 +0100, Thomas Zimmermann wrote: > > Hi > > Am 29.01.23 um 09:28 schrieb Takashi Iwai: > > When a fbdev with deferred I/O is once opened and closed, the dirty > > pages still remain queued in the pageref list, and eventually later > > those may be processed in the

Re: [PATCH v2] fbdev: Fix invalid page access after closing deferred I/O devices

2023-01-30 Thread Thomas Zimmermann
Hi Am 29.01.23 um 09:28 schrieb Takashi Iwai: When a fbdev with deferred I/O is once opened and closed, the dirty pages still remain queued in the pageref list, and eventually later those may be processed in the delayed work. This may lead to a corruption of pages, hitting an Oops. Do you

Re: [PATCH v2] fbdev: Fix invalid page access after closing deferred I/O devices

2023-01-30 Thread Miko Larsson
On Sun, 2023-01-29 at 09:28 +0100, Takashi Iwai wrote: > When a fbdev with deferred I/O is once opened and closed, the dirty > pages still remain queued in the pageref list, and eventually later > those may be processed in the delayed work.  This may lead to a > corruption of pages, hitting an

[PATCH v2] fbdev: Fix invalid page access after closing deferred I/O devices

2023-01-29 Thread Takashi Iwai
When a fbdev with deferred I/O is once opened and closed, the dirty pages still remain queued in the pageref list, and eventually later those may be processed in the delayed work. This may lead to a corruption of pages, hitting an Oops. This patch makes sure to cancel the delayed work and clean