Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Oct 2025 17:16:20 GMT
From:      Olivier Certner <olce@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 22006b452522 - stable/14 - linux: setgroups16(): Pre-extend the groups array
Message-ID:  <202510101716.59AHGKtE009209@gitrepo.freebsd.org>

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

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

commit 22006b4525224f17908634488d39938790061df5
Author:     Olivier Certner <olce@FreeBSD.org>
AuthorDate: 2025-08-28 16:27:30 +0000
Commit:     Olivier Certner <olce@FreeBSD.org>
CommitDate: 2025-10-10 17:15:56 +0000

    linux: setgroups16(): Pre-extend the groups array
    
    For the size we know we will need in the end.
    
    No functional change (intended).
    
    MFC after:      5 days
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D52279
    
    (cherry picked from commit b1326edddb302a28fc9418ab60df6210513cc07c)
---
 sys/compat/linux/linux_uid16.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sys/compat/linux/linux_uid16.c b/sys/compat/linux/linux_uid16.c
index a0c9f1c39198..94f33ce8429d 100644
--- a/sys/compat/linux/linux_uid16.c
+++ b/sys/compat/linux/linux_uid16.c
@@ -102,6 +102,7 @@ linux_setgroups16(struct thread *td, struct linux_setgroups16_args *args)
 		return (error);
 	}
 	newcred = crget();
+	crextend(newcred, ngrp);
 	p = td->td_proc;
 	PROC_LOCK(p);
 	oldcred = crcopysafe(p, newcred);



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