Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Feb 2022 17:51:32 GMT
From:      Mateusz Guzik <mjg@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: ec12b4f4ff38 - main - fd: add missing seqc to dupfdopen
Message-ID:  <202202151751.21FHpW7B016197@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by mjg:

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

commit ec12b4f4ff3817b75f4c23ee2acd14fdb0ffa20a
Author:     Mateusz Guzik <mjg@FreeBSD.org>
AuthorDate: 2022-02-14 15:33:24 +0000
Commit:     Mateusz Guzik <mjg@FreeBSD.org>
CommitDate: 2022-02-15 17:51:08 +0000

    fd: add missing seqc to dupfdopen
---
 sys/kern/kern_descrip.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c
index e7b3191bae30..57e0d9dee671 100644
--- a/sys/kern/kern_descrip.c
+++ b/sys/kern/kern_descrip.c
@@ -3642,6 +3642,7 @@ dupfdopen(struct thread *td, struct filedesc *fdp, int dfd, int mode,
 		newfde = &fdp->fd_ofiles[indx];
 		oldfde = &fdp->fd_ofiles[dfd];
 #ifdef CAPABILITIES
+		seqc_write_begin(&oldfde->fde_seqc);
 		seqc_write_begin(&newfde->fde_seqc);
 #endif
 		memcpy(newfde, oldfde, fde_change_size);
@@ -3649,6 +3650,7 @@ dupfdopen(struct thread *td, struct filedesc *fdp, int dfd, int mode,
 		fdunused(fdp, dfd);
 #ifdef CAPABILITIES
 		seqc_write_end(&newfde->fde_seqc);
+		seqc_write_end(&oldfde->fde_seqc);
 #endif
 		break;
 	}



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