Re: [PATCH] drivers/char/mem: mmap readonly MAP_SHARED-/dev/zero correctly

From: Andrew Morton

Date: Mon Sep 28 2026 - 20:27:02 EST


On Mon, 28 Sep 2026 13:59:47 +0200 "David Hildenbrand (Arm)" <david@xxxxxxxxxx> wrote:

>
> >
> >>
> >> b) Do what Lorenzo proposes. This will allocate real memory. Someone decided to
> >> use MAP_SHARED, for unknown reasons, so I'd assume it's unlikely that
> >> something breaks, but you have a point.
> >
> > I would say this patch is the right fix for the moment to fix the assert, and we
> > can chase up with other approaches afterwards.
>
> It will get backported, so we better be careful.

I don't think it'll get backported. I hope not.

The Fixes: target of 93c0c8dc87f6 ("mm/rmap: use anon pgoff to track
MAP_PRIVATE file-backed anon folios") is new in v7.3-rc1, so this will
go in as a hotfix against this -rc cycle only.