| Summary: | procfs_rlimit tidyup | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Base System | Reporter: | Adrian Chadd <adrian> | ||||
| Component: | kern | Assignee: | Mateusz Guzik <mjg> | ||||
| Status: | Closed Overcome By Events | ||||||
| Severity: | Affects Only Me | CC: | gonzo, mjg | ||||
| Priority: | Normal | ||||||
| Version: | 5.0-CURRENT | ||||||
| Hardware: | Any | ||||||
| OS: | Any | ||||||
| Attachments: |
|
||||||
|
Description
Adrian Chadd
2000-06-26 22:20:01 UTC
<<On Mon, 26 Jun 2000 23:12:45 +0200 (CEST), adrian@FreeBSD.ORG said: > + psbuf = (char *)malloc(512 * sizeof(char), M_TEMP, M_WAITOK); sizeof(char) is defined to be 1. > + /* XXX conservative, but potentially overflowable */ It should be possible to compute the exact buffer size. Since this code is not frequently run, I would suggest that a two-pass approach would not hurt. -GAWollman On Tue, Jun 27, 2000, Garrett Wollman wrote: > <<On Mon, 26 Jun 2000 23:12:45 +0200 (CEST), adrian@FreeBSD.ORG said: > > > + psbuf = (char *)malloc(512 * sizeof(char), M_TEMP, M_WAITOK); > > sizeof(char) is defined to be 1. Being pedantic. > > + /* XXX conservative, but potentially overflowable */ > > It should be possible to compute the exact buffer size. Since this > code is not frequently run, I would suggest that a two-pass approach > would not hurt. I'm going to go through later on and redo this repeated evilness in procfs. I thought I'd submit this change now to get rid of the blantant hacks. Adrian -- Adrian Chadd Build a man a fire, and he's warm for the <adrian@FreeBSD.org> rest of the evening. Set a man on fire and he's warm for the rest of his life. Responsible Changed From-To: freebsd-bugs->adrian I can commit my own PRs now. Responsible Changed From-To: adrian->freebsd-bugs With bugmeister hat on, reassign from recently inactive committer. State Changed From-To: open->suspended Mark as 'suspended' since this does not seem as though it is being actively worked on. For bugs matching the following conditions: - Status == In Progress - Assignee == "bugs@FreeBSD.org" - Last Modified Year <= 2017 Do - Set Status to "Open" Adrian, do you have any plans committing this or can the PR be closed? holy crap i wonder if this is still a problem! Keyword:
patch
or patch-ready
– in lieu of summary line prefix:
[patch]
* bulk change for the keyword
* summary lines may be edited manually (not in bulk).
Keyword descriptions and search interface:
<https://bugs.freebsd.org/bugzilla/describekeywords.cgi>
the code was switched to sbuf years ago that lim_hold is very susipicious vs process exit, but that's another story |