Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Jun 2026 22:31:10 +0000
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 3377f38cfe28 - main - uiomove_fault(): initialize save with ~0 when no flags are cleared
Message-ID:  <6a3c5aae.27744.5706725c@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=3377f38cfe284a8490b49611614aae3a2bea78e4

commit 3377f38cfe284a8490b49611614aae3a2bea78e4
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2026-06-24 22:27:45 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2026-06-24 22:31:02 +0000

    uiomove_fault(): initialize save with ~0 when no flags are cleared
    
    Reported by:    markj
    Fixes:  4c4195700249 ("sys: use curthread_pflags_set/restore to manage TDP_DEADLKTREAT for uio")
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
---
 sys/kern/subr_uio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/kern/subr_uio.c b/sys/kern/subr_uio.c
index 7e492d8aa705..e2059d3813d4 100644
--- a/sys/kern/subr_uio.c
+++ b/sys/kern/subr_uio.c
@@ -264,7 +264,7 @@ uiomove_faultflag(void *cp, int n, struct uio *uio, int nofault)
 		save = curthread_pflags_set(newflags);
 	} else {
 		KASSERT(nofault == 0, ("uiomove: nofault"));
-		save = 0;
+		save = ~0;
 	}
 
 	while (n > 0 && uio->uio_resid) {


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a3c5aae.27744.5706725c>