Re: [PATCH v2] lib/iov_iter: fix to increase non slab folio refcount

From: Sheng Yong
Date: Wed Apr 02 2025 - 09:37:57 EST


On 4/1/25 23:22, Vlastimil Babka wrote:
On 4/1/25 16:47, Sheng Yong wrote:
From: Sheng Yong <shengyong1@xxxxxxxxxx>
[...]

Fixes: b9c0e49abfca ("mm: decline to manipulate the refcount on a slab page")

Sigh. That went to v6.14

mm-hotfixes and Cc: stable then?

Hi, Vlastimil,

Shall I resend this patch with Cc: tag to the stable list?

thanks,
sheng


Signed-off-by: Sheng Yong <shengyong1@xxxxxxxxxx>

Acked-by: Vlastimil Babka <vbabka@xxxxxxx>

Thanks.

---
lib/iov_iter.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
v2:
* update commit message
* update coding style

diff --git a/lib/iov_iter.c b/lib/iov_iter.c
index 8c7fdb7d8c8f..bc9391e55d57 100644
--- a/lib/iov_iter.c
+++ b/lib/iov_iter.c
@@ -1191,7 +1191,7 @@ static ssize_t __iov_iter_get_pages_alloc(struct iov_iter *i,
return -ENOMEM;
p = *pages;
for (int k = 0; k < n; k++) {
- struct folio *folio = page_folio(page);
+ struct folio *folio = page_folio(page + k);
p[k] = page + k;
if (!folio_test_slab(folio))
folio_get(folio);