All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kernel: fix acct.c first test openai codex
@ 2025-05-16 23:15 Ozgur Kara
  2025-05-16 23:55 ` Al Viro
  0 siblings, 1 reply; 4+ messages in thread
From: Ozgur Kara @ 2025-05-16 23:15 UTC (permalink / raw)
  To: Christian Brauner, Jens Axboe, Jeff Layton, Song Liu,
	Joel Granados
  Cc: linux-kernel

From: Ozgur Karatas <ozgur@goosey.org>

Hello,

i want to try out the openai codex and it seemed like a logical
process so with rcu_read_lock() a protection is started but we dont
call rcu_read_unlock(); it has to be called to end rcu read lock.

I guess, this means rcu stays open forever and data structures are not
cleaned which causes performance degradation.

Regards

Ozgur

Reported-by: Ozgur Karatas <ozgur@goosey.org>
---
 kernel/acct.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/kernel/acct.c b/kernel/acct.c
index 6520baa13669..8a2b75063d16 100644
--- a/kernel/acct.c
+++ b/kernel/acct.c
@@ -330,6 +330,7 @@ SYSCALL_DEFINE1(acct, const char __user *, name)
        } else {
                rcu_read_lock();
                pin_kill(task_active_pid_ns(current)->bacct);
+               rcu_read_unlock();
        }

        return error;
--
2.39.5

^ permalink raw reply related	[flat|nested] 4+ messages in thread
[parent not found: <01100196db61ea53-3ded88b2-9571-4516-b244-6c970990a627-000000@eu-north-1.amazonses.com>]

end of thread, other threads:[~2025-05-17  2:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-16 23:15 [PATCH] kernel: fix acct.c first test openai codex Ozgur Kara
2025-05-16 23:55 ` Al Viro
2025-05-17  2:22   ` Ozgur Kara
     [not found] <01100196db61ea53-3ded88b2-9571-4516-b244-6c970990a627-000000@eu-north-1.amazonses.com>
2025-05-16 23:50 ` Jens Axboe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.