This bug is in mem_cgroup_resize_max function in mm/memcontrol.c source file.
Signed-off-by: Ercan Ersoy ercanersoy@ercanersoy.net --- mm/memcontrol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 2ed5f2a0879d..977f58b8f1e6 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -3351,7 +3351,7 @@ static int mem_cgroup_resize_max(struct mem_cgroup *memcg, { bool enlarge = false; bool drained = false; - int ret; + int ret = 0; bool limits_invariant; struct page_counter *counter = memsw ? &memcg->memsw : &memcg->memory;
On Sat, Jan 08, 2022 at 07:37:59PM +0300, Ercan Ersoy wrote:
This bug is in mem_cgroup_resize_max function in mm/memcontrol.c source file.
Signed-off-by: Ercan Ersoy ercanersoy@ercanersoy.net
<formletter>
This is not the correct way to submit patches for inclusion in the stable kernel tree. Please read: https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html for how to do this properly.
</formletter>
On Sat, Jan 8, 2022 at 8:52 AM Greg KH gregkh@linuxfoundation.org wrote:
On Sat, Jan 08, 2022 at 07:37:59PM +0300, Ercan Ersoy wrote:
This bug is in mem_cgroup_resize_max function in mm/memcontrol.c source file.
Signed-off-by: Ercan Ersoy ercanersoy@ercanersoy.net
<formletter>
This is not the correct way to submit patches for inclusion in the stable kernel tree.
Even more relevantly, I think the patch is bogus.
What broken tool claims that 'ret' is uninitialized?
That mem_cgroup_resize_max() uses an endless loop construct (admittedly an odd one - "do while (true)" is not the usual "for (;;)" syntax). And every single 'break' out of that loop sets the 'ret' variable.
Whatever tool reported this is just broken, or I'm blind.
Linus
linux-stable-mirror@lists.linaro.org