Page MenuHomeFreeBSD

acct: Reset the thread rlimits on exit
AbandonedPublic

Authored by markj on May 13 2021, 8:37 PM.
Tags
None
Referenced Files
F106168951: D30252.diff
Thu, Dec 26, 12:48 PM
Unknown Object (File)
Oct 7 2024, 1:25 AM
Unknown Object (File)
Oct 3 2024, 12:58 AM
Unknown Object (File)
Oct 2 2024, 10:07 PM
Unknown Object (File)
Oct 2 2024, 5:21 PM
Unknown Object (File)
Oct 2 2024, 12:30 PM
Unknown Object (File)
Oct 2 2024, 10:23 AM
Unknown Object (File)
Oct 1 2024, 10:20 PM
Subscribers

Details

Reviewers
kib
mjg
Summary

acct_process() resets the resource limits in exiting process, mostly to
ensure that a file size limit does not inhibit writing to the accounting
record file configured with acct(2). But since we started caching
limits in threads, we need to reset that pointer too.

Noticed while investigating a syzkaller bug.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 39173
Build 36062: arc lint + arc unit

Event Timeline

markj requested review of this revision.May 13 2021, 8:37 PM

I dislike this hack with replacing p_limit/td_limit. We have the file size limit check done in vn_file_size(), so it is easy to avoid the limit check when not needed. Please see D30257