Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 Mar 2021 00:32:35 GMT
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 1eee54cbf040 - stable/13 - m_uiotombuf_nomap(): Stop clearing PG_ZERO in newly allocated pages
Message-ID:  <202103010032.1210WZTw071791@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=1eee54cbf040adba158e42150332905630253264

commit 1eee54cbf040adba158e42150332905630253264
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2021-02-22 15:03:37 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2021-03-01 00:32:18 +0000

    m_uiotombuf_nomap(): Stop clearing PG_ZERO in newly allocated pages
    
    The caller should not be passing M_ZERO in the first place, so PG_ZERO
    will not be preserved by the page allocator and clearing it accomplishes
    nothing.
    
    Reviewed by:    gallatin, jhb
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D28808
    
    (cherry picked from commit 608c44f96e88f28f9607374a6c9327d13d3d3d0e)
---
 sys/kern/uipc_mbuf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c
index f73bfab07eaf..5296aac0edc4 100644
--- a/sys/kern/uipc_mbuf.c
+++ b/sys/kern/uipc_mbuf.c
@@ -1656,6 +1656,7 @@ m_uiotombuf_nomap(struct uio *uio, int how, int len, int maxseg, int flags)
 	    VM_ALLOC_WIRED;
 
 	MPASS((flags & M_PKTHDR) == 0);
+	MPASS((how & M_ZERO) == 0);
 
 	/*
 	 * len can be zero or an arbitrary large value bound by
@@ -1709,7 +1710,6 @@ retry_page:
 					goto retry_page;
 				}
 			}
-			pg_array[i]->flags &= ~PG_ZERO;
 			mb->m_epg_pa[i] = VM_PAGE_TO_PHYS(pg_array[i]);
 			mb->m_epg_npgs++;
 		}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202103010032.1210WZTw071791>