[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aLzeVZmxuNH1sxCq@bombadil.infradead.org>
Date: Sat, 6 Sep 2025 18:22:29 -0700
From: Luis Chamberlain <mcgrof@...nel.org>
To: Fidal Palamparambil <rootuserhere@...il.com>
Cc: linux-modules@...r.kernel.org, petr.pavlu@...e.com, da.gomez@...nel.org,
samitolvanen@...gle.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] cgroup: debug: Fix multiple issues in debug controller
implementation
On Sat, Sep 06, 2025 at 04:44:17PM +0400, Fidal Palamparambil wrote:
> From: Fidal palamparambil <rootuserhere@...il.com>
>
> This commit addresses several issues in the cgroup debug controller:
>
> 1. Memory leak protection in current_css_set_cg_links_read():
> - Initialize name_buf to NULL and use proper error handling with goto
> - Ensure memory is freed in all code paths
>
> 2. RCU locking correctness:
> - Use lockdep_is_held() for proper lock dependency tracking in
> rcu_dereference_protected() calls
> - Ensure proper locking context is passed to RCU checks
>
> 3. Buffer size safety:
> - Remove off-by-one in snprintf() size calculation
> - Use sizeof(buffer) instead of sizeof(buffer)-1
>
> 4. Code robustness:
> - Add proper initialization of variables
> - Use consistent error handling patterns
> - Fix potential integer underflow in extra reference calculation
>
> The debug controller is for internal debugging only, but these fixes
> ensure it doesn't introduce stability issues or memory leaks when
> used for debugging purposes.
>
> Signed-off-by: Fidal palamparambil <rootuserhere@...il.com>
We really need to just ban you.
Luis
Powered by blists - more mailing lists