Kernel: Make pledge serialization in /proc/all generation OOM-fallible

This commit is contained in:
Idan Horowitz 2022-01-25 15:19:14 +02:00
parent e23d320bb9
commit dab73d6d23
Notes: sideshowbarker 2024-07-17 20:12:14 +09:00

View File

@ -459,10 +459,9 @@ private:
if (process.is_user_process()) {
StringBuilder pledge_builder;
#define __ENUMERATE_PLEDGE_PROMISE(promise) \
if (process.has_promised(Pledge::promise)) { \
pledge_builder.append(#promise " "); \
}
#define __ENUMERATE_PLEDGE_PROMISE(promise) \
if (process.has_promised(Pledge::promise)) \
TRY(pledge_builder.try_append(#promise " "));
ENUMERATE_PLEDGE_PROMISES
#undef __ENUMERATE_PLEDGE_PROMISE