Page MenuHomeFreeBSD

acct: Reset the thread rlimits on exit
AbandonedPublic

Authored by markj on May 13 2021, 8:37 PM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 14 2024, 5:02 AM
Unknown Object (File)
Jan 11 2024, 4:15 PM
Unknown Object (File)
Dec 22 2023, 9:38 PM
Unknown Object (File)
Nov 3 2023, 7:50 PM
Unknown Object (File)
Sep 11 2023, 1:26 PM
Unknown Object (File)
Aug 27 2023, 2:42 PM
Unknown Object (File)
Aug 16 2023, 7:03 PM
Unknown Object (File)
Jan 17 2023, 8:26 AM
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