git: ec12b4f4ff38 - main - fd: add missing seqc to dupfdopen
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 15 Feb 2022 17:51:32 UTC
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; }