Date: Sun, 3 Sep 2000 10:26:31 -0400 (EDT) From: Brian Fundakowski Feldman <green@FreeBSD.org> To: Don Lewis <Don.Lewis@tsc.tdk.com> Cc: arch@freebsd.org Subject: Re: width of cr_ref Message-ID: <Pine.BSF.4.21.0009031025270.31857-100000@green.dyndns.org> In-Reply-To: <200009031204.FAA19222@salsa.gv.tsc.tdk.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 3 Sep 2000, Don Lewis wrote: > Now that sockets hold a reference to the ucred structure, should cr_ref > be a wider type? Really busy servers with a lot of sockets owned by one > user might overflow cr_ref, causing mysterious crashes when the ucred > structure is freed too early. > > struct ucred { > u_short cr_ref; /* reference count */ > uid_t cr_uid; /* effective user id */ > short cr_ngroups; /* number of groups */ > gid_t cr_groups[NGROUPS]; /* groups */ > }; And since it's a big structure anyway... and the u_short either unaligns or pads the next int-sized field (cr_uid)... I have no objections to making ucred have a u_int cr_ref. -- Brian Fundakowski Feldman \ FreeBSD: The Power to Serve! / green@FreeBSD.org `------------------------------' To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0009031025270.31857-100000>