[rds-devel] [External] : Re: [PATCH net] rds: mark snapshot pages dirty in rds_info_getsockopt()
Breno Leitao
leitao at debian.org
Tue Jun 9 08:35:11 UTC 2026
On Tue, Jun 09, 2026 at 01:02:00AM -0700, Allison Henderson wrote:
> On Mon, 2026-06-08 at 02:32 -0700, Breno Leitao wrote:
> > rds_info_getsockopt() pins the destination user pages with FOLL_WRITE and
> > the RDS_INFO_* producers memcpy the snapshot into them through
> > kmap_atomic(). Because that copy goes through the kernel direct map, the
> > dirty bit on the user PTE is never set, so unpin_user_pages() releases the
> > pages without marking them dirty. A file-backed destination page can then
> > be reclaimed without writeback, silently discarding the copied data.
> >
> > Use unpin_user_pages_dirty_lock() with make_dirty=true so the modified
> > pages are marked dirty before they are unpinned.
> >
> > Fixes: a8c879a7ee98 ("RDS: Info and stats")
> > Signed-off-by: Breno Leitao <leitao at debian.org>
>
> Hi Breno,
>
> Thanks for adding the Fixes tag. One thing though: now that this is
> standalone, it collides with "[PATCH net-next v3 2/2] rds: convert to
> getsockopt_iter" since both rewrite the same unpin in the out: block of
> rds_info_getsockopt().
>
> Easiest on everyone is to just keep it folded into the net-next series as
> a three-patch set, rather than splitting the fix out to net.
I got from the maintainers that they want to continue to split the fixes
into net and non fixes (features) into net-next.
"So just prepare for net with Fixes tags and we'll route the
patches accordingly." -- Jakub
https://lore.kernel.org/all/20260527155942.45c43c8d@kernel.org/
Thanks for the review,
--breno
More information about the rds-devel
mailing list